Skip to content

Control commands sent while disconnected are silently dropped #5

Description

@aramshaw

Summary

During the overnight controller outage (#4), the 05:30 "turn on AC" automation fired and the client wrote the control message straight into the dead socket - it was silently lost (no ACK, no error surfaced to Home Assistant):

05:30:00.228 Sending AcControlMessage with data: 55:55:80:b0:01:c0:00:0c:22:00:...  (0x22 power-on)
05:30:00.229 Connecting to 192.168.4.45 on port 9200
05:30:25.647 WARNING Could not connect to host 192.168.4.45

No read/ACK followed. So a command issued while disconnected is written to a stale/dead writer and dropped, with nothing surfaced upward - the automation appears to succeed but the AC never turns on. This is the concrete reason the morning automation silently failed.

Suggested fix

  • In At2PlusClient.send (or the control helpers), raise a clear exception when not connected, so the HA service call fails visibly instead of silently dropping the command.
  • HA-side, integration v0.3.2 now reports entities unavailable when disconnected, but HA does not automatically block service calls to unavailable entities, so a library-level guard is the robust fix.

Severity

Medium - silent loss of control commands during a controller outage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions