lethe wrote:Rodrigo Miranda wrote:By the way, is that the way it is usually done? For example in those commercial electronic products such as wifi led spotlights...
There's no standard method, there are several, each with their own advantages & drawbacks...
mDNS is a popular & standardized method, but has probably more overhead than others (needs additional UDP socket).
An alternative would be to implement custom UDP broadcast/multicast messages. If you are using UDP anyway, you can get away with only using a single socket for everything.
Some manufacturers only communicate through a cloud server (with the obvious disadvantage of your device being as useful as a paperweight without internet access, but with internet it works world-wide).
Can you explain me with more detail how to make a UDP broadcast? For what I have found i have to send the message to 198.162.255.255, I tried that but did not work, do I have to set the nodemcu to listen to a specific message or something?