Update go.mod to use latest mysubaru module version and update net dependency
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 25s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 25s
This commit is contained in:
@ -30,8 +30,6 @@ func main() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// subaru := ms.SelectVehicle("4S4BTGPD0P3199198")
|
|
||||||
|
|
||||||
// 11.6MMAN ABS_MIL ACCS AHBL_MIL ATF_MIL AWD_MIL BSD BSDRCT_MIL CEL_MIL EBD_MIL EOL_MIL EPAS_MIL EPB_MIL ESS_MIL EYESIGHT ISS_MIL NAV_TOMTOM OPL_MIL RAB_MIL RCC REARBRK RES RESCC RHSF RPOI RPOIA SRS_MIL TEL_MIL TIF_35 TIR_33 TPMS_MIL VDC_MIL WASH_MIL g2
|
// 11.6MMAN ABS_MIL ACCS AHBL_MIL ATF_MIL AWD_MIL BSD BSDRCT_MIL CEL_MIL EBD_MIL EOL_MIL EPAS_MIL EPB_MIL ESS_MIL EYESIGHT ISS_MIL NAV_TOMTOM OPL_MIL RAB_MIL RCC REARBRK RES RESCC RHSF RPOI RPOIA SRS_MIL TEL_MIL TIF_35 TIR_33 TPMS_MIL VDC_MIL WASH_MIL g2
|
||||||
// subaru1 := mysubaru.GetVehicleByVIN("4S4BTGND8L3137058")
|
// subaru1 := mysubaru.GetVehicleByVIN("4S4BTGND8L3137058")
|
||||||
// fmt.Printf("SUBARU #2 (Vehicle Status):\n")
|
// fmt.Printf("SUBARU #2 (Vehicle Status):\n")
|
||||||
@ -47,54 +45,65 @@ func main() {
|
|||||||
cfg.Logger.Error("cannot get a vehicle by VIN", "error", err)
|
cfg.Logger.Error("cannot get a vehicle by VIN", "error", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("SUBARU #1 (Vehicle Status): %s\n", outback)
|
fmt.Printf("SUBARU #1 (Vehicle Status): %s\n", outback)
|
||||||
|
|
||||||
// // Execute a LightsStart command
|
// // Execute a Lock command
|
||||||
// events, err := outback.LightsStart()
|
// events, err := outback.EngineStart(5, 0, true)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
// cfg.Logger.Error("cannot execute LightsStart command", "error", err)
|
// cfg.Logger.Error("cannot execute Lock command", "error", err)
|
||||||
// os.Exit(1)
|
// os.Exit(1)
|
||||||
// }
|
// }
|
||||||
// for event := range events {
|
// for event := range events {
|
||||||
// fmt.Printf("Lights Start Event: %+v\n", event)
|
// fmt.Printf("Lock Event: %+v\n", event)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // Wait for a while to see the lights on
|
// Execute a LightsStart command
|
||||||
// time.Sleep(20 * time.Second)
|
events, err := outback.LightsStart()
|
||||||
|
|
||||||
// // Execute a LightsStop command
|
|
||||||
// events, err = outback.LightsStop()
|
|
||||||
// if err != nil {
|
|
||||||
// cfg.Logger.Error("cannot execute LightsStop command", "error", err)
|
|
||||||
// os.Exit(1)
|
|
||||||
// }
|
|
||||||
// for event := range events {
|
|
||||||
// fmt.Printf("Lights Stop Event: %+v\n", event)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Execute a Unlock command
|
|
||||||
events, err := outback.Unlock()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cfg.Logger.Error("cannot execute Unlock command", "error", err)
|
cfg.Logger.Error("cannot execute LightsStart command", "error", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
for event := range events {
|
for event := range events {
|
||||||
fmt.Printf("Unlock Event: %+v\n", event)
|
fmt.Printf("Lights Start Event: %+v\n", event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for a while to see the lights on
|
// Wait for a while to see the lights on
|
||||||
time.Sleep(20 * time.Second)
|
time.Sleep(20 * time.Second)
|
||||||
|
|
||||||
// Execute a Lock command
|
// Execute a LightsStop command
|
||||||
events, err = outback.Lock()
|
events, err = outback.LightsStop()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cfg.Logger.Error("cannot execute Lock command", "error", err)
|
cfg.Logger.Error("cannot execute LightsStop command", "error", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
for event := range events {
|
for event := range events {
|
||||||
fmt.Printf("Lock Event: %+v\n", event)
|
fmt.Printf("Lights Stop Event: %+v\n", event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// // Execute a Unlock command
|
||||||
|
// events, err := outback.Unlock()
|
||||||
|
// if err != nil {
|
||||||
|
// cfg.Logger.Error("cannot execute Unlock command", "error", err)
|
||||||
|
// os.Exit(1)
|
||||||
|
// }
|
||||||
|
// for event := range events {
|
||||||
|
// fmt.Printf("Unlock Event: %+v\n", event)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Wait for a while to see the lights on
|
||||||
|
// time.Sleep(20 * time.Second)
|
||||||
|
|
||||||
|
// // Execute a Lock command
|
||||||
|
// events, err = outback.Lock()
|
||||||
|
// if err != nil {
|
||||||
|
// cfg.Logger.Error("cannot execute Lock command", "error", err)
|
||||||
|
// os.Exit(1)
|
||||||
|
// }
|
||||||
|
// for event := range events {
|
||||||
|
// fmt.Printf("Lock Event: %+v\n", event)
|
||||||
|
// }
|
||||||
|
|
||||||
// Execute a forced GetLocation command
|
// Execute a forced GetLocation command
|
||||||
// events, err = outback.GetLocation(true)
|
// events, err = outback.GetLocation(true)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
@ -105,3 +114,10 @@ func main() {
|
|||||||
// fmt.Printf("GeoLocation Event: %+v\n", event)
|
// fmt.Printf("GeoLocation Event: %+v\n", event)
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {"time":"2025-07-21T18:05:30.987314-04:00","level":"DEBUG","source":{"function":"git.savin.nyc/alex/mysubaru.(*Client).execute","file":"/Users/alex/go/pkg/mod/git.savin.nyc/alex/mysubaru@v0.0.0-20250721200300-3809ed5883b4/client.go","line":372},"msg":"executed GET request","method":"GET","url":"/g2v31/service/g2/remoteEngineQuickStartSettings/fetch.json","params":{}}
|
||||||
|
// {"time":"2025-07-21T18:05:31.014014-04:00","level":"DEBUG","source":{"function":"git.savin.nyc/alex/mysubaru.(*Client).execute","file":"/Users/alex/go/pkg/mod/git.savin.nyc/alex/mysubaru@v0.0.0-20250721200300-3809ed5883b4/client.go","line":404},"msg":"parsed http request output","data":"{\"success\":true,\"errorCode\":null,\"dataName\":null,\"data\":\"{\\\"name\\\":\\\"Cooling\\\",\\\"runTimeMinutes\\\":\\\"10\\\",\\\"climateZoneFrontTemp\\\":\\\"65\\\",\\\"climateZoneFrontAirMode\\\":\\\"FEET_FACE_BALANCED\\\",\\\"climateZoneFrontAirVolume\\\":\\\"7\\\",\\\"outerAirCirculation\\\":\\\"outsideAir\\\",\\\"heatedRearWindowActive\\\":\\\"false\\\",\\\"heatedSeatFrontLeft\\\":\\\"HIGH_COOL\\\",\\\"heatedSeatFrontRight\\\":\\\"HIGH_COOL\\\",\\\"airConditionOn\\\":\\\"false\\\",\\\"canEdit\\\":\\\"true\\\",\\\"disabled\\\":\\\"false\\\",\\\"presetType\\\":\\\"userPreset\\\",\\\"startConfiguration\\\":\\\"START_ENGINE_ALLOW_KEY_IN_IGNITION\\\"}\"}"}
|
||||||
|
|
||||||
|
// {"time":"2025-07-21T18:03:44.461646-04:00","level":"DEBUG","source":{"function":"git.savin.nyc/alex/mysubaru.(*Client).execute","file":"/Users/alex/go/pkg/mod/git.savin.nyc/alex/mysubaru@v0.0.0-20250721200300-3809ed5883b4/client.go","line":372},"msg":"executed GET request","method":"GET","url":"/g2v31/service/g2/remoteEngineQuickStartSettings/fetch.json","params":{}}
|
||||||
|
// {"time":"2025-07-21T18:03:44.475745-04:00","level":"DEBUG","source":{"function":"git.savin.nyc/alex/mysubaru.(*Client).execute","file":"/Users/alex/go/pkg/mod/git.savin.nyc/alex/mysubaru@v0.0.0-20250721200300-3809ed5883b4/client.go","line":404},"msg":"parsed http request output","data":"{\"success\":true,\"errorCode\":null,\"dataName\":null,\"data\":\"{\\\"airConditionOn\\\":\\\"false\\\",\\\"climateSettings\\\":\\\"climateSettings\\\",\\\"climateZoneFrontAirMode\\\":\\\"FEET_WINDOW\\\",\\\"climateZoneFrontAirVolume\\\":\\\"7\\\",\\\"climateZoneFrontTemp\\\":\\\"65\\\",\\\"heatedRearWindowActive\\\":\\\"false\\\",\\\"heatedSeatFrontLeft\\\":\\\"HIGH_COOL\\\",\\\"heatedSeatFrontRight\\\":\\\"HIGH_COOL\\\",\\\"name\\\":\\\"Cooling\\\",\\\"outerAirCirculation\\\":\\\"outsideAir\\\",\\\"runTimeMinutes\\\":\\\"10\\\",\\\"startConfiguration\\\":\\\"START_ENGINE_ALLOW_KEY_IN_IGNITION\\\"}\\n\"}"}
|
||||||
|
// {"time":"2025-07-21T18:03:44.475885-04:00","level":"ERROR","source":{"function":"git.savin.nyc/alex/mysubaru.(*Vehicle).GetClimateQuickPresets","file":"/Users/alex/go/pkg/mod/git.savin.nyc/alex/mysubaru@v0.0.0-20250721200300-3809ed5883b4/vehicle.go","line":498},"msg":"error while parsing climate quick presets json","request":"GetClimateQuickPresets","error":"invalid character '\"' after top-level value"}
|
||||||
|
@ -2,12 +2,12 @@ module example
|
|||||||
|
|
||||||
go 1.24
|
go 1.24
|
||||||
|
|
||||||
require git.savin.nyc/alex/mysubaru v0.0.0-20250706191512-3c927fd83b1f
|
require git.savin.nyc/alex/mysubaru v0.0.0-20250722205404-92d4266f8b5a
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||||
golang.org/x/net v0.41.0 // indirect
|
golang.org/x/net v0.42.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
resty.dev/v3 v3.0.0-beta.3 // indirect
|
resty.dev/v3 v3.0.0-beta.3 // indirect
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user