Where do I set the sensor ID?



  • I am going to use openHAB as my controller and as for as I can tell I need to manually set sensor IDs for each bit of kit in my network. I am using a serial gateway, well, was but am currently faultfinding it, and I have a motion sensor that seems to have picked up id 105, I am assuming from the sketch. I can't find 105 anywhere in the sketch for the moion sensor so where is this likely to have come from and how do I set the id for other sensors?
    Cheers


  • Hardware Contributor

    Use gw.begin(NULL, AUTO, true) change auto to nodeID and true to false if you have battery sensor

    1 argument if incoming messages
    2 argument is node id
    3 argument is repeater mode

    Above is for 1.5.x



  • @sundberg84
    Thanks. I don't know where the motion sensor is picking up 105 then as the gw.begin() is just that with no parameters at all. πŸ˜’


  • Mod

    Try resetting the node with the cleareeprom sketch (available in the examples folder). Then re-flash your sketch and hopefully it will be back to normal.



  • @mfalkvidd
    Thanks! I have now set a value of 1 and lo and behold sensor 1 is now talking to the gateway. I vaguely remeber testing eeprom storing values by using a button that advanced a value by one and then stored it. It must have been this Uno I did it on and I must have hit the button 105 times πŸ™‚


  • Mod

    Great that it worked. Thanks for reporting the result πŸ™‚


Log in to reply
 

Suggested Topics

  • 4
  • 3
  • 2
  • 9
  • 20
  • 17

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts