-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
Remove Velux KLF disconnection on HA stop event #47465
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems weird that we would not cleanly disconnect. Why is an automation even necessary to reboot. Seems like we're now asking each used to solve the same problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some hours of operation the KLF200 Gateway refuses new connections. If HA restarts, the connection build-up run into timeout during SSL Handshake. So if I start a reboot of the KLF200 before HA shutdown I can establish a new connection after HA is rebooted. Finall it's just a workaround. A disconnect function is considered in the destructor of pyvlx.connection, so I think it will not change much to remove this functionality on HA component side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes of course it would be much simpler for the user if we hardcode that, so they will not need to create an automation for that. Only point to consider is that KLF200 starts a wifi access point after each reboot where you can perform configurations. It's usually protected by a password if the user does not remove that. In the standard configuration this access point will be closed after some minutes. Finally my safety concerns are the reason not to hardcode this automation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pawlizio : IMO all explicit disconnects are preferred bc then the disconnects happen in a controlled way. I guess als hass-shutdown process waits untill the disconnect is finished.
But yes, this buggy behavior of the KLF 200 gateway is annoying. There is another PR from you #42773 - where you implemented an explicit service to reboot the gateway from time to time. Isn't this the better approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid point m-/ .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reboot service is already available in the component and yes you can start them periodically. But my preferred way was to initiate the reboot in parallel to a HA restart. Main concern was to reduce the amount of unnecessary KLF reboots and the corresponding opening of the Wifi Access Point to a bare minimum.