Skip to content

Option to disconnect from HA when device enters standby #50

@zehnm

Description

@zehnm

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 and exit_standby events, but they aren't being used yet in the integration besides setting a flag:

R2Event::EnterStandby => {
session.standby = true;
}
R2Event::ExitStandby => {
session.standby = false;
// TODO send updates #5
}

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.

With the upcoming, renewed connection logic in the core (unfoldedcircle/feature-and-bug-tracker#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 (unfoldedcircle/feature-and-bug-tracker#301). Assumption: remote is in standby and HA tries to send entity change events over the still open WebSocket connection.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions