Send message to all nodes
-
Hi All
I have a network in which there is a controller (a node itself) and lots of other devices on other nodes. The devices can have different functionality. At initialization I want the controller to send a message to all devices so that they can report their functionality type to the controller. Is there a way to send a message to all devices. The ugly way would be to run a loop from 1-254 and use it as a nodeID and send a message to each. Any elegant way to do it.
Regards
Warman -
additional information may not be useful
"Debug messages are sent to child ID 255"
https://github.com/mysensors/MySensors/blob/2.3.1/MyConfig.h#L77 -
In your network setup, if you want the controller to send a message to all devices for initialization without using a loop to iterate through all possible node IDs, you can consider utilizing the broadcast functionality of your communication protocol.
Typically, most communication protocols, including MySensors, support broadcast messages that can be sent to all devices within the network. Broadcasting a message allows you to send a single message that will be received by all devices simultaneously, without the need for individual addressing.
Consult the documentation or API reference of your specific communication protocol (e.g., MySensors) OR refer this [spam link removed by moderator] to understand how to implement broadcasting functionality within your network.
Hope it helps you. -
I searched on the forum how to use ID255 but found nothing practical
https://github.com/mysensors/MySensors/blob/development/examples/PingPongSensor/PingPongSensor.ino
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login