How to define Relay Id



  • Hi,
    I've just finished my first Relay with this script: http://www.mysensors.org/build/relay
    And it's working 🙂 with child Id #1
    I would like to add another Arduino with the same script for another room in my house, then I will have 2 Relays Sensors on the same network.
    I'm on RPI with Domoticz, and understood the Id is not provided automatically, but you have to force it in the script; it's what I've done for a HUM/TEMP sensor (Id#20,21), and a motion sensor (Id#60).

    1. If I create a new relay actuator, where in the script can I modify this Id # as there is no '#define CHILD_ID xx' in this script?
    2. What should I have to change if I want for example a Relay with Id 30, and another one 31?
    3. Do I understand well when I write that RPI+Domoticz+GW MySensors doesn't provide Auto Id, and you have to fill-in directly inside the script you upload into the sensors?

    Many thanks for your help!
    Regards.


  • Hero Member

    @Elfnoir .

    There is a node id for one arduino with a number of sensors attached. This can be assigned by the controller (domoticz, this is functional) or forced (1..254) by yourself.

    Each of the sensors or actuators (relays) attached to the Arduino has a child id which you need to assign yourself. The limit is 255.


  • Hero Member

    A clarification to AWIs post is that NODE_ID needs to be unic for every Node but the child id or sensor id just needs to be unic inside the node itself if you have more then one. Like this

    Node 1
    -- Child 1
    -- Child 2

    Node 2
    -- Child 1
    -- Child 2

    Bottom line since AUTO (NODE_ID) worked for your firs device you should not need to change anything for your next device either @Elfnoir



  • Hi,
    Thanks for these feedback!
    I have some adding questions, or need of precision: You mean it doesn't matter to put the same script on another Arduino with Relay sensor, like my beautiful (...) design, but no conlift will result with this configuration?:
    Image (24).jpg
    Because they are some conflict on my MySensors network under Domoticz:
    upload-caa6d947-ef8f-495e-880a-2f2f334fb21e
    Do you know this issue is coming from please?
    Thanks for your support.


  • Hero Member

    Unfortunately I don't know anything about Domoticz so I cannot say what "ID Enfant" stands for and where it comes from since the child id should not have to be unic in the system only the NODE_ID ( unfortunately it seems like this is also called sensorid sometimes ). If Domoticz needs unic CHILD_ID for all then I think it has been implemented incorrectly.

    I hope someone with more knowledge about Domoticz chime in here and explain this better.


Log in to reply
 

Suggested Topics

  • 1
  • 5
  • 2
  • 1
  • 2
  • 2

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts