basnijholt / miflora

☘️🌑🌼πŸ₯€πŸ‘ Mi Flora Plant sensor Python package
MIT License
362 stars 99 forks source link

MiFlora MQTT demo #139

Closed yolkhovyy closed 4 years ago

yolkhovyy commented 4 years ago

MiFlora MQTT demo

Can be used for publishing MiFlora measurements/health/device info on MQTT, e.g. with cron: /5 * python3 /path/to/miflora-mqtt.py C4:7C:8D:65:CB:63 C4:7C:8D:65:D0:20 --measurements --health --devinfo --server 192.168.1.xyz

The measurement option will publish:

The health option will publish:

The devinfo option will publish:

ChristianKuehnel commented 4 years ago

Thank you for the proposal.

This is somewhat redundant to existing tools that do exactly this.

Why should we do it in the miflora library?

yolkhovyy commented 4 years ago

I agree the library is not the best place indeed.

ThomDietrich commented 4 years ago

Hello @yolkhovyy, seems like you are doing something very similar to what we've done over in https://github.com/ThomDietrich/miflora-mqtt-daemon Would be interested to know if you missed something or want to contribute a feature. Best!

yolkhovyy commented 4 years ago

Hi @ThomDietrich, the MiFlora/MQTT code I made is quite old - I am using it to collect MiFlora metrics in my wife's greenhouse for some time. Recently I cleaned the code up and thought it might have been interesting for other people - was not aware there were off-the-shelf alternatives. I will check the miflora-mqtt-daemon out certainly. I saw (if I am not mistaken) it has nice things that I would like to have too - like configuration and discovery. Thanks a lot for pointing me at the daemon!