ratcashdev / mitemp

Xiaomi MI Temperature and Humidity Sensor with BLE and LCD
MIT License
106 stars 27 forks source link

MiTemp MQTT demo #13

Closed yolkhovyy closed 4 years ago

yolkhovyy commented 5 years ago

The demo publishes MiTemp measurements on MQTT, usage:

python3 /path/to/mitemp_mqtt.py 58:2D:34:36:82:ED -m -e -s mqtt-server

E.g. cron, every 15 minutes:

/15 * python3 /path/to/mitemp_mqtt.py 58:2D:34:36:82:ED -m -e -s mqtt-server

ratcashdev commented 5 years ago

thanks will check it out.

yolkhovyy commented 4 years ago

I have removed the btlewrap and other unnecessary changes - please review, thanks!

ratcashdev commented 4 years ago

Hi @yolkhovyy, thanks for the update. I have configured Github actions CI for this project. Please update this PR by merging master here. Afterwards fix the flake8 errors. I can see several of them. I don't see tests either for your changes.

yolkhovyy commented 4 years ago

I have merged the original, will make an integration test for mitemp-mqtt.py

Now, I think this pull request is not quite nice idea - it will introduce mqtt client dependency here - and it is probably a bit unexpected dependency. The mqtt demo should probably be a separate project with a dependency on mitemp.

ratcashdev commented 4 years ago

@yolkhovyy You're indeed right. It's better to keep things modular. Anyway thank you for your efforts so far.