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.0a8.tar.gz (16.3 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.0a8-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ble2mqtt-0.1.0a8.tar.gz
  • Upload date:
  • Size: 16.3 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.0a8.tar.gz
Algorithm Hash digest
SHA256 119101624905e48a81ec4c97573971c6b25694841f538caf5703a2eacc430449
MD5 ae39a65f3ef99416839307f98374b712
BLAKE2b-256 c97364828918d3b9fedcb2c5bdd6d9000c4da80e95f0090da0fdd2b396241df4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ble2mqtt-0.1.0a8-py3-none-any.whl
  • Upload date:
  • Size: 20.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.0a8-py3-none-any.whl
Algorithm Hash digest
SHA256 4acf29a5315c8273fd5133ba230f6bdc984eacc3244940411994aebcb8187eda
MD5 40faba603a0d338d3b5c58e84b233891
BLAKE2b-256 dc9012e87a83f422a863f3119ee529681e89a05a66ad6a94cf6a71f2655500b6

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