Skip to content

Script to read Xiaomi Flora values and publish it via MQTT

Notifications You must be signed in to change notification settings

marcelrv/miflora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Xiaomi mi flora

Script to read Xiaomi Flora values and publish it via MQTT to be used in Openhab or other home automation

It will scan for all Xiaomi miflora devices and publish the values to the MQTT server.

Paho (mqtt) and gatt libraries are required.

to install :

sudo apt-get install python-pip
pip install paho-mqtt
pip install gattlib

this requires Bluez 5.37 or higher to be installed as well. Gattlib requires libbluetooth-dev and libboost-python-dev to be available as well.

To run this as non-root run the following

sudo setcap cap_net_raw+eip $(eval readlink -f `which python`)

to run this in an automated way every 30 min add to the crontab the script:

$ crontab -e

add the line:

*/30 * * * * /usr/bin/python /home/ubuntu/miflower.py >/dev/null 2>&1

(replace the last part with your file name & path)

Based on the script created by emeryth https://wiki.hackerspace.pl/projects:xiaomi-flora

About

Script to read Xiaomi Flora values and publish it via MQTT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages