This is a simple scheduled python script in the a Docker image and runs every 5 minutes. The script polls the Xiaomi BLE Temperature and Humidity sensors and publishes the measurements to the specified MQTT.
Need install the Docker (and optionally the Docker compose).
git clone https://[email protected]/kovacsguido/docker-xiaomi-ble-to-mqtt.git
Execute the follow command:
docker-compose up -d
The container creates two configuration files at first run. These two files is the devices.ini and the mqtt.ini. Please fill in the mqtt.ini file based on the sample content!
Enter the container and search the available devices.
dokcer-compose exec ble2mqtt /bin/bash
hcitool lescan
Look for line which looks like this:
4C:65:A8:D4:A3:1D MJ_HT_V1
Make a note of the sensors' MAC address.
Open the devices.ini and enter the data of devices based on the sample content.
Content type
Image
Digest
Size
180.7 MB
Last updated
over 6 years ago
docker pull kovacsguido/ble2mqtt