home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.8k stars 30.5k forks source link

Connection to KLF 200 not possible with 2024.10.2 #128236

Open Panoramiac opened 2 weeks ago

Panoramiac commented 2 weeks ago

The problem

I updated yesterday evening to the latest HA core version 2024.10.2. Before the integration with the Velux KLF 200 was working fine. I restarted now the KLF 200 and HA several times. I can connect to the KLF using the web interface. It displays the static IP (192.168.178.77), which is also configured in HA. I conclude that there seems to be an issue with the latest Core update. Screenshot_20241012_113919_Home Assistant Screenshot_20241012_113909_Home Assistant

What version of Home Assistant Core has the issue?

2024.10.2

What was the last working version of Home Assistant Core?

2024.10.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Velux

Link to integration documentation on our website

https://www.home-assistant.io/integrations/velux/

Diagnostics information

Velux Integration Restart.log

Example YAML snippet

Velux is configured via UI.

Anything in the logs that might be useful for us?

2024-10-12 11:05:23.555 DEBUG (MainThread) [pyvlx] Heartbeat __init__
2024-10-12 11:05:23.555 DEBUG (MainThread) [pyvlx] Loadig pyvlx v0.2.21
2024-10-12 11:05:23.556 DEBUG (MainThread) [homeassistant.components.velux] Velux interface started
2024-10-12 11:05:23.556 DEBUG (MainThread) [pyvlx] Connecting to KLF 200
2024-10-12 11:05:23.891 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [547685912720] Initialized trigger
2024-10-12 11:05:26.674 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.178.77 for velux
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/velux/__init__.py", line 17, in async_setup_entry
    await module.async_start()
  File "/usr/src/homeassistant/homeassistant/components/velux/__init__.py", line 67, 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.178.77', 51200)

Additional information

No response

home-assistant[bot] commented 2 weeks 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!

Code owner commands Code owners of `velux` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign velux` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


velux documentation velux source (message by IssueLinks)

Panoramiac commented 2 weeks ago

I did now a downgrade to 2024.10.1 and it is still not connecting. Currently no idea how to fix it...

After the downgrade I fixed it by installing the HACS Velux integration. Additionally a delete of the old integration config was needed. To confirm I upgrade again to 2024.10.2 and the connection is failing again.

Update 2: after a second downgrade now I do not get it connected at all. I restored a backup from Thursday and it is working again.

visionsurfer1712 commented 1 week ago

Hi, i have the same problem after Update like @Panoramiac. Any idea to fix it ?

Panoramiac commented 1 week ago

Hi, i have the same problem after Update like @Panoramiac. Any idea to fix it ?

Load an backup. This was the only way to fix it for me.

The connection was lost again and will currently not connect at all. I am lost here....

Edit 2: The communication to the KLF 200 stops always, when I try to reboot the device at 3:00 in the night: image

I disabled the reboot in the night for now. Maybe this helps others to solve the issue.

visionsurfer1712 commented 1 week ago

@Panoramiac you reboot the KLF200 every night ? It is automaticly or do you have program it ? Do you solve the problem with your solution also in the newest version of HA ?

I can load a backup, but than i can not use the newest versions of HA. It is not cool :) Can you explain a little bit more, how you disaple the reboot ? Maybe also in german ? :)

Thanks for your help.

Panoramiac commented 1 week ago

@Panoramiac you reboot the KLF200 every night ? It is automaticly or do you have program it ? Do you solve the problem with your solution also in the newest version of HA ?

I can load a backup, but than i can not use the newest versions of HA. It is not cool :) Can you explain a little bit more, how you disaple the reboot ? Maybe also in german ? :)

Thanks for your help.

Das Laden des Backups hat nicht geholfen. Langsam denke ich, mein KLF 200 ist defekt. Nach kurzer Zeit ist dieser über LAN nicht mehr erreichbar und wird in der Fritzbox als offline angezeigt. Ich habe den KLF gestern geöffnet und der WLAN Chip sieht aus als wäre er sehr heiß geworden. Momentan habe ich keine Lösung. Ggf kannst Du auch mal Deinen KLF öffnen. Mich würde interessieren wie der Chip bei Dir aussieht. 20241015_224419 20241015_230027 Ich werde die SMD Elkos die Tage mal Durchmessern, ggf sind die defekt. Grüße Tobias Edit: die gleiche Automatisierung, welche beim Neustart des HA den KLF neustartet, hatte bei mir einen zweiten Auslöser um 3 Uhr Nachts. Ich konnte sehen, dass genau ab 3 Uhr der KLF nicht mehr erreichbar war.

visionsurfer1712 commented 1 week ago

@Panoramiac ich hatte ja das gleiche Problem wie du. Ich habe nun aber mal die KLF 10 Sekunden Stromlos gemacht. Dann wieder Strom gegeben, etwas gewartet, dann HA noch mal neu gestartet und siehe da, alles läuft wieder. Zum Glück. Ich habe noch nicht geschaut oder probiert, ob die KLF auch hin und wieder eine neue Firmware bekommt oder braucht. Aber erst mal bin ich froh, dass es wieder läuft.