Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not reconnect to KLF after reboot #59

Open
pflugj opened this issue Jan 7, 2025 · 6 comments
Open

Could not reconnect to KLF after reboot #59

pflugj opened this issue Jan 7, 2025 · 6 comments

Comments

@pflugj
Copy link

pflugj commented Jan 7, 2025

Just to let you know.

Today after updating HA to Version 2025.1
the Velux Integration 2.9.15 did not reconnect to the KLF.

I had to restart the KLF gateway and it did reconnect.
So everything is OK!

BTW: Is there a way to get the:
rainsensor
Solarpanel Voltage
battery status

Thanks for this integration and all your efforts.
Cheers
Jurgen

@pflugj
Copy link
Author

pflugj commented Jan 8, 2025

It happened again this morning, after a restart of HA :-(
...as before, restarting KLF does the trick

@Puncher4444
Copy link

Puncher4444 commented Jan 16, 2025

Have a look to the integration page on Home Assistant site: https://www.home-assistant.io/integrations/velux

Reboots the configured KLF 200 Gateway.

There is a problem with the KLF 200 gateway where the connection cannot be established after a restart of Home Assistant, only a manual power off and on fixes this. As a workaround, you can use an automation to force a restart of the KLF 200 before exiting Home Assistant, like this:

automation:
  - alias: "KLF reboot on hass stop event"
    description: "Reboots the KLF200 in order to avoid SSL Handshake issue"
    triggers:
      - trigger: homeassistant
        event: shutdown
    actions:
      - action: velux.reboot_gateway

@pflugj
Copy link
Author

pflugj commented Jan 16, 2025

Hi, thanks for the hint!

I actually had this automation but at one stage (a couple of weeks ago?)
it gave me errors and I disabled it, and I had no problems after reboots.

In the description at
https://github.com/pawlizio/my_velux
custom_components/velux > removed reboot gateway > 3weeks ago
I guess that' s what causes my problem.

Today I had a look again and I found that the "action" event name has changed.
Mine looked like this:
action: velux.reboot_gateway

Today I created the automation again and found that the "action" had changed to:
action: velux.velux_klf_lan_7985_reboot

Wy and how that had changed? I don't know.
Maybe this is now the service implemented in HA core?

@pawlizio
Copy link
Owner

Hi together,

with version 2.9.15 the reboot of KLF200 on HA stop/restart is done automatically without the need of any further automation by the user. In order to identify the root cause for the observed problems I would appreciate to receive the logs of pyvlx and custom_module velux using the configuration.yaml entry:

logger:
  default: warning
  logs:
    pyvlx: debug
    custom_components.velux: debug

Probably the home-assistant.log will be emtpied on HA start, so the entries of the log during HA shut-down phase are probably no longer visible in that file. Please check your root directory for files like "home-assistant.log.1" as they should have also the log entries from last HA sessions and therefore contain the the full shut-down phase.

Image

Also you are right that the reboot action has been renamed due to the fact that people with multiple KLF200 devices was not able to reboot all of them, so it was necessary for every setup to define an individual name. Actually I think the action service should be removed and replaced as we have the reboot button on the KLF200 device page which can be used in case someone would like to manually trigger a reboot.:

Image

@pflugj
Copy link
Author

pflugj commented Jan 17, 2025

Good morning.
I did a normal reboot with the Custom KLF reboot automation "disabled".
After the reboot the Velux integration shows this:

Image

The Log file should be here:
home-assistant.log.1.txt

In entities I find this:

Image

Image

If you need anything else, please let me know!
Thanks for helping
Cheers

@pflugj
Copy link
Author

pflugj commented Jan 17, 2025

Hi again.
I removed the Velux setting and the integration and then reinstalled via HACS.
Looks like the error is gone.
I now see a the device "io-homecontrol interface"

Image

I am not totally sure, but I believe this wasn't there before --- puzzled
Something must somewhere have gone wrong.

I pressed the button and also rebooted and it works as expected.

Sorry for the trouble I might have caused

BTW: Is it possible to retrieve the windows rain-sensor and battery status of the windows?

Thanks again the brilliant integration and of course for helping!
cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants