Repository navigation
Pin the device identity contract - #38
Open
drHouse-gif wants to merge 1 commit into
Open
drHouse-gif wants to merge 1 commit into
drHouse-gif wants to merge 1 commit into
Conversation
The inventory is keyed by serial, which is the device's mac. An endpoint starts keyed by host and promote_endpoint_to_serial re-keys it once a probe reads the mac, merging into an existing serial-keyed entry rather than adding a second one. That merge is what stops one device appearing twice when it is both entered manually by IP and announced over mDNS, and nothing currently covers it. Three tests: the same device from both sources is listed once with one channel; enabling that channel registers exactly one service rather than one per source; and two devices reporting the same mac collapse into a single stable entry. The third is a characterisation test, not a fix. The mac is the only identity the Shelly RPC API offers, so two physically distinct devices reporting the same one take the same code path as one device reachable at two addresses, with the same signals available at promotion time. It asserts that the driver at least stays stable: one entry, one recorded host, holding rather than flapping. No driver changes.
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.
The inventory is keyed by serial, which is the device's mac. An endpoint starts keyed by host and promote_endpoint_to_serial re-keys it once a probe reads the mac, merging into an existing serial-keyed entry rather than adding a second one. That merge is what stops one device appearing twice when it is both entered manually by IP and announced over mDNS, and nothing currently covers it.
Three tests: the same device from both sources is listed once with one channel; enabling that channel registers exactly one service rather than one per source; and two devices reporting the same mac collapse into a single stable entry.
The third is a characterisation test, not a fix. The mac is the only identity the Shelly RPC API offers, so two physically distinct devices reporting the same one take the same code path as one device reachable at two addresses, with the same signals available at promotion time. It asserts that the driver at least stays stable: one entry, one recorded host, holding rather than flapping.
No driver changes.