Skip to content
  • 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. General Discussion
  3. Mulitple Gatways and NodeID0
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Mulitple Gatways and NodeID0

Scheduled Pinned Locked Moved General Discussion
10 Posts 3 Posters 1.4k 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.
  • M Offline
    M Offline
    Markus.
    wrote on last edited by Markus.
    #1

    Hi All,
    I have two Gateways connected to one Controller and I want to attach on each Gateway, which have different Radios, a sensor. I know always NodeID 0 is assigned to a sensor attached to the Gateways.
    Is there any chance to give a sensor attached to the Gateway another NodeID?
    Thanks

    Markus

    mfalkviddM 1 Reply Last reply
    0
    • rejoe2R Offline
      rejoe2R Offline
      rejoe2
      wrote on last edited by
      #2

      I'm not sure whether this is problem of the MySensors serial API or more a controller specific topic.
      Didn't test that in depth, but at least FHEM seems not to destinguish between Children on different gw's.
      How are experiences with other controller solutions?

      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

      1 Reply Last reply
      0
      • M Markus.

        Hi All,
        I have two Gateways connected to one Controller and I want to attach on each Gateway, which have different Radios, a sensor. I know always NodeID 0 is assigned to a sensor attached to the Gateways.
        Is there any chance to give a sensor attached to the Gateway another NodeID?
        Thanks

        Markus

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by mfalkvidd
        #3

        @markus no there isn’t. But your controller should distinguish them anyway. If it doesn’t, you would have problems when adding for example a rfm gw and a nrf gw and the same node id is used for a node on each network.

        I have not tried other controllers, but Domoticz handles multiple MySensors networks.

        1 Reply Last reply
        0
        • rejoe2R Offline
          rejoe2R Offline
          rejoe2
          wrote on last edited by
          #4

          @mfalkvidd The Problem imo is that as far as I understood, sensors attached directly to the gw will be reported under NodeID 0 - regardless if one tries to assign a different one.

          At least FHEM then will mix up these infos from different gw's and build a "virtual" Node 0 combining the infos sent from each gw.

          For other nodes, this can be avoided, as one can assing a really individual ID (and in FHEM assign the right path in filesystem to the corresponding gw to make sure communication works as expected).

          So from FHEM's point of view, it would be desirable to distinct between real gw functionality (that has to use ID "0") and the "other" part ("ordinary sensor functionality) allowing to handle that as a seperate unit and address this under a seperate ID (in case if needed).

          (Hard to explain, hope, you got my idea).

          Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

          mfalkviddM 1 Reply Last reply
          0
          • rejoe2R rejoe2

            @mfalkvidd The Problem imo is that as far as I understood, sensors attached directly to the gw will be reported under NodeID 0 - regardless if one tries to assign a different one.

            At least FHEM then will mix up these infos from different gw's and build a "virtual" Node 0 combining the infos sent from each gw.

            For other nodes, this can be avoided, as one can assing a really individual ID (and in FHEM assign the right path in filesystem to the corresponding gw to make sure communication works as expected).

            So from FHEM's point of view, it would be desirable to distinct between real gw functionality (that has to use ID "0") and the "other" part ("ordinary sensor functionality) allowing to handle that as a seperate unit and address this under a seperate ID (in case if needed).

            (Hard to explain, hope, you got my idea).

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

            @rejoe2 so with FHEM you need to manually keep track and make sure you never assign the same node id to two nodes, regardless of how many gateways you have, which radios (or rs485) they use and which frequencies? And you can never have more than 254 nodes in your home?

            I'd say get a better controller if that's the case :)

            rejoe2R 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @rejoe2 so with FHEM you need to manually keep track and make sure you never assign the same node id to two nodes, regardless of how many gateways you have, which radios (or rs485) they use and which frequencies? And you can never have more than 254 nodes in your home?

              I'd say get a better controller if that's the case :)

              rejoe2R Offline
              rejoe2R Offline
              rejoe2
              wrote on last edited by
              #6

              @mfalkvidd Your conclusion with the max of 254 nodes to be handled by FHEM seems to be right :grin: ! But as I like to combine sensors, most likely this will not be a practical limitation to my personal use cases.

              Wrt "better controller": FHEM seems to have other advantages - starting with the small but important point that to some extend I personally understand how to use it :laughing: . And it is able to handle properly and direct the most of the commercial hw I use (Homematic - afaik there does not exist any comparable solution wrt this hw).

              So how about possibilities to split up gw and node reports? Misunderstood from my side? Possible, but hard work? Small change in code?

              Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

              mfalkviddM 1 Reply Last reply
              1
              • rejoe2R rejoe2

                @mfalkvidd Your conclusion with the max of 254 nodes to be handled by FHEM seems to be right :grin: ! But as I like to combine sensors, most likely this will not be a practical limitation to my personal use cases.

                Wrt "better controller": FHEM seems to have other advantages - starting with the small but important point that to some extend I personally understand how to use it :laughing: . And it is able to handle properly and direct the most of the commercial hw I use (Homematic - afaik there does not exist any comparable solution wrt this hw).

                So how about possibilities to split up gw and node reports? Misunderstood from my side? Possible, but hard work? Small change in code?

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by
                #7

                @rejoe2 my guess is "quite hard, with more problems than we can anticipate". but maybe it is not that hard. Hack away on the code and see what your impression is.

                rejoe2R 1 Reply Last reply
                1
                • mfalkviddM mfalkvidd

                  @rejoe2 my guess is "quite hard, with more problems than we can anticipate". but maybe it is not that hard. Hack away on the code and see what your impression is.

                  rejoe2R Offline
                  rejoe2R Offline
                  rejoe2
                  wrote on last edited by
                  #8

                  @mfalkvidd said in Mulitple Gatways and NodeID0:

                  Hack away on the code and see what your impression is.

                  To be honest: It's already hard work to me to get a more or less clear picture how all these parts of the "big puzzle" fit together... But doing this type of coding most likely is far beyond my knowledge :anguished: .

                  As a side note wrt controller capabilities: I don't really believe this "limitations" are only affecting FHEM - this seems to be have its roots in the times MySensors was "only" using nRF24 as transport. Then, having multiple gw's was not "on the list" of most of the implementations.

                  Just in case I really dare to digg into that: Do you have a hint for a starting point in the code to look at?

                  Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                  mfalkviddM 1 Reply Last reply
                  0
                  • rejoe2R rejoe2

                    @mfalkvidd said in Mulitple Gatways and NodeID0:

                    Hack away on the code and see what your impression is.

                    To be honest: It's already hard work to me to get a more or less clear picture how all these parts of the "big puzzle" fit together... But doing this type of coding most likely is far beyond my knowledge :anguished: .

                    As a side note wrt controller capabilities: I don't really believe this "limitations" are only affecting FHEM - this seems to be have its roots in the times MySensors was "only" using nRF24 as transport. Then, having multiple gw's was not "on the list" of most of the implementations.

                    Just in case I really dare to digg into that: Do you have a hint for a starting point in the code to look at?

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by mfalkvidd
                    #9

                    @rejoe2 there could still be multiple nrf gateways on different radio channels, so the assumtion would still be bad for nrf-only networks.

                    The quick and dirty way, that might or might not break seemingly unrelated things, is to change

                    message.sender = getNodeId();
                    

                    to

                    message.sender = 42; // or whatever number you fancy
                    

                    here: https://github.com/mysensors/MySensors/blob/af3452f91c15b60cc7666b6225fa7342f08a6f52/core/MySensorsCore.cpp#L309

                    Note that with this change it will not be possible to send any messages to the node.

                    rejoe2R 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      @rejoe2 there could still be multiple nrf gateways on different radio channels, so the assumtion would still be bad for nrf-only networks.

                      The quick and dirty way, that might or might not break seemingly unrelated things, is to change

                      message.sender = getNodeId();
                      

                      to

                      message.sender = 42; // or whatever number you fancy
                      

                      here: https://github.com/mysensors/MySensors/blob/af3452f91c15b60cc7666b6225fa7342f08a6f52/core/MySensorsCore.cpp#L309

                      Note that with this change it will not be possible to send any messages to the node.

                      rejoe2R Offline
                      rejoe2R Offline
                      rejoe2
                      wrote on last edited by
                      #10

                      @mfalkvidd Thx for the "quick and dirty" way. This at least is a starting point, but most things around that seem really to be hard coded (MySensorsCore.h: L77: GW Address is 0 is the point where the getNodeId() finally leads to).
                      But if that really works there might be a way to wrap around that - but indeed this seems to be quite complicated.

                      And indeed, you are right that having multiple nRF-GW's was possible ever since MySensors existed.

                      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

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


                      10

                      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
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular