Skip to content
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

Add some workaround logic to poll devices that are unavailable for a longer period of time #359

Merged
merged 4 commits into from
Jul 12, 2023

Conversation

marcelveldt
Copy link
Contributor

@marcelveldt marcelveldt commented Jul 12, 2023

Add a workaround that if a device is unavailable for a longer period of time (e.g. unplugged from power), we will fallback to regular polling (every 10 minutes) to detect if the device came back alive, just like we do with any devices that are offline when we startup the server.

By default we will use the resubscription logic within the SDK but if that resubsciption interval is higher then ours, we stop the subscription and create a job to poll this node on 10 minute intervals.

This is a workaround until the OperationalNodeDiscovery is implemented in the SDK, that way we can much more efficiently detect if a node is back online due to acting on the mdns packets.

Fixes #354

@marcelveldt marcelveldt added the bugfix Pull request that fixes a (known) issue/bug label Jul 12, 2023
@marcelveldt marcelveldt merged commit c5341f6 into main Jul 12, 2023
4 checks passed
@marcelveldt marcelveldt deleted the poll-unavailable branch July 12, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull request that fixes a (known) issue/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devices fail to be detected as online and reconnect to matter server after downtime
2 participants