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

Auto ID #60

Closed dpressle closed 8 years ago

dpressle commented 8 years ago

Hi,

I love this plugin thanks for doing it.

When do you thing an auto sensor/node id will be available? is it planned?

Thanks, Daniel.

sweebee commented 8 years ago

Auto id is available. Just set it to AUTO in the sketch and make sure the eeprom is empty

dpressle commented 8 years ago

Thanks for the fast reply. How do i get the new id so i can add a device? Do i need to look at some log file?

sweebee commented 8 years ago

You can look at the log file from pimatic in the interface > menu > messages (or pimatic-daemon.log if debug enabled), or look at the serial output of the sensor when it's starting.

DheerajKhajuria commented 8 years ago

@sweebee you are right, Auto ID is available in mysensor arduino sketch . unfortunately mysensors plugin doesn't have the capability to handle the Auto ID properly . Not sure there is support in pimatic framework to add devices at runtime.

sweebee commented 8 years ago

Yes, still limited in this version of pimatic. Version 0.9 is much more advanced. Like an API for auto discovering/adding devices, modifying etc.

DheerajKhajuria commented 8 years ago

@sweebee Is version 0.9 working ? any issues ?

sweebee commented 8 years ago

Not finished, but sweetpi is working hard on it. I have tested it but this plugin is not working ;)

sweebee commented 8 years ago

I'm working on checking if the device is already in the config so it skips it.

Auto discovery for devices is currently working in pimatic v0.9.

sweebee commented 8 years ago

Added a feature which checks if the device already exists on id request.

example:

Previously it would get id 15, but now it checks if 15 already exists by another sensor and it will give id 16 (if that only also doesn't exists, etc).

see https://github.com/DheerajKhajuria/pimatic-mysensors/commit/5cfe0e84642694b7aa21371d61ad34f291b3a2f6