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. Can't get nodeID from the controller

Can't get nodeID from the controller

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 4.9k Views 1 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.
  • L Offline
    L Offline
    laschlo
    wrote on last edited by
    #1

    Howdy folks!
    I'm a new user of the MySensors library, however Im not new into AVRs and Arduinos ;) I've been trying to setup 2 UNOs with two radios and MySensors - 1 controller and one sensor ( in my case just for the example purpose - door sensor). Both radios connected as instructed. First UNO (controller) flashed with the SerialGateway example code, second - the sensor with example from the webpage. If i set nodeID manually on the sensor with gw.begin, everything seems to be ok. But when I try to get nodeID from the controller, it seems sensor is trying to send following message over and over again, thus not getting nodeID from the controller.

    Sensor serial data (DEBUG mode ON):

    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    sensor started, id 255
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    

    Controller serial data (DEBUG mode ON)

    0;0;3;0;9;Inclusion started by button.
    0;0;3;0;5;1
    0;0;3;0;9;
    read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    255;255;3;0;3;
    0;0;3;0;9;
    read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    255;255;3;0;3;
    0;0;3;0;9;
    read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    255;255;3;0;3;
    

    Sensor sketch:

    #include <MySensor.h>
    #include <SPI.h>
    #define ID 1
    #define OPEN 1
    #define CLOSE 0
    
    MySensor gw;
    MyMessage msg(ID, V_TRIPPED);
    
    void setup() 
    { 
      gw.begin();
      gw.present(ID, S_DOOR); 
    }
    
    void loop()
    {
     gw.send(msg.set(OPEN)); 
     delay(10000); // Wait 10 seconds
    }
    
    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      What controller do you have?

      L 1 Reply Last reply
      0
      • hekH hek

        What controller do you have?

        L Offline
        L Offline
        laschlo
        wrote on last edited by
        #3

        @hek
        Controller is an Arduino UNO, flashed with SerialGateway example.

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by hek
          #4

          Arduino Uno is not a controller. It's running a SerialGateway. A gateway which normally talks to the controller that hand out id:s.
          So without a controller you have to have static id:s.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            laschlo
            wrote on last edited by
            #5

            Damn, I should have read documentation more carefully :) For some reason I assumed Gateway will send out nodeIDs. So now I'm going to start digging into MySensors and OpenHAB documentation.

            Thanks HEK!

            1 Reply Last reply
            0
            • klimK Offline
              klimK Offline
              klim
              wrote on last edited by
              #6

              Hi, and welcome. If it helps you, i did the same mistake, but in my case the documentation was wrong at the time.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              32

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              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