Add some workaround logic to poll devices that are unavailable for a longer period of time #359
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.
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