ioBroker / ioBroker.mysensors

Support of mysensors from
https://www.mysensors.org/
MIT License
7 stars 9 forks source link

Problem with adding new node #22

Closed apla2016 closed 4 years ago

apla2016 commented 4 years ago

I am trying to add a node to an existing mySensors configuration in ioBroker, but instead of adding dedicated Light Lux Sensor node, it renames existing node 10 and adds line 10.1_Light_Level. Tried multiple times, same result. My all nodes are based on 2.3.2 software. IoBroker uses latest mySensors adapter 2.0.0.

image

jangatzke commented 4 years ago

I had the same problem, too. I fixed it for me and created a pull request: #23

apla2016 commented 4 years ago

#

I had the same problem, too. I fixed it for me and created a pull request: #23

Thank you for good news! How dificult is to fix it? Where the fix needs to be done, in adapter?

jangatzke commented 4 years ago

Did you have a look at the pull request #23 I linked above? It's an easy fix, you only have to modify one line.

Replace devices[_id].native.id > maxId) By parseInt(devices[_id].native.id,10) > parseInt(maxId,10)) in line 551 of main.js.

apla2016 commented 4 years ago

I am sorry, not familiar much with the system. Where is this file main.js located? Thank you

jangatzke commented 4 years ago

No problem. You can find it in your-iobroker-directory/node_modules/iobroker.mysensors/main.js

apla2016 commented 4 years ago

Thank you, found it, made a change, deleted node 10, restarted server, tried to add two nodes, but same problem - they are getting merged together as node #10 again, same as shown above.

20200529_190017

jangatzke commented 4 years ago

A MySensors node asks for an ID only once. The ID is then saved in the eeprom. You have to clear the eeprom of the last added node. There is a clear eeprom sketch that comes with the mysensors library. You will find it in the examples folder. Flash this sketch to you node. Wait a few moments and reflash the mysensors sketch. The node should request a new ID at start.

apla2016 commented 4 years ago

After clearing the EEPROM and reloading the code the node is recognized as #11. Thank you for your help!