DheerajKhajuria / pimatic-mysensors

mysensors
http://forum.mysensors.org/topic/797/pimatic-mysensors-controller-plugin
GNU General Public License v2.0
23 stars 24 forks source link

NodeId for new nodes is working now #25

Closed TheRaspyDev closed 9 years ago

TheRaspyDev commented 9 years ago

New nodes without nodeId are now getting the next available node id from the gateway as defined in config.json (startingNodeId)

sweebee commented 9 years ago

nice, going to test

TheRaspyDev commented 9 years ago

For me it worked. Only a small fix. The code was already there :-)

I also want to create some unit tests for the gateway functionality of the MySensors gateway (board.coffee).

sweebee commented 9 years ago

what happens if i set start id to 1 and i already have a node with id1 hardcoded?

And how do i add a device now? Do i have to define the id?

TheRaspyDev commented 9 years ago

Not tested. From my understanding, the new node will also get nodeId 1. This should be improved. It would also be great to create a device in the config.json when a new node is available. The node presents it's sensors to the gateway.

sweebee commented 9 years ago

added change in board.coffee and added "startingNodeId": 100

tried a sensor but it gets sensor ID 0, second node also gets ID 0

Working, had to clear the eeprom :).