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

How to detect online Thread end devices from a Matter controller application (CON-1572) #1300

Open
pavel808 opened this issue Feb 27, 2025 · 5 comments

Comments

@pavel808
Copy link

pavel808 commented Feb 27, 2025

I have a Matter controller application based on the provided Matter controller example application running on an ESP Thread Border Router device.

Thread end devices get commissioned via this application via the Thread Border Router and matter commands can be sent successfully.

However, how can I detect which end devices are actually powered on / online? Is there a simple way to ping the devices via some API. I can't seem to find this solution. Thanks.

@github-actions github-actions bot changed the title How to detect online Thread end devices from a Matter controller application How to detect online Thread end devices from a Matter controller application (CON-1572) Feb 27, 2025
@jonsmirl
Copy link
Contributor

Use MDNS to look for their entries. You need to know their compressed fabric ID and node ID. You can do this same browse from the ESP MDNS API.

jonsmirl@ares:~$ avahi-browse --all | grep matter
+ enp3s0f1 IPv6 950545243CFE2D15-00000000FE0D396C             _matter._tcp         local
+ enp3s0f1 IPv6 9CC0373667C4F408-204B50A898A38F65             _matter._tcp         local
+ enp3s0f1 IPv4 C7944E937AA07DD5-008462EE7296AD71             _matter._tcp         local
+ enp3s0f1 IPv4 C7944E937AA07DD5-0083161AE5399201             _matter._tcp         local
+ enp3s0f1 IPv4 C7944E937AA07DD5-00867AF748BEBA01             _matter._tcp         local
+ enp3s0f1 IPv4 950545243CFE2D15-00000000FE0D396C             _matter._tcp         local
+ enp3s0f1 IPv4 9CC0373667C4F408-204B50A898A38F65             _matter._tcp         local
+ enp3s0f1 IPv6 C7944E937AA07DD5-0083161AE5399201             _matter._tcp         local
+ enp3s0f1 IPv6 C7944E937AA07DD5-00867AF748BEBA01             _matter._tcp         local
+ enp3s0f1 IPv6 C7944E937AA07DD5-008462EE7296AD71             _matter._tcp         local

@pavel808
Copy link
Author

pavel808 commented Mar 2, 2025

@jonsmirl Thanks for your reply. The end devices are commissioned and communicate via Thread though. Only the Thread border Router gets assigned an IP address and mDNS entry. Is that still possible in this case? I would need to detect online Thread devices from the Matter controller application.

@jonsmirl
Copy link
Contributor

jonsmirl commented Mar 2, 2025

Try the Linux avahi-browse command and you should see them.
jonsmirl@ares:~$ avahi-browse --all | grep matter
There is a similar command for MacOS

You can also get MDNS free browser apps for your phone which can see them

@pavel808
Copy link
Author

pavel808 commented Mar 3, 2025

@jonsmirl Ah yes. Indeed I can see the devices using avahi-browse --all | grep matter. Thanks.

I am trying to figure how to use the the ESP mDNS Service to lookup the Matter Node IDs from within my Matter controller application.

@jonsmirl
Copy link
Contributor

jonsmirl commented Mar 3, 2025

use mdns_query_ptr()

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

No branches or pull requests

2 participants