Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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 &

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.0a3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ble2mqtt-0.1.0a3-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file ble2mqtt-0.1.0a3.tar.gz.

File metadata

  • Download URL: ble2mqtt-0.1.0a3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for ble2mqtt-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 804f8db8b12bcef72b924a5eac7680690aa02cb13b075c6bea6f6089ce127e82
MD5 03bea7d23fe82776b998d7aaa84fdd9c
BLAKE2b-256 c6e89a2acfcb5321bfdbeeb3c41fb54de42a68db0ac70acf5d02d6e42800868c

See more details on using hashes here.

File details

Details for the file ble2mqtt-0.1.0a3-py3-none-any.whl.

File metadata

  • Download URL: ble2mqtt-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for ble2mqtt-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 269ff80a96d6d666190512289c893fda694767bc198b1be2f5034152e6b6bc30
MD5 214b4327e997c7cde137e28173b25d2c
BLAKE2b-256 19d78170c53770a871890943d1aeba35ffc920d91223ed2dceb8db7acb5b7590

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page