Repository navigation
Releases: khaledez/camonitor
Release list
v0.10.2 — Gree handshake no longer cancelled by poll timeout
What's fixed
v0.10.1's broadcast fallback worked in isolation but stayed offline in the real deployment: the poll loop hands Status a 4s context, and a broadcast-only handshake (scan + 4s unicast timeout + broadcast bind) outlives it. workCtx propagated the deadline expiry as a cancellation, so every poll killed the handshake right at the broadcast bind — the AC never came online.
Change
workCtxnow drops a caller's deadline expiry and only propagates an explicit cancel (parent.Err() == context.Canceled). The client bounds the handshake (12s) and status read (4s) itself.- Regression test: the broadcast-only handshake completes even under a short caller deadline.
- Verified against the real AC with a 500ms caller deadline → online.
Rollout
ghcr.io/khaledez/camonitor:0.10.2 (pinned image bump follows).
v0.10.1 — Gree broadcast fallback
What's fixed
The Gree AC was unreachable from the k8s deployment. This unit's firmware (V1.2.1) never answers a bind sent to its unicast address — it only responds to packets addressed to the LAN broadcast. The client sent the bind handshake and every status/command to the unit's unicast address, so the AC stayed permanently offline even though it answered the discovery scan.
Changes
- Broadcast bind fallback: try the unicast bind first (most units answer it), fall back to the broadcast address on a timeout, and remember which mode the unit wants so status/commands keep going the same way.
- Self-healing mode: if a broadcast-only unit is later replaced by one that answers unicast, the client re-learns the mode instead of staying stuck on broadcast.
- Faster reconnects: a known broadcast-only unit skips the wasted unicast attempt.
- Handshake timeout: the discovery+bind handshake now has its own budget so a cold start isn't truncated by the short status-read context, and the UDP reads honour context cancellation.
- Tests: hermetic broadcast-only unit test plus a context-semantics test; verified against the real AC (online, mode cool, set 24°C).
Rollout
Rebuild/roll the monitor deployment to pick up ghcr.io/khaledez/camonitor:0.10.1 (pinned image bump follows in a separate commit).
v0.1.0
Full Changelog: https://github.com/khaledez/camonitor/commits/v0.1.0