ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼🥀🏡🌳
MIT License
606 stars 141 forks source link

Enhancement: Report all discovered sensors #66

Open hakan42 opened 5 years ago

hakan42 commented 5 years ago

It would be very useful if the daemon would report any and all Plant sensors it found to the MQTT server. That way, I could just configure and deploy a Pi zero in the glasshouse ("Gewächshaus" in german) and won't need to touch it ever again, basically creating a solid-state miflora gateway.

If no "pretty name" has been configured, the Bluetooth MAC could be used as a topic, maybe without the ":" signs in it.

ThomDietrich commented 5 years ago

Great topic! See also https://github.com/ThomDietrich/miflora-mqtt-daemon/issues/35 for MQTT based configuration. The two topics are related as the reporting would support MQTT based configuration. The restricting issue right now is the fact that hcitool lescan needs to be called with root privileges. This might change when we change the backend used. There are a few ideas in my mind how to proceed with this project but I need to find the time to do so. Here are a few:

Would you be interested to contribute something? Please feel free to add your thoughts.

hakan42 commented 5 years ago

I might work on #35 as real auto-reporting seems to be much more complicated (I'd love to avoid running daemons as root)

It would be earliest next week, though, as I am pretty full with work on the nanoleaf binding for openHAB 😄

ThomDietrich commented 5 years ago

👍

Amazing! The #35 is something we should first discuss and design. If you'd like to contribute code, could you imagine working on point 4 of my list, also discussed here: #16