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. Controllers
  3. Hard-coding Node IDs vs. Using Controller-Assigned

Hard-coding Node IDs vs. Using Controller-Assigned

Scheduled Pinned Locked Moved Controllers
6 Posts 3 Posters 3.4k 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.
  • David NorenD Offline
    David NorenD Offline
    David Noren
    wrote on last edited by
    #1

    Long story short: I'm setting up about 9+ PID sensors, 5+ temperature sensors, and 8+ door/window sensors, plus other stuff. I'm using the ethernet gateway and Domoticz.

    It seems that when a sensor goes offline, Domoticz will re-use that node ID. That's fine, until I change the battery or bring a new node online and get the old ID, etc. Do most people hard-code the node ID in the EPROM, or have the gateway assign the node ID?

    Also, MYSController seems pretty good from a troubleshooting standpoint. Any issue running that on the 'production' system, with MYSController bootloader, etc?

    1 Reply Last reply
    0
    • sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #2

      Hi @David-Noren

      I use ethernet gw and Domoticz but with hardcoded IDs. It works great.
      I have not tried letting domoticz assigns IDs so i dont know how that works...

      Good luck with your project!

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      1 Reply Last reply
      0
      • David NorenD Offline
        David NorenD Offline
        David Noren
        wrote on last edited by
        #3

        Good to know. Do you just write the ID to the EPROM using a sketch that allows that and then write the node sketch to the Arduino, or do you assign the ID in the actual node sketch, or do you use MSYController?

        Just trying to figure out the best/easiest way. :)

        Thanks for the input!

        1 Reply Last reply
        0
        • sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by sundberg84
          #4

          I declare it in the scetch.
          This example has hard coded to 5 and act as a repeater node.

          #define NodeID 5
          
          gw.begin(NULL, NodeID, true);
          
          //incomingMessageCallback - Callback function for incoming messages from other nodes or controller and request responses. Default is NULL.
          //nodeId - The unique id (1-254) for this sensor. Default is AUTO(255) which means sensor tries to fetch an id from controller.
          //repeaterMode - Activate repeater mode. This node will forward messages to other nodes in the radio network. Make sure to call process() regularly. Default in false
          
          

          and that is all you need to do.
          an

          Controller: Proxmox VM - Home Assistant
          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

          HJ_SKH 1 Reply Last reply
          0
          • sundberg84S sundberg84

            I declare it in the scetch.
            This example has hard coded to 5 and act as a repeater node.

            #define NodeID 5
            
            gw.begin(NULL, NodeID, true);
            
            //incomingMessageCallback - Callback function for incoming messages from other nodes or controller and request responses. Default is NULL.
            //nodeId - The unique id (1-254) for this sensor. Default is AUTO(255) which means sensor tries to fetch an id from controller.
            //repeaterMode - Activate repeater mode. This node will forward messages to other nodes in the radio network. Make sure to call process() regularly. Default in false
            
            

            and that is all you need to do.
            an

            HJ_SKH Offline
            HJ_SKH Offline
            HJ_SK
            wrote on last edited by
            #5

            @sundberg84 I'm looking to hard coded as well. To much problems with automatic created nodes. Especially when testing with the same Arduino Nano. Full of fail when reconnect an node with other sketch and eeprom_clear does not solve that problem. 'Still using after all these years'? Thanks anyway for the hint!!

            sundberg84S 1 Reply Last reply
            0
            • HJ_SKH HJ_SK

              @sundberg84 I'm looking to hard coded as well. To much problems with automatic created nodes. Especially when testing with the same Arduino Nano. Full of fail when reconnect an node with other sketch and eeprom_clear does not solve that problem. 'Still using after all these years'? Thanks anyway for the hint!!

              sundberg84S Offline
              sundberg84S Offline
              sundberg84
              Hardware Contributor
              wrote on last edited by
              #6

              @hj_sk - yes, I always set ID in each node.

              Controller: Proxmox VM - Home Assistant
              MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
              MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
              RFLink GW - Arduino Mega + RFLink Shield, 433mhz

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


              20

              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