JoDehli / PyLoxone

Python Loxone binding
Apache License 2.0
162 stars 40 forks source link

[Issue]: Unable to connect #222

Closed XDSvennyXD closed 5 months ago

XDSvennyXD commented 5 months ago

Describe the bug

Unable to connect properly. Tried to reinstall everything.

Firmware of your Miniserver

14.4.9.25

HomeAssistant install method

VM with Manual Installation

Version of HomeAssistant

Core 2023.12.1 Supervisor 2023.11.6 OS 11.2 Frontend 20231208.2

Version of Pyloxone

0.4.12

Update pyloxone

yes

Log

2023-12-11 19:45:42.571 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-12-11 19:45:42.571 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration loxone which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-12-11 19:45:49.697 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 135, in getJson my_response = await client.get(LOXAPPPATH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1703, in _send_handling_redirects raise exc File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 67, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 401 2023-12-11 19:45:50.092 ERROR (MainThread) [homeassistant.components.binary_sensor] rpi_power: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 575, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/rpi_power/binary_sensor.py", line 52, in update value = self._under_voltage.get() ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' 2023-12-11 20:52:05.504 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:138e8dfa-781b-1729-9d46-b460f9e9f1c4, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.88.113\', port=2870, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-8598943486133208061), OSError(113, "Connect call failed (\'192.168.88.113\', 2870)"))', None) 2023-12-11 20:52:14.720 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:138f1798-781b-1729-bcfa-97fbc85bc19d, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.88.113\', port=2870, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-8598943486133208061), OSError(113, "Connect call failed (\'192.168.88.113\', 2870)"))', None) 2023-12-11 20:52:20.247 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.kd_55xe7005 is taking over 10 seconds 2023-12-11 20:52:20.247 WARNING (MainThread) [homeassistant.components.media_player] Updating dlna_dmr media_player took longer than the scheduled update interval 0:00:10 2023-12-11 20:59:11.944 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 135, in getJson my_response = await client.get(LOXAPPPATH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1703, in _send_handling_redirects raise exc File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 67, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 401 2023-12-11 20:59:48.445 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 135, in getJson my_response = await client.get(LOXAPPPATH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1703, in _send_handling_redirects raise exc File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 67, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 401

JoDehli commented 5 months ago

@XDSvennyXD if you have a gen2 miniserver use local access and not the cloud address.

XDSvennyXD commented 5 months ago

@JoDehli Hi, it is Gen2. What do you mean by local access? i used my local IP-Adress for the connection. firefox_QRNLHOT4Ep

JoDehli commented 5 months ago

@XDSvennyXD try a different port than 80.

XDSvennyXD commented 5 months ago

@JoDehli I tried 8080, 80, 443. Which one else do you recommend?

JoDehli commented 5 months ago

@XDSvennyXD I use 8080. So the port should not be a problem.

XDSvennyXD commented 5 months ago

@JoDehli Thats what i got with Port 8080:

`2023-12-11 19:45:42.571 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-12-11 19:45:42.571 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration loxone which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-12-11 19:45:49.697 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 135, in getJson my_response = await client.get(LOXAPPPATH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1703, in _send_handling_redirects raise exc File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 67, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 401 2023-12-11 19:45:50.092 ERROR (MainThread) [homeassistant.components.binary_sensor] rpi_power: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 575, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/rpi_power/binary_sensor.py", line 52, in update value = self._under_voltage.get() ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' 2023-12-11 20:52:05.504 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:138e8dfa-781b-1729-9d46-b460f9e9f1c4, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.88.113\', port=2870, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-8598943486133208061), OSError(113, "Connect call failed (\'192.168.88.113\', 2870)"))', None) 2023-12-11 20:52:14.720 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:138f1798-781b-1729-bcfa-97fbc85bc19d, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.88.113\', port=2870, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-8598943486133208061), OSError(113, "Connect call failed (\'192.168.88.113\', 2870)"))', None) 2023-12-11 20:52:20.247 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.kd_55xe7005 is taking over 10 seconds 2023-12-11 20:52:20.247 WARNING (MainThread) [homeassistant.components.media_player] Updating dlna_dmr media_player took longer than the scheduled update interval 0:00:10 2023-12-11 20:59:11.944 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 135, in getJson my_response = await client.get(LOXAPPPATH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1703, in _send_handling_redirects raise exc File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 67, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 401 2023-12-11 20:59:48.445 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 135, in getJson my_response = await client.get(LOXAPPPATH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1703, in _send_handling_redirects raise exc File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 67, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 401 2023-12-11 21:37:58.548 WARNING (Thread-4) [pychromecast.socket_client] [Chromecast(192.168.88.145):8009] Heartbeat timeout, resetting connection 2023-12-11 21:37:59.553 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Chromecast at 192.168.88.145 2023-12-11 21:38:28.579 ERROR (Thread-4) [pychromecast.socket_client] [Chromecast(192.168.88.145):8009] Failed to connect to service ServiceInfo(type='host', data=('192.168.88.145', 8009)), retrying in 5.0s 2023-12-11 21:56:19.678 ERROR (MainThread) [frontend.js.latest.202312082] Uncaught error from Firefox 120.0 on Windows 10 TypeError: this.contentElement is null renderHeading (src/components/ha-dialog.ts:51:4) apply (src/scoped-custom-element-registry.js:262:44) mainWindow.history.pushState (src/dialogs/make-dialog-manager.ts:129:7) 2023-12-11 22:27:20.963 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 168, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2202, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection sock = await self._connect_sock( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.88.7', 8080)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions yield File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 230, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions yield File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 366, in handle_async_request resp = await self._pool.handle_async_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request raise exc File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request response = await connection.handle_async_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request raise exc File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request stream = await self._connect(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 124, in _connect stream = await self._network_backend.connect_tcp(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp return await self._backend.connect_tcp( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 112, in connect_tcp with map_exceptions(exc_map): File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 105, in getJson api_resp = await client.get("/jdev/cfg/apiKey") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 365, in handle_async_request with map_httpcore_exceptions(): File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed 2023-12-11 22:27:26.666 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 168, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2202, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection sock = await self._connect_sock( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.88.7', 8080)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions yield File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 230, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions yield File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 366, in handle_async_request resp = await self._pool.handle_async_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request raise exc File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request response = await connection.handle_async_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request raise exc File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request stream = await self._connect(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 124, in _connect stream = await self._network_backend.connect_tcp(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp return await self._backend.connect_tcp( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 112, in connect_tcp with map_exceptions(exc_map): File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/init.py", line 166, in async_setup_entry if not await miniserver.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/miniserver.py", line 133, in async_setup request_code = await self.lox_config.getJson() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/loxone/api.py", line 105, in getJson api_resp = await client.get("/jdev/cfg/apiKey") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 365, in handle_async_request with map_httpcore_exceptions(): File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed `

JoDehli commented 5 months ago

@XDSvennyXD 401 message means you have supplied bad credentials. If you had tried it to often with wrong credentials your IP is blocked. So you have 2 options wait as certain amount of time or get a other IP address.

XDSvennyXD commented 5 months ago

@JoDehli OK then i wait till its resets. Thanks