Closed PrathikGopal closed 2 years ago
the case is clear, I will finalize it in the next version.
fixed in the version https://github.com/dmamontov/hass-ledfx/releases/tag/v1.1.2
@PrathikGopal please check, if it does not help, logs will be needed.
@dmamontov , thats great.. thanks. I just tested and it reloads buttons back once i restart LEDFX sessions. But one issue though.. once I restarted HA it wont reload them anymore(had to re-add them only to see it fail on HA restarts)
@PrathikGopal And hass was reloaded and ledfx was disabled? is there anything in the logs?
Below from ha logs,
This error originated from a custom integration.
Logger: homeassistant.config_entries Source: custom_components/ledfx/core/worker.py:347 Integration: LedFx (documentation, issues) First occurred: 12:54:11 AM (1 occurrences) Last logged: 12:54:11 AM
Error setting up entry 192.168.0.2:8888 for ledfx Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 127, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 1516, in connect_tcp await get_running_loop().create_connection(StreamProtocol, host, port, File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection raise exceptions[0] File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.0.2', 8888)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions yield File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 101, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 184, in connect_tcp raise OSError('All connection attempts failed') from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions yield File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 291, in handle_async_request resp = await self._pool.handle_async_request(req) File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 244, in handle_async_request raise exc File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 228, in handle_async_request response = await connection.handle_async_request(request) File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request raise exc File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.9/site-packages/httpcore/backends/auto.py", line 23, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 101, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/config/custom_components/ledfx/core/ledfx.py", line 36, in get response = await client.get( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1736, in get return await self.request( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1513, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1600, in send response = await self._send_handling_auth( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1628, in _send_handling_auth response = await self._send_handling_redirects( File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1665, in _send_handling_redirects response = await self._send_single_request(request) File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1702, in _send_single_request response = await transport.handle_async_request(request) File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 291, in handle_async_request resp = await self._pool.handle_async_request(req) File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/config/custom_components/ledfx/core/worker.py", line 342, in async_setup await self.api.info() File "/config/custom_components/ledfx/core/ledfx.py", line 112, in info return await self.get("info", False) File "/config/custom_components/ledfx/core/ledfx.py", line 44, in get raise exceptions.LedFxConnectionError() custom_components.ledfx.core.exceptions.LedFxConnectionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/ledfx/init.py", line 65, in async_setup_entry if not await worker.async_setup(): File "/config/custom_components/ledfx/core/worker.py", line 347, in async_setup raise ConfigEntryNotReady NameError: name 'ConfigEntryNotReady' is not defined
Excellent work! Apologies on delayed response...was quite late last night. Tested all scenarios and its all solved now. If you need me to test anything further please let me know. Thank you once again for solving this in short time.
Thank you) If you have any questions, write) If you need to test something, I'll let you know)
Thank you for taking time to make this add-on, im using it ever since the first release.
I have many LEDFX sessions running... some of them passive and only activated when i switch on my MAC as such, But the interface in integrations doesn't reload the buttons once the LEDfx is active. Any way you to reconnect once the session is online. Appreciate your insight.