Same Node id for two separate nodes.
-
I have two sensors in my network ( temp , Hum etc ) and motion detection. both working in auto mode and request node id from controller ( raspberry pi ) node via gateway . but unfortunately, response code of both nodes get same node id 1.
may be bug in sendNextAvailableSensorId() function response.
any idea?Note: I know static node id will work. but Auto mode should also be working.
-
http://forum.mysensors.org/topic/666/how-to-ask-for-help
Which controller software? Which gateway variant?
-
thanks for replying and providing the guideline for newcomer.
Arduino IDE : 1.0.6 ( ubuntu 64 bit)
Controller Software : Nodejscontroller.js using nodejs & mongo db on raspberry pi.
Gateway : running piGatewaySerial code and connecting it to NRF24L01+ transceiver using SPI.
Arduino and Raspberry pi gateway code debug on..
-
Did a quick read-through and there might be a problem in the algorithm for fetching new id (it will return the 1 or max-id every time). @ToSa might be able to shed some light on how it is supposed to work.
https://github.com/mysensors/Arduino/blob/master/NodeJsController/NodeJsController.js#L388
-
This also happened to me once and I don't think is the Nodejscontroller. If I'm not mistaken, this could happen when you have a clean eeprom and connecting both devices at the same time, they will get the same id.
Try to clear the eeprom again and connect the second device only after the first has received the id.
-
If you add a new device and then remove it. After that you add another new device it probably get same Id. Clean EPROM and retry.