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

Monitoring device connection state changes #109

Open
edWin-m opened this issue Mar 27, 2023 · 1 comment
Open

Monitoring device connection state changes #109

edWin-m opened this issue Mar 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@edWin-m
Copy link
Contributor

edWin-m commented Mar 27, 2023

@pierredelisle Besides manually updating the device's online status based on whether we can successfully exchange the deviceId/nodeId for the connectedDevicePointer via getConnectedDevicePointer(nodeId: Long),
Is there another way to monitor the device connection state that can pass as the device's online status in the App?
For instance, by subscribing to state change messages that can be received when the device has established/re-established a connection with the controller or has lost that connection.

@pierredelisle
Copy link
Contributor

Being able to properly detect that a device is offline is something I looked at briefly in the past, but I could not find an appropriate API in the Matter SDK to do so.

More specifically:
When we subscribe, we specify MaxIntervalCeling (currently set at 60 seconds).

What I'd like to do is:
if we I don’t receive a Report Data within 3 (configurable) x MaxIntervalCeiling:
mark the device offline.

Issue though is that there does not seem to be a way to set a callback for these reports at MaxIntervalCeiling. These reports are sent at MaxIntervalCeiling when there was no state change, and the callbacks I know of are only invoked when attributes data change.

If anyone has any idea, please chip in!

@pierredelisle pierredelisle added the enhancement New feature or request label Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants