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. Development
  3. [SOLVED] MY_NODE_ID is ignored

[SOLVED] MY_NODE_ID is ignored

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 2.2k Views 3 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.
  • K Offline
    K Offline
    Karol Rynio
    wrote on last edited by Yveaux
    #1

    Hi.
    I created my first sketch using arduino, but I have a problem because I define manually MY_NODE_ID but it is ignored. When I upload my sketch to arduino and run serial monitor I receive messages:

    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;17;2.1.1
    0;101;0;0;3;
    

    and here is information that mo node id is 0, but in source code I define it as 3. Below is source code:

    #define MY_NODE_ID 3
    #define MY_GATEWAY_SERIAL
    
    #include <SPI.h>
    #include <MySensors.h>
    
    
    //...
    #define RELAY_PIN  5
    #define CHILD_ID 101
    // ...
    
    MyMessage msg(CHILD_ID, V_STATUS);
    
    void setup()
    {
      pinMode(RELAY_PIN, OUTPUT);
    }
    
    void presentation()  {
      present(CHILD_ID, S_BINARY);
    }
    
    void loop()
    {
      // ...
    }
    
    void receive(const MyMessage &message) {
      // ...
    }
    

    Why MY_NODE_ID have different VALUE than I declare?

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

      Gateways always get node-id 0.

      1 Reply Last reply
      1
      • K Offline
        K Offline
        Karol Rynio
        wrote on last edited by
        #3

        Ok, thanks.

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


        16

        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