Discover all WLED in the network

Hi !

I’ve many ESP8266 wled on my network (DHCP) and I would like to dynamically get all module network addresses from another host/application. What’s the best option? How the mobile application does the “discover” feature, for instance?

Is this pure mDNS? Does WLED broadcast some sort of magic packet from time to time?

WLED mobile will discover all running WLED instances. You can open them all and get ip addresses.
You can use an app called finger to scan the network for WLED (and other) devices and show the IP.

If you put in an ip reservation based on the MAC address of each WLED instance, you know immediately what the address is.

Other than that, in my experience a workable solution is to use the WLED app. While configuring each new device, give it a name right away, then give it a chance to connect to the wifi 2nd. Then when WLED discovers the new instance, it will also show the name. Now you have options. The finger app will generally show the assigned host name and ip address when it discovers it.

But, if you do not reserve an ip address or assign static IPs, things can get weird if WLED is powered off a few days (weeks or months) and something else nabs the dhcp lease and now anything expecting that exact address is now wrong.

There are numerous posts about this in various topic.

I hope others with better options and various levels of success post responses on what works for them.

The mobile app is open source. It looks like it uses mDNS.

@easp Thank you! This comment in DeviceDiscovery.cs explains what I wanted:

//Discover _http._tcp services via mDNS/Zeroconf and verify they are WLED devices by sending an API call