Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Repeater Node Question

Repeater Node Question

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 5.1k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siod
    wrote on last edited by
    #1

    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!

    still learning...

    mfalkviddM 1 Reply Last reply
    0
    • S siod

      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!

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @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.

      S 1 Reply Last reply
      1
      • mfalkviddM mfalkvidd

        @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.

        S Offline
        S Offline
        siod
        wrote on last edited by
        #3

        @mfalkvidd great, thanks for your quick and short answer! :thumbsup:

        still learning...

        1 Reply Last reply
        1
        • S Offline
          S Offline
          siod
          wrote on last edited by siod
          #4

          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?

          still learning...

          Boots33B 1 Reply Last reply
          0
          • S siod

            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?

            Boots33B Offline
            Boots33B Offline
            Boots33
            Hero Member
            wrote on last edited by Boots33
            #5

            @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
            
            
            1 Reply Last reply
            0
            • S Offline
              S Offline
              siod
              wrote on last edited by
              #6

              ok, thanks for clarifying this!

              still learning...

              1 Reply Last reply
              0

              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
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              19

              Online

              12.0k

              Users

              11.2k

              Topics

              113.4k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular