Node/sensor id process


  • Hero Member

    When I uploaded an new sensor sketch to my newly built arduino sensor, I noticed the serial monitor showed it communicating to the ethernet gateway and it seemed to have a node id. I checked the eeprom and it did have a node id (I am sure that it did not before the sketch upload). I thought that the id was assigned during the inclusion process and I had not included the sensor in Vera yet. Am I wrong on this?


  • Admin

    It uses the temporary node id 255 during id-exchange. If that was what you saw.


  • Hero Member

    @hek It had the node number 4 in eeprom. The eeprom contents were 401 in first 3 bytes. I know they were all 255 before I started. Since I have 3 sensors, 4 would be the right number for the next id. I guess you're saying this shouldn't happen?


  • Admin

    Node-id-handout is dependent on the controller you´re using.
    The vera plugin hands out ids to nodes even if no inclusion process has started.


  • Hero Member

    @hek OK. Thanks for your response. So you are saying that what happened is normal. If this is the case, the description of the sensor id process in mysensors.org is somewhat misleading.

    If you are testing sensors that you have not been included, they would already have id numbers. I guess this could cause gaps in id numbers if you don't include them in the order you have tested. To override that you would have to overwrite the eeprom with the id number you want. I found that when I went to include a sensor that had been tested and had id assigned as 4, vera tried to create both a number 3 and 4 node since I had not included the sensor that was assigned id 3 yet. Think Vera got confused. I deleted the false number 3 node in Vera and all was fine, but was curious what caused that. Now I think I know.


  • Admin

    @Dan-S. said:

    If this is the case, the description of the sensor id process in mysensors.org is somewhat misleading

    Out of curiosity. Which part of the text is misleading?


  • Hero Member

    @hek I take that back after rereading the text. It said the controller assigns the id which is true in the Vera case that is discussed above. My mistake was in assuming that the controller does not recognized the sensor (that it is only communicating with the gateway) until the inclusion process is started.


  • Hero Member

    @hek Just wondering. Is there something unique about Vera that makes for the plugin providing a sensor node when the sensor first wakes up and communicates? If the plugin could be changed (without a lot of difficulty) to keep the default 255 designation and only hand out a node id when the inclusion process is started it would be more intuitive (at least to me) and potentially reduce node id problems. I don't know enough about the plugin details to know whether this question makes sense.


  • Admin

    It would be possible. But resulting in many other problems.

    In your proposal if two new sensors would be started (without any id) at almost the same time they will both continue to use the temporary id (until someone start inclusion mode). This means the sensor network has no way of routing the id-request back to the correct node. Or they could both pick up the same id-response.

    So... it is actually a good thing that a node gets a unique id as soon as possible.


  • Hero Member

    @hek Got it. Thanks. Hadn't thought of that.


Log in to reply
 

Suggested Topics

61
Online

11.4k
Users

11.1k
Topics

112.7k
Posts