Cloud issue: state are not refresh after some time
deblockt opened this issue · 0 comments
deblockt commented
After 1 or 2 day, the vacuum state is not refreshed anymore.
I can see this exception on log:
Traceback (most recent call last):
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 195, in start_state_refresh_loop
await asyncio.wait_for(self._wait_for_state_refresh(), timeout=60.0)
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
return fut.result()
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 279, in _wait_for_state_refresh
data = await self._wait_data_from_cloud()
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 245, in _wait_data_from_cloud
data = await self.reader.read(1000)
File "/usr/local/lib/python3.9/asyncio/streams.py", line 684, in read
await self._wait_for_data('read')
File "/usr/local/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Operation timed out
When I try to start to clean, I have this error:
Traceback (most recent call last):
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 107, in _send_command
await self.cloud.send_command(body)
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 180, in send_command
await self.writer.drain()
File "/usr/local/lib/python3.9/asyncio/streams.py", line 375, in drain
raise exc
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 107, in _send_command
await self.cloud.send_command(body)
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 180, in send_command
await self.writer.drain()
File "/usr/local/lib/python3.9/asyncio/streams.py", line 375, in drain
raise exc
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 195, in start_state_refresh_loop
await asyncio.wait_for(self._wait_for_state_refresh(), timeout=60.0)
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
return fut.result()
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 279, in _wait_for_state_refresh
data = await self._wait_data_from_cloud()
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 245, in _wait_data_from_cloud
data = await self.reader.read(1000)
File "/usr/local/lib/python3.9/asyncio/streams.py", line 684, in read
await self._wait_for_data('read')
File "/usr/local/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
await result
File "/config/custom_components/proscenic/vacuum.py", line 202, in async_start
await self.device.clean()
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 82, in clean
await self._send_command(b'{"transitCmd":"100"}')
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 109, in _send_command
raise VacuumUnavailable('can not connect to the vacuum. Turn on the physical switch button.')
custom_components.proscenic.vacuum_proscenic.VacuumUnavailable: can not connect to the vacuum. Turn on the physical switch button.