leeyuentuen / alfen_wallbox

Alfen wallbox - Home Assistant Component
MIT License
64 stars 12 forks source link

Unexpected error creating device. #145

Open tweinberger-lei opened 2 months ago

tweinberger-lei commented 2 months ago

When adding a new device I receive error: Unexpected error creating device.

I got another device with the same firmware, which works fine (model: NG910-60123, software: 6.6.2-4312, hardware control board: B-07)

Please check - thank you!

Here is the debug log:

2024-09-09 15:43:31.196 ERROR (MainThread) [custom_components.alfen_wallbox.config_flow] ClientError Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1073, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection raise first_exception File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 81, in start_connection sock = await _connect_sock( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 166, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') OSError: [Errno 113] Connect call failed ('172.16.103.43', 443)

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

Traceback (most recent call last): File "/config/custom_components/alfen_wallbox/config_flow.py", line 53, in _create_device await device.init() File "/config/custom_components/alfen_wallbox/alfen.py", line 105, in init await self.get_info() File "/config/custom_components/alfen_wallbox/alfen.py", line 128, in get_info response = await self._session.get( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 657, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 564, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 975, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1350, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1319, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1088, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 172.16.103.43:443 ssl:<ssl.SSLContext object at 0x7fb71e206250> [Connect call failed ('172.16.103.43', 443)]

leeyuentuen commented 2 months ago

are you sure there is no active connection to the wallbox? seems that the IP can't reach due the IP is not exists or occupied