miflora-mqtt-daemon icon indicating copy to clipboard operation
miflora-mqtt-daemon copied to clipboard

Enhancement: Report all discovered sensors

Open hakan42 opened this issue 5 years ago • 3 comments

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.

hakan42 avatar Jan 06 '19 14:01 hakan42

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:

  • Introduce a sane OOP structure
  • Switch Bluetooth backend
  • Switch to Homie 3 as the default convention
  • Improve the systemctl status output
  • Introduce complete configurability via MQTT (with a fallback config.ini).

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

ThomDietrich avatar Jan 10 '19 10:01 ThomDietrich

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 😄

hakan42 avatar Jan 10 '19 10:01 hakan42

👍

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

ThomDietrich avatar Jan 10 '19 10:01 ThomDietrich