• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    how to reassign a node id?

    scheduled pinned locked moved General Discussion
    5 posts 3 posters 1.2k views 2 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • D offline
      dirkc
      global:last-edited-by,

      How can I assign another node id to an already existing node?
      When I simply change the node id in the nodes settings, it has no impact even if I reboot the node. Erasing the configuration results in an OTA with a new node id (even if I set "#define NODE_ID 99")
      Any ideas?
      Thanks in advance

      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @dirkc
        global:last-edited-by,

        @dirkc In the latest version of MySensors, you can use as follows,

        #define MY_NODE_ID 0x02
        #include <MySensors.h>
        

        This line should be before #include <MySensors.h>

        D one-reply-to-this-post last-reply-time reply quote 0
        • D offline
          dirkc @jkandasa
          global:last-edited-by, dirkc

          @jkandasa I did exactly this, and the gateway assigned a different node id.
          I use the newest versions of MySensors (2.2), compiled all nodes and Gateway with new versions.
          Can I change the node id afterwards with MyController?

          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
          • jkandasaJ offline
            jkandasa @dirkc
            global:last-edited-by,

            @dirkc Yes, you can change by editing node od directly. But, Seems already you tried this step. Can you try with MySensors forum? This seems like more related to MySensors lib. Kindly report back your solution.

            one-reply-to-this-post last-reply-time reply quote 0
            • T offline
              Tag MOD
              global:last-edited-by,

              Hi!,

              The define should work, have you tried to add as a decimal number instead of hex?

              maybe try clearing the eeprom with the example sketch, then add the line below to your sketch.

              #define MY_NODE_ID 2
              
              one-reply-to-this-post last-reply-time reply quote 0
              • first-post
                last-post

              0

              online

              644

              users

              532

              topics

              3.4k

              posts
              Copyright © 2015-2025 MyController.org | Contributors | Localization