Repeater Node Question
-
Hi,
I would like to add a repeater Node to my Network and I would like to know a few things:
MY_PARENT_ID for the repeater node is the gateways ID, right? So which MY_PARENT_ID will the repeated Nodes have? The ID of the Repeater Node?
Does someone have an example sketch of a repeater node for me?
Thanks in advance!
-
Hi,
I would like to add a repeater Node to my Network and I would like to know a few things:
MY_PARENT_ID for the repeater node is the gateways ID, right? So which MY_PARENT_ID will the repeated Nodes have? The ID of the Repeater Node?
Does someone have an example sketch of a repeater node for me?
Thanks in advance!
@siod yes, your assumptions are correct.
There is no example sketch for a repeater node because it only needs to contain a single define. You can add this define to any sketch. If the node uses sleep you will need to change sleep to wait, so the node stays awake. See https://www.mysensors.org/download/sensor_api_20#create-repeating-nodes for details.
-
@siod yes, your assumptions are correct.
There is no example sketch for a repeater node because it only needs to contain a single define. You can add this define to any sketch. If the node uses sleep you will need to change sleep to wait, so the node stays awake. See https://www.mysensors.org/download/sensor_api_20#create-repeating-nodes for details.
@mfalkvidd great, thanks for your quick and short answer! :thumbsup:
-
one more question: that´s what I have so far, is this all? I think I´ve read somewehere that there must be a special command included and I also read this:
// Repeater Node1, Repeater Nodes starten bei ID 50 #define MY_RADIO_NRF24 //MySensor Library auf NRF24 Funkmodul einstellen, muss vor MySensor.h Initialisierung geschehen // Define Node ID #define MY_NODE_ID 50 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_REPEATER_FEATURE #include <MySensors.h> #include <SPI.h> //Messages //Presentation; present sensors to gateway! void presentation(){ // Send the sketch version information to the gateway and Controller sendSketchInfo("Repeater Node 1", "1.0"); wait(500); } //Setup void setup() { } //Starte den Loop void loop() { }*Handling incoming radio messages
Nodes that expects incoming data, such as an actuator or repeating nodes, must implement the receive()-function to handle the incoming messages. Do not sleep a node where you expect incoming data or you will lose messages.void receive(const MyMessage &message)
message - The incoming message data*where do I have to add this?
-
one more question: that´s what I have so far, is this all? I think I´ve read somewehere that there must be a special command included and I also read this:
// Repeater Node1, Repeater Nodes starten bei ID 50 #define MY_RADIO_NRF24 //MySensor Library auf NRF24 Funkmodul einstellen, muss vor MySensor.h Initialisierung geschehen // Define Node ID #define MY_NODE_ID 50 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_REPEATER_FEATURE #include <MySensors.h> #include <SPI.h> //Messages //Presentation; present sensors to gateway! void presentation(){ // Send the sketch version information to the gateway and Controller sendSketchInfo("Repeater Node 1", "1.0"); wait(500); } //Setup void setup() { } //Starte den Loop void loop() { }*Handling incoming radio messages
Nodes that expects incoming data, such as an actuator or repeating nodes, must implement the receive()-function to handle the incoming messages. Do not sleep a node where you expect incoming data or you will lose messages.void receive(const MyMessage &message)
message - The incoming message data*where do I have to add this?
@siod What you have above is all you need for a repeater node. if you also have sensors/actuators on this node that are expecting to receive data then you will need to add the receive function. have a look at the RelayActuator example to see how it looks.
the lines below are not mandatory for a repeater either but of course you can use them if needed
#define MY_NODE_ID 50 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC
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