BLE to MQTT bridge
Project description
Service to export BLE devices to MQTT with Home Assistant discovery
!!! It is a very early alpha release !!!
Use this software at your own risk.
Default config should be located in /etc/ble2mqtt.json
or
can be overridden with BLE2MQTT_CONFIG
environment variable.
Example run command:
BLE2MQTT_CONFIG=./ble2mqtt.json python3 ble2mqtt.py
The configuration file is a JSON with the following content:
{
"mqtt_host": "localhost",
"mqtt_port": 1883,
"mqtt_user": "",
"mqtt_password": "",
"devices": [
{
"address": "11:22:33:aa:bb:cc",
"type": "redmond200"
},
{
"address": "11:22:33:aa:bb:dd",
"type": "xiaomihtv1"
},
{
"address": "11:22:33:aa:bb:ee",
"type": "xiaomilywsd"
}
]
}
Supported devices:
Kettles:
- Redmond G2xx series (redmond200)
Humidity sensors:
- Xiaomi MJ_HT_V1 (xiaomihtv1)
- Xiaomi LYWSD03MMC (xiaomilywsd)
OpenWRT installation
Execute the following commands in the terminal:
opkg update
opkg install python3-twisted python3-pip python3-asyncio
pip install -U ble2mqtt
Create the configuration file in /etc/ble2mqtt.json and append your devices.
Bluetooth must be turned on.
hciconfig hci0 up
Run the service in background
python -m ble2mqtt 2> /tmp/ble2mqtt.log &
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ble2mqtt-0.1.0a9.tar.gz
(16.7 kB
view hashes)
Built Distribution
ble2mqtt-0.1.0a9-py3-none-any.whl
(20.5 kB
view hashes)
Close
Hashes for ble2mqtt-0.1.0a9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c739981850da2db3f8caecf518bca436a2371fe8551d7d78b5acc04054bded2d |
|
MD5 | cae2d28722fdcc99777e7bebfad85d54 |
|
BLAKE2b-256 | 2f27c84901eb0da55b96aba1a0a762f27b236059200c510d91c3c5b13d6ac130 |