-
Notifications
You must be signed in to change notification settings - Fork 6
Description
A fresh setup on the remote (e.g. after a factory reset) leaves the integration in DISCONNECTED state. At least from the remote's view.
However, the integration is not showing any connection issue and is communicating with HA.
Sending connect events (either through web-configurator, or manually with the Core-API) has no effect, since the internal state is already CONNECTED. There's also no device_state event sent back:
integration-home-assistant/src/controller/handler/r2_event.rs
Lines 26 to 30 in bbd3f6e
| R2Event::Connect => { | |
| if self.device_state != DeviceState::Connected { | |
| ctx.notify(ConnectMsg::default()); | |
| } | |
| } |
After sleep & wakeup, the state is synchronized and the integration is working. Same happens after a reboot.
Discovered while testing unfoldedcircle/feature-and-bug-tracker/issues/237 after user reports of having to reboot the remote.
Required fixes:
- Always send the
device_stateevent back after receiving theconnectevent. - Make sure the device state is sent back after setup (might be already the case with the above fix).