Track advert paths and expose them on contact sensors - #323
Open
jpettitt wants to merge 1 commit into
Open
Conversation
On ADVERTISEMENT push, fetch the advert's traversed route via GET_ADVERT_PATH (a local companion query, no RF traffic) and expose it as adv_path / adv_path_len / adv_path_time attributes on the contact binary sensor. Fetching latches off after three consecutive failures so firmware without the command isn't queried on every advert. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
When the companion pushes an
ADVERTISEMENTevent, the coordinator fetches the route that advert took (GET_ADVERT_PATH— a local device query, no RF traffic) and exposes it on the contact binary sensor asadv_path/adv_path_len/adv_path_time.Why:
out_pathonly reflects a learned return route, which stays flood-routed until a two-way exchange with the contact. The firmware records the traversed path for every advert it hears, so this makes "how was this contact last heard" visible to dashboards — e.g. meshcore-card's routing-path display, which today can only show Direct/Flood for advert-only contacts.Notes
GET_ADVERT_PATHisn't queried on every advert (retries after HA restart).🤖 Generated with Claude Code