How does the gateway hand out IDs?

  • I am thinking I would like to assign IDs to each of my nodes. Upon first boot of two Sensebender Micro boards, they were assigned ID 2 and 3. OK, it seems to be sequential. However, when I brought up my first PIR motion sensor on an Arduino, it was assigned ID 105. I was expecting to see it assigned 4.

  • @biffhero The Gateway doesn't hand out Node IDs the Controller does unless you define it at the Node. Your Controller set the Node ID to 1 as it was an available number, the 5 is the Child ID you assigned.
    My own preference is to assign the Node ID in the sketch and label the sketch with that Node ID and increment the version numbers in both to make it easier to track which one has been programmed at the Node. It also saves on figuring out which Node ID has been assigned by the Controller. YMMV...

  • @zboblamont Thank you for the explanation. I think that's a good idea with one ID per node, saving each with the node ID and the version number. Do you have one sketch for each of the types of node, or do you have one sketch per node? Do you use physical labels on the nodes or their cases?

  • @biffhero List of sketches on the folder eg Node8BoilerT3vWNrtc3 tells me it's Node 8, BoilerT tells me it's the Central Heating Boiler temperature monitor, 3vWN is the voltage and Node device, rtc means it has one, and finally the version number 3.
    By embedding the sketch name and version number in the sketch, Domoticz always holds the current sketch and version it's programmed with, as at one point I was switching programs around and lost track which one was on it. 😖
    So, some old sketches I retain as they feature a different technique or method which may come in useful later, but usually old versions are deleted if satisfied with the final.
    It's easy enough to find the sketch in the folder as they follow in sequence.
    Just my methodology but hope this helps...

Log in to reply

Suggested Topics