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

Identify when a device is offline (TZ-1099) #417

Open
diazmanuel opened this issue Aug 30, 2024 · 1 comment
Open

Identify when a device is offline (TZ-1099) #417

diazmanuel opened this issue Aug 30, 2024 · 1 comment
Labels

Comments

@diazmanuel
Copy link

diazmanuel commented Aug 30, 2024

Question

I would like to know if the coordinator has any way of knowing when a device is offline, both synchronously and asynchronously.

  1. asynchronously I would like to know if there is any signal that is triggered or a handler that we can register to know if a device is offline, for example when a device is not emitting the zigbee beacon.

  2. synchronously I would like to read some type of table or implement a method to know if the device is online, for example with the function that I requested in add a method that returns the structure of the zigbee network and the quality of each of its links (TZ-923) #360

As I mentioned before, all this should be done from the coordinator

Additional context.

No response

@github-actions github-actions bot changed the title Identify when a device is offline Identify when a device is offline (TZ-1099) Aug 30, 2024
@xieqinan
Copy link
Contributor

xieqinan commented Sep 3, 2024

@diazmanuel ,

asynchronously I would like to know if there is any signal that is triggered or a handler that we can register to know if a device is offline, for example when a device is not emitting the zigbee beacon.

The esp-zigbee-sdk does not provide a handler to indicate when a device is offline, but you can check the neighbor table to determine the device's status. If the device is an end device and the end device timeout has been reached, it will be removed from the neighbor table. If the device is a router and the link status has not been updated within 60 seconds, the outgoing cost for the expired router will be set to 0.

synchronously I would like to read some type of table or implement a method to know if the device is online, for example with the function that I requested in #360

You can use some simple ZDO commands to check if the device is online, such as esp_zb_zdo_active_ep_req(). If the device is unreachable, the request will trigger a timeout status in the user callback within 5 seconds. By the way, we are adding the support for the zdo_mgmt_lqi_req().

Could you please provide a detailed description about your application?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants