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.0a10.tar.gz
(17.5 kB
view details)
Built Distribution
File details
Details for the file ble2mqtt-0.1.0a10.tar.gz
.
File metadata
- Download URL: ble2mqtt-0.1.0a10.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42c1ffde9399ef6b03a1993612cd719566480a754a0469c29ccd62f1af5124d5 |
|
MD5 | 3c8519f4e6b01d54ba0448aac154c4d7 |
|
BLAKE2b-256 | c511d1407a92e0131e194ac9ae2e6afc33b90aa91d9870205192206dbb9b3b64 |
File details
Details for the file ble2mqtt-0.1.0a10-py3-none-any.whl
.
File metadata
- Download URL: ble2mqtt-0.1.0a10-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c9cd8d315a2f1ea083832cd88c5eb8fbeee9799740f51e11b4b859d9adb3df |
|
MD5 | fb37d6965053d7b79752f49a4488bd4b |
|
BLAKE2b-256 | 6e07ed16406123fb0edeb0c3f1da8e54e7cbf20a902cb9d0a2ba908d0361d3b2 |