So I have this Epson projector that I can turn on/off via HA, but it becomes unavailable regularily.
If that happens the only solution/workaround to make my Hassio reconnect to the projector is a complete reboot of the system.
So there are 2 possible solutions that would work for me:
A) Find a way, that it just tries to reconnect to the projector without having to reboot the whole system.
B) Create an automation that reboots the system when the projector gets disconnected.
When the projector becomes unavailable, it says in Lovelace:
No state available for media_player.epson_projector
entity: media_player.epson_projector
type: media-control
Log:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/epson_projector/main.py", line 129, in send_request
headers=self._headers) as response:
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 941, in create_connection
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 464, in sock_connect
return await fut
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/epson/media_player.py", line 142, in async_update
is_turned_on = await self._projector.get_property(POWER)
File "/usr/local/lib/python3.7/site-packages/epson_projector/main.py", line 98, in get_property
type='json_query')
File "/usr/local/lib/python3.7/site-packages/epson_projector/main.py", line 138, in send_request
return response
File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 45, in __exit__
self._do_exit(exc_type)
File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 92, in _do_exit
raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError