Multiple Gateways



  • Hi

    I live on a high property and as such. have more than one gateway. I have not changed the channel of these gateways as they are not in wireless range of each other. and I want to have the nodes be interchangeable between gateways without the need to have to upload a new sketch each time they are moved between gateways.

    What are the implications of this setup, will each gateway remember the node if the nodes are move from one gateways range to the other, or does the gateway allocate a node id automatically each time the node presents itself to the gateway.

    How will this impact the controller (Home Assistant) will the controller be confused


  • Mod

    @terence-faul gateways have a routing table, but except that gateways never remember anything.
    Gateways never allocate node ID. Node IDs are allocated by a Controller.

    Different Controllers can handle ID generation differently. I am not familiar with Home Assistant, but I would guess that it allocates nodeIDs per gateway. If Home Assistant allocates nodeIDs globally, it would be impossible to have more than 253 nodes regardless of how many gateways you have.

    If a node is programmed with AUTO nodeID, the node will ask the controller for an ID the first time it boots up. The node will then write the nodeID to EEPROM and reuse that nodeID in the future, regardless if it switches gateway or not. This could lead to nodeID collisions in your setup.



  • Thanks that was really useful, I think the only way would be to define the node ID.
    Would that require that the node have its EEPROM cleaned first?


  • Mod

    @terence-faul if MY_NODE_ID is defined in the sketch (before including MySensors.h), the node ID will be written to eeprom at startup (overwriting any previous value).



  • @terence-faul this is not a fail prove design. Nodes are not typically moved even within one GW. Each GW must have each one channel and the same goes for nodes. Otherwise, in theory you may have a situation that the same node is reporting to one GW and then to the other GW. For controller this is going to be a chaos. A lot of data will be shared between two similar child IDs, i.e. for example two similar temperature child IDs for one node will have one measurement assigned through the first GW to the first temperature child ID and another measurement assigned to another child ID through another GW.


Log in to reply
 

Suggested Topics

  • 4
  • 8
  • 20
  • 9
  • 15
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts