-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scanner, Discovery and Controller enhancements #473
Merged
Merged
Conversation
This file contains 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
Before this change the cache forgot any former cached entries on clear which do not allow to iterate over them.
Also make sure that all addresses from same matterserver over all interfaces gets combined (a respinse on anotehr netInterface was clearing out other entries evenually). ANd make sure to only request more adddresses if nothing is existing after checking ttls
This one is set differently according to the discovery methods (IP/BLE) but allows to use it as a unique field.
And allow promises and Promise generate functions as input
When the connection should be resumed we in parallel poll the device last known address evener 10mins (for devices that do not announce itself when coming back online) but also add continuous discovery run without a timeout to get notified when the device comes back online and announce itself.
This has the effect that when a command is being executed but the device is not reachable and so the InteractionClient gets resumed, we only do this for 60s. Then the command fails.
The callback is called for each discovered device and at the end the final result is returned
Make sure that defined callbacks are also used after commissioning in the created PairedNode instance and not lost
Alternatively to identifierData also an "CommissionableDevice" returned by discovery method can be used for commissioning. This first tries the addresses already discovered.
disconnect should not remove resumption records or such, removal should do that.
This commit is introducing a node state and a corresponding callback to inform the developer about state changes of the node. Additionally all callbacks are enhanced by the nodeId of the node the change happens. With this also generic callbacks can be provided when connecting to all nodes at once and the result can still be handled by node. Node state also supports "structure changed" info when a bridge structure changed and was updated internally to reprocess the device objects if needed.
... but only update whats changed and reuse unchanged
lauckhart
approved these changes
Nov 6, 2023
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.
This PRS combines the following changes
MDNS Scanner respecs now also record expiries and removes records from the own cache
MDNS scanner allows to scan continuously (to get a trigger when a node comes back online)
MDNS scanner allows to continue a scan and ignore alteady discovered entries
Controller now allows to scan for BLE and IP in parallel
Controller now allows to scan for commissionable devices for a defined timeframe but get callbacks on discovery of a new entry. This is usefull for UIs
Controller now allows to use a discovered device (aka object returned by discovery process) als for commissioning whcih will use the just discovered addresses before rediscovering
PairedNode maintains a connection state of the node (connected, disconncted, reconnecting, wait-for-device-discovery)
PairedNode also reacts now to bridge structure changes, updates it's structure and notifies the developer about it
Shell got enhanced by several new commands and options
Addresses https://github.com/orgs/project-chip/projects/11/views/1?pane=issue&itemId=36546943
Addresses https://github.com/orgs/project-chip/projects/11/views/1?pane=issue&itemId=40550305
Addresses https://github.com/orgs/project-chip/projects/11/views/1?pane=issue&itemId=36541600
Addresses https://github.com/orgs/project-chip/projects/11/views/1?pane=issue&itemId=36165544