Static ParentID



  • Hi,

    This might be a trivial question, but how the f.. do I set a static parent node id?

    My setup is a MQTT gateway, 1 relay node and 3 temp nodes.
    setup.png

    Disance in picture is equal to real life.

    My problem is that, as long as temp2/3 sensors are not running, then the relay works fine.
    As soon as I enable temp 2/3, the relay node thinks that it should communicate with those, as they are closer (which they are)

    The problem here is that the temp nodes are battery operated, so they sleep most of the time, hence I loose comm to the relay node. Therefore I really need to make the relay node talk to the GW with a static ID.

    I've tried to change parentNodeId=AUTO to parentNodeId=0 in MySensor.h on the relay node, but without any working result 😞


  • Admin

    You should not change anything in MySensor.h. Just set the argument when calling gw.begin() in your sketch.



  • @Hek

    So instead of
    gw.begin(incomingMessage, AUTO, true);

    it should be
    gw.begin(incomingMessage, AUTO, true, 0);

    for the relay node?


  • Admin

    Yes, that should disable auto-search for parent (if it works as intended!).



  • @hek

    Thank you! It looks like it's working.

    The relay is now talking directly to the GW. The 2 right-side temp sensors however, are now using the relay node as a repeater 😛

    I can live with that (still working as designed) only thing now, is that I think I have a faulty wirering connection to the radio on the relay node. After a while it goes "offline", but the fun part is that if I powercycle it, it's back online.


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 15
  • 2
  • 2
  • 24

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts