G-Two / homeassistant-subaru

Subaru STARLINK custom component for Home Assistant.
Apache License 2.0
54 stars 6 forks source link

Error on Remote Start #29

Closed BovBrew closed 2 years ago

BovBrew commented 2 years ago

Im receiving and error on Remote start. All other remote functions are currently working with this exception.

Error: SmartSelect_20211221-085115_Gallery

Failed to call service subaru/remote.start. the JSON object must be str, bytes or bytearray, not NoneType

Edit: Added Car info and Log Model - 2021 Subaru Ascent Premium Trim

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/subaru/remote_service.py:62 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 7:35:13 AM (3 occurrences) Last logged: 4:52:54 PM

[140173696245088] the JSON object must be str, bytes or bytearray, not NoneType [140173493087536] the JSON object must be str, bytes or bytearray, not NoneType [140173376046320] the JSON object must be str, bytes or bytearray, not NoneType Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service await handler.job.target(service_call) File "/config/custom_components/subaru/init.py", line 125, in async_call_service await async_call_remote_service( File "/config/custom_components/subaru/remote_service.py", line 62, in async_call_remote_service success = await getattr(controller, cmd)(vin) File "/usr/local/lib/python3.9/site-packages/subarulink/controller.py", line 684, in remote_start await self.get_climate_settings(vin) File "/usr/local/lib/python3.9/site-packages/subarulink/controller.py", line 315, in get_climate_settings self._vehicles[vin]["climate"] = json.loads(js_resp["data"]) File "/usr/local/lib/python3.9/json/init.py", line 339, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType

stboch commented 2 years ago

what is the year and model of your car?

BovBrew commented 2 years ago

2021 Subaru Ascent Premium Trim

stboch commented 2 years ago

@BovBrew try out the new version as likely your issue is because your account never had the previous API endpoint used by the older version of the remote start.

BovBrew commented 2 years ago

@stboch, updated and now working as expected. Just needed to add starting preset.