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. Set gateway NODE_ID to something else than 0

Set gateway NODE_ID to something else than 0

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 4 Posters 1.6k 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.
  • M Offline
    M Offline
    matz
    wrote on last edited by
    #1

    Hi,

    I have an arduino with an ethernet shield with 3 DS18B20 and a relay. I don't need any other sensors, so i want to connect this arduino to the controller (Jeedom). Since V2, we can connect sensors on the Gateway so my configuration should be good.

    It seems that a gateway has always a NODE_ID=0. The problem is that Jeedom does not accept 0 as an ID for the node. But i can't find a way to force the ID to anything else than 0. #define MY_NODE_ID 12 for example. In the logs of what the controller receive, I always have a NODE_ID=0.

    How can i force another value for NODE_ID ? If it is not possible using parameters, which file of the library should i modify to force the NODE_ID to what i need even if it is a gateway ?

    Thanks for your help

    Matz

    mfalkviddM YveauxY 2 Replies Last reply
    0
    • M matz

      Hi,

      I have an arduino with an ethernet shield with 3 DS18B20 and a relay. I don't need any other sensors, so i want to connect this arduino to the controller (Jeedom). Since V2, we can connect sensors on the Gateway so my configuration should be good.

      It seems that a gateway has always a NODE_ID=0. The problem is that Jeedom does not accept 0 as an ID for the node. But i can't find a way to force the ID to anything else than 0. #define MY_NODE_ID 12 for example. In the logs of what the controller receive, I always have a NODE_ID=0.

      How can i force another value for NODE_ID ? If it is not possible using parameters, which file of the library should i modify to force the NODE_ID to what i need even if it is a gateway ?

      Thanks for your help

      Matz

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

      @matz I think you are in for a lot of pain/learning unfortunately. All routing is built on the root node (=the gateway) of the routing tree having id 0. And whenever the MySensors library is updated, you'd have to re-apply and test all your changes.

      1 Reply Last reply
      0
      • M matz

        Hi,

        I have an arduino with an ethernet shield with 3 DS18B20 and a relay. I don't need any other sensors, so i want to connect this arduino to the controller (Jeedom). Since V2, we can connect sensors on the Gateway so my configuration should be good.

        It seems that a gateway has always a NODE_ID=0. The problem is that Jeedom does not accept 0 as an ID for the node. But i can't find a way to force the ID to anything else than 0. #define MY_NODE_ID 12 for example. In the logs of what the controller receive, I always have a NODE_ID=0.

        How can i force another value for NODE_ID ? If it is not possible using parameters, which file of the library should i modify to force the NODE_ID to what i need even if it is a gateway ?

        Thanks for your help

        Matz

        YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by
        #3

        @matz I agree with @mfalkvidd. The correct way to solve this would be to adapt jeedom to support 0 as node ID.
        This way all mySensors users can benefit and your solution will be future proof.

        http://yveaux.blogspot.nl

        1 Reply Last reply
        0
        • M Offline
          M Offline
          matz
          wrote on last edited by
          #4

          :cold_sweat: Ok, so I have 3 options :

          • Adapt jeedom : very difficult because i'm sure they don't accept node 0 for a reason and i would have to change the way it works with nodes

          • Adapt mySensors : it sounds to me easier but not future proof

          • Buy a new arduino to act as gateway and plug a radio on both of them

          The third one seems to be the simpler, even if it is frustrating :)

          I have 2 more questions if you can help :

          1. Which file in mySensors library is setting 0 to a gateway NODE_ID ? I could not find it. I just want to try modify it and see what happens

          2. In v2 of MySensors, the library accept sensors on the gateway. But it seems that a sensor node with 0 as NODE_ID is confusing the existing controllers : i've seen some posts on that concerning MyNodes or pimatic. I have tested MyNodes and it can't detect my sensors on the gateway either, though it can connect to the gateway with no problem. Would it be possible in future versions of mySensors to consider having the node_id of the gateway to be anything else than 0 ?

          mfalkviddM YveauxY 2 Replies Last reply
          0
          • M matz

            :cold_sweat: Ok, so I have 3 options :

            • Adapt jeedom : very difficult because i'm sure they don't accept node 0 for a reason and i would have to change the way it works with nodes

            • Adapt mySensors : it sounds to me easier but not future proof

            • Buy a new arduino to act as gateway and plug a radio on both of them

            The third one seems to be the simpler, even if it is frustrating :)

            I have 2 more questions if you can help :

            1. Which file in mySensors library is setting 0 to a gateway NODE_ID ? I could not find it. I just want to try modify it and see what happens

            2. In v2 of MySensors, the library accept sensors on the gateway. But it seems that a sensor node with 0 as NODE_ID is confusing the existing controllers : i've seen some posts on that concerning MyNodes or pimatic. I have tested MyNodes and it can't detect my sensors on the gateway either, though it can connect to the gateway with no problem. Would it be possible in future versions of mySensors to consider having the node_id of the gateway to be anything else than 0 ?

            mfalkviddM Online
            mfalkviddM Online
            mfalkvidd
            Mod
            wrote on last edited by mfalkvidd
            #5

            @matz said in Set gateway NODE_ID to something else than 0:

            Which file in mySensors library is setting 0 to a gateway NODE_ID ? I could not find it. I just want to try modify it and see what happens

            I looked a bit earlier today but wasn't able to find anything conclusive. I don't think there is one place to change, there are probably many places since using nodeid id 0 for the gateway is so fundamental to MySensors. But I don't have any experience messing with the core so I might not be a good judge.

            In v2 of MySensors, the library accept sensors on the gateway. But it seems that a sensor node with 0 as NODE_ID is confusing the existing controllers : i've seen some posts on that concerning MyNodes or pimatic. I have tested MyNodes and it can't detect my sensors on the gateway either, though it can connect to the gateway with no problem. Would it be possible in future versions of mySensors to consider having the node_id of the gateway to be anything else than 0 ?

            Everything is possible, as long as someone is motivated, has the skills and time, and can make the changes without breaking (too much) stuff for other users.

            To me it would be more natural for controllers to stop blocking use of node id 0 though.

            1 Reply Last reply
            0
            • hekH Online
              hekH Online
              hek
              Admin
              wrote on last edited by
              #6

              Have to agree on fixing this on the controller side as it might very well be expect gateway commands (request for node id, gateway version etc) to be hardcoded to node 0. So it might still not work if you update it in the library

              You'd have to update the library code in the following places (might be more):

              https://github.com/mysensors/MySensors/blob/development/core/MyMessage.cpp#L42
              https://github.com/mysensors/MySensors/blob/development/core/MySensorsCore.h#L76

              1 Reply Last reply
              0
              • M matz

                :cold_sweat: Ok, so I have 3 options :

                • Adapt jeedom : very difficult because i'm sure they don't accept node 0 for a reason and i would have to change the way it works with nodes

                • Adapt mySensors : it sounds to me easier but not future proof

                • Buy a new arduino to act as gateway and plug a radio on both of them

                The third one seems to be the simpler, even if it is frustrating :)

                I have 2 more questions if you can help :

                1. Which file in mySensors library is setting 0 to a gateway NODE_ID ? I could not find it. I just want to try modify it and see what happens

                2. In v2 of MySensors, the library accept sensors on the gateway. But it seems that a sensor node with 0 as NODE_ID is confusing the existing controllers : i've seen some posts on that concerning MyNodes or pimatic. I have tested MyNodes and it can't detect my sensors on the gateway either, though it can connect to the gateway with no problem. Would it be possible in future versions of mySensors to consider having the node_id of the gateway to be anything else than 0 ?

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #7

                @matz said in Set gateway NODE_ID to something else than 0:

                • Adapt jeedom : very difficult because i'm sure they don't accept node 0 for a reason and i would have to change the way it works with nodes

                Well, you could at least try :-)

                Would be interesting to know why, at least.

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  matz
                  wrote on last edited by
                  #8

                  It makes sens that the controller should adapt themselves and manage the NODE_ID 0. But i just don't have the skills to adapt Jeedom to do so. I could try to play with MySensors lib, but both solution are a waste of time as I would have to change the code each time the controller or the lib has a new version.

                  I will have an independant node and a gateway and wait lie this for the controller to manage node_id 0

                  Thank you again for answering me.

                  Matz

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


                  13

                  Online

                  11.7k

                  Users

                  11.2k

                  Topics

                  113.0k

                  Posts


                  Copyright 2019 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