feat(mqtt): expose client and traffic telemetry to Home Assistant - #402
Merged
Merged
Conversation
Add aggregated client telemetry (total, Wi-Fi/wired split, weak-signal count and cumulative RX/TX bytes) to the MQTT state, with the matching discovery entities. Built from the existing client probe, cached briefly so the periodic publish does not add a second fork storm on top of the panel's requests. Per-client entities are intentionally out of scope: a network with 100+ clients would flood Home Assistant.
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.
Extends the MQTT state and Home Assistant discovery with aggregated client telemetry, built from NetGrip's own client probe (no NetPulse server involved):
New sensors in Home Assistant: Clients, Wi-Fi clients, Wired clients, Weak-signal clients and the RX/TX totals. Per-client entities are intentionally out of scope (100+ clients would flood Home Assistant).
The probe is cached briefly so the periodic publish does not add a second fork storm on top of the panel's own requests.
Verification:
go test ./...andgo vetpass. Deployed on two routers, Home Assistant created the new entities (19 per router) and the live aggregation reported real client counts (48 clients on the busiest one). The byte totals read zero without per-client counters/nlbwmon; they populate where the router exposes them.Closes #401