In certain environments this works quite well and the HA connection is immediately available after WiFi is connected. However, this can also cause connectivity issues after the device wakes up and take longer to detect a no longer working WebSocket connection.
This might also help with the following HA server log entries: Client unable to keep up with pending messages (https://github.com/unfoldedcircle/feature-and-bug-tracker/issues/301). Assumption: remote is in standby and HA tries to send entity change events over the still open WebSocket connection.
When running on the Remote Two device, the WebSocket connection to the HA server is currently kept open when the device enters suspend mode.
The Remote Two sends the
enter_standby
andexit_standby
events, but they aren't being used yet in the integration besides setting a flag: https://github.com/unfoldedcircle/integration-home-assistant/blob/6cbc80eb01708e5f4ab96bca643b01c77b64c8d0/src/controller/handler/r2_event.rs#L36-L42In certain environments this works quite well and the HA connection is immediately available after WiFi is connected. However, this can also cause connectivity issues after the device wakes up and take longer to detect a no longer working WebSocket connection.
With the upcoming, renewed connection logic in the core (https://github.com/unfoldedcircle/feature-and-bug-tracker/issues/320) the integration should disconnect from HA when entering standby, and immediatly reconnect when receiving the
exit_standby
event.This might also help with the following HA server log entries:
Client unable to keep up with pending messages
(https://github.com/unfoldedcircle/feature-and-bug-tracker/issues/301). Assumption: remote is in standby and HA tries to send entity change events over the still open WebSocket connection.