Closed frr032 closed 7 minutes ago
Hey there @julius2342, @deermaximum, mind taking a look at this issue as it has been labeled with an integration (velux
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
velux documentation velux source (message by IssueLinks)
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.159', 51200)
means that the target system did not accept the connection request - maybe the KLF 200 gateway is not reachable anymore or needs to be rebooted?
mib1185 Thanks so much for the reply.
The KLF 200 gateway is active and responds to pings even when the integration does not load. It normally works "most" of the time. However, at times, especially when HA is restarted, the integration does not load. I have an automation that reboots the KLF 200 on HA shutdown by calling this service: Velux: Reboot gateway. It also has been rebooted many times after HA has restarted, and this does not seem to consistently fix the issue. It does sometimes. I have a controllable outlet on the KLF 200 so I can remotely reboot it. I'm new to HA.
How would I detect that the Velux integration has an issue so I can run an automation to reboot the KLF 200 gateway by cycling its power. It may take several reboots.
Also, for a long time I originally, used the Velux integration that needed to be manually installed and configured. I recently changed to the integration that is configured through the UI.
The original integration seemed more stable and had several more useful entities. Things like velocity, connection counter, How would I get those entities back?
Same issue here.
2024-07-12 18:32:34.764 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.2.11 for velux Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/velux/init.py", line 52, in async_setup_entry await module.async_start() File "/usr/src/homeassistant/homeassistant/components/velux/init.py", line 102, in async_start await self.pyvlx.load_scenes() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 106, in load_scenes await self.scenes.load() File "/usr/local/lib/python3.12/site-packages/pyvlx/scenes.py", line 56, in load await get_scene_list.do_api_call() File "/usr/local/lib/python3.12/site-packages/pyvlx/api/api_event.py", line 29, in do_api_call await self.pyvlx.check_connected() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 83, in checkconnected await self.connect() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 58, in connect await self.connection.connect() File "/usr/local/lib/python3.12/site-packages/pyvlx/connection.py", line 103, in connect self.transport, = await self.loop.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1149, in create_connection transport, protocol = await self._create_connection_transport( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1182, in _create_connection_transport await waiter ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection
@julius2342, @deermaximum maybe you have further ideas what could be checked?
Guys, are you using the reboot service ? the KLF only allows one connection, so when you restart HA, the next connection sometimes fails its described here: https://www.home-assistant.io/integrations/velux/#service-veluxreboot_gateway
Guys, are you using the reboot service ?
Thanks for the workaround. However, IMHO this should be built into the code. When I compared the custom integration with this official one, I found that this is exactly the difference that makes this one stop working. I added the code in the DEV container and connected the instance to the gateway. When shutting down HASS, sure enough the gateway rebooted and after starting the instance again, it could connect as expected.
I consider to contribute the code but my knowledge in Python is limited to say the least and I could not write a working unit test for the new code. I am not sure if this would be accepted by the maintainers.
i believe it was part of the new pyVlx component already , we need to wait for it
i believe it was part of the new pyVlx component already , we need to wait for it
It is. This is the code I compared. What do you mean “we need to wait for it”? I didn’t read anything about that one replacing this one.
There was a PR to update the pyvlx component in the HA core , but not approved yet
Same issue here as described above:
Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 28 August 2024 at 07:47:12 (2 occurrences)
Last logged: 10:04:14
Error setting up entry 192.168.1.12 for velux
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/velux/__init__.py", line 52, in async_setup_entry
await module.async_start()
File "/usr/src/homeassistant/homeassistant/components/velux/__init__.py", line 102, in async_start
await self.pyvlx.load_scenes()
File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 106, in load_scenes
await self.scenes.load()
File "/usr/local/lib/python3.12/site-packages/pyvlx/scenes.py", line 56, in load
await get_scene_list.do_api_call()
File "/usr/local/lib/python3.12/site-packages/pyvlx/api/api_event.py", line 29, in do_api_call
await self.pyvlx.check_connected()
File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 83, in check_connected
await self.connect()
File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 58, in connect
await self.connection.connect()
File "/usr/local/lib/python3.12/site-packages/pyvlx/connection.py", line 103, in connect
self.transport, _ = await self.loop.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1122, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1104, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1007, in _connect_sock
await self.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 ('192.168.1.12', 51200)
Same issue here as described above:
Follow the workaround described by @pergolafabio. Works like a charm for me.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
When I restart HS the Velux integration does not load. See the log entry below.
What version of Home Assistant Core has the issue?
2024.7.1
What was the last working version of Home Assistant Core?
2024.6.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Velux
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
This integration is important to me as it closes my skylights when it starts to rain.
Clicking on Known Issues in the Velux integration and log a new issue brought me here. If this is placed in the incorrect area please direct me on where to log this issue. Thanks for your help!