devmel / hass_airsend

Home Assistant Component permettant d'envoyer des commandes radio via AirSend (RF433) ou AirSend duo (RF433 & RF868).
GNU General Public License v3.0
11 stars 3 forks source link

Expecting value: line 1 column 1 (char 0) #8

Closed alexh3o closed 1 year ago

alexh3o commented 1 year ago

Hello, I have Airsend custom component and Airsend Addon for local use installed on Home Assistant (latest version, 2023.3), and I've had it for more than 6 months, to control Profalux 433MHz rolling shutters and a Bft Garage 868MHz door Regularly I have an error pop up when operating my covers with the message in title. In the home assistant logs I find the following

Log Details (ERROR) Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/airsend/device.py:123 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: April 4, 2023 at 11:50:51 (8 occurrences) Last logged: April 4, 2023 at 20:55:12

[3559160440] Expecting value: line 1 column 1 (char 0) [3406315872] Expecting value: line 1 column 1 (char 0) [3522599208] Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/cover/init.py", line 337, in async_open_cover await self.hass.async_add_executor_job(ft.partial(self.open_cover, *kwargs)) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) File "/config/custom_components/airsend/cover.py", line 83, in open_cover if self._device.transfer(note): File "/config/custom_components/airsend/device.py", line 123, in transfer jdata = json.loads(response.text) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This error is frequent (more than once a day), happens randomly and I believe sometimes at least the command to the shutters/door are not done. It always stops my automations to close/open all shutters when it happens though.

Could you look into it ? I'm available if more details are needed.

Thank you, Alex

geromey commented 1 year ago

Hello, it looks like I have the same error. It seems to hapen randomly as well :

2023-04-15 17:33:04.143 ERROR (MainThread) [homeassistant.components.automation.volets_open] Soleil volets OPEN: Error executing script. Unexpected error for call_service at pos 3: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/cover/init.py", line 337, in async_open_cover await self.hass.async_add_executor_job(ft.partial(self.open_cover, *kwargs)) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) File "/config/custom_components/airsend/cover.py", line 83, in open_cover if self._device.transfer(note): File "/config/custom_components/airsend/device.py", line 123, in transfer jdata = json.loads(response.text) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)