Conversation
bharat
marked this pull request as ready for review
August 17, 2026 02:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the optional phase from the MQTT panel events design doc: zone state parity with HTTP, without polling.
When
--mqtt-zones(or[mqtt] zones = true) is set, every ZONE_STATUS / ZONE_DATA message publishes a retained per-zone state to{prefix}/zone/{number}/state. The payload mirrors the/zonesREST field names (partition, area, group, number, name, state, type) and adds atrippedboolean, so MQTT consumers do not need to reimplement state-list parsing. The bootstrap zone scan publishes all zones at startup, and retained delivery means late subscribers (or a restarting Home Assistant) see current state immediately.With
--mqtt-discovery-prefix homeassistant(or[mqtt] discovery_prefix), a retained Home Assistant MQTT discovery config is also published once per zone, so zone binary sensors appear in HA automatically, grouped under a Concord232 device, with availability bound to{prefix}/status. A last-will message now marks{prefix}/statusoffline (retained) so availability tracks reality when the server dies.Both features are opt-in and default off; existing MQTT behavior (ALARM / TOUCHPAD events, online status) is unchanged apart from the added LWT. Zone publishing is decoupled from the panel interface via a small handler factory so it stays unit-testable; 5 new tests cover payload shape, retained publishing, one-time discovery, the disabled path, and merged-record lookup.
Context: we run this server against a Concord 4 with Home Assistant consuming
/zonesat a 1 second poll. This lets us retire that polling entirely.Design doc table updated to reflect the implemented topic shape.