G-Two / subarulink

A python package for interacting with Subaru STARLINK remote vehicle services.
Apache License 2.0
86 stars 13 forks source link

Error 500 input string #50

Open askovi opened 2 years ago

askovi commented 2 years ago

Getting this error on remote start with default profile (created through interactive mode) for a Canadian account. I'm using the CLI, not HA. Any ideas? I assume the AUTO is coming from the custom preset data

subarulink.connection - ERROR - ('{"httpCode":500,"errorCode":"error","errorMessage":"java.lang.NumberFormatException ' '- For input string: \\"AUTO\\""}') 2022-01-24 17:12:17,663 - subarulink - ERROR - SubaruException caught: HTTP 500: <ClientResponse(https://mobileapi.ca.prod.subarucs.com/g2v21/service/g2/engineStart/execute.json) [500 ]>

askovi commented 2 years ago

To add to this, it only happens with the custom preset i created. It works fine if I select for eg. Full Heat preset

This is the custom preset data:

{'airConditionOn': 'true', 'climateZoneFrontAirMode': 'AUTO', 'climateZoneFrontAirVolume': 'AUTO', 'climateZoneFrontTempCelsius': '20', 'heatedRearWindowActive': 'true', 'heatedSeatFrontLeft': 'HIGH_HEAT', 'heatedSeatFrontRight': 'HIGH_HEAT', 'name': 'ovi', 'outerAirCirculation': 'recirculation', 'runTimeMinutes': '10'}

G-Two commented 2 years ago

@askovi I was able to replicate the issue on my end with a 2019 Crosstrek PHEV. I suspect it has something to do with some vehicles not supporting the 'AUTO' options in the presets. If I set climateZoneFrontAirVolume = AUTO, I receive the same error you observed above. If I set climateZoneFrontAirMode = AUTO, the command processes, but fails when it reaches the vehicle with a NegativeAcknowledge:inVehicleTimeout. If I change both options to something other than AUTO, the command succeeds. I noticed in the official MySubaru app, I do not have any "AUTO" options available when creating a custom preset. The CLI in this package allows the user to select options that the vehicle does not necessarily support, usually resulting in an error. To avoid this, you can configure your presets in the official app or website. They will be made available to you in the CLI automatically.