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
-
Send to broadcast address which is 255.
-
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
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
MQTT-Help me understand about the MQTT Gateway.
Development • 24 days ago • dpcons 13 days ago -
Home Assistant/MySensors quirks
Development • 9 days ago • OldSurferDude 9 days ago -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14