Home Assistant release with the issue:
0.95.4
Last working Home Assistant release (if known):
None
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io
Component/platform:
switcher-kis
Description of problem:
When restarting home assistant, sometimes the switcher will be unavailable. When this happens, I'd expect to restore to a known state and try to connect over time, rather than presenting the user with a configuration failed error and requiring to restart home assistant.
On a related note I discovered that when I'm connected to my home network with my phone, home assistant most of the times won't discover the component. Only if I connect from outside the network, the switcher is always discovered.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
switcher_kis:
phone_id: !secret switcher_phone_id
device_id: !secret switcher_device_id
device_password: !secret switcher_device_password
Traceback (if applicable):
Additional information:
Hey there @tomerfi, mind taking a look at this issue as its been labeled with a integration (switcher_kis) you are listed as a codeowner for? Thanks!
_This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people._
@tsvi
I'll take another look as soon as I can.
Considering it's a push integration, reconnecting over time can be easily accomplished by cancelling the 10s timeout while retrieving the initial device data here.
But I'm not sure that type of PR will get approved.
Another solution I can think about, that might even be better for the long run, is to convert this integration from push to pull.
The upside is of course a much more reliable integration,
The downside is downgrading the state updates intervals.
The push integration update the state every 4s via udp broadcast messages.
The pull integration, which will get the state via tcp requests, I think it will best interval with no less then 30s.
Can't we restore the device info from our previous connection? meaning, once we connected, we have the connection data. Store it, and then restore the device from there. Try to reconnect every 10 sec even if on the initial connection during Hass startup the device is not connected.
This will also be a problem if you have a power outage and switcher is not connected to the network yet during the time of Hass startup.
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 now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still an issue. The device should not fail configuration on restart once it has been detected. Rather an unknown state should be given and homeassistant should continue polling until the device reconnects to the network.
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 now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I'm sorry for the delayed response.
I never really managed to simulate this kind of network outage in my environment.
Both solutions I've offered, either removing the 10s timeout or switching to the pull approach, might offer a solution to the described situation, and might not, as stated, I was unable to replicate this situation in my environment.
On another tone, this component is due for some major improvements for a long time, and I was, unfortunately, unable to make myself available to do so.
Once I'll get to it, I promise to take another look at this issue.
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 now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.