Git Product home page Git Product logo

ble2mqtt's Introduction

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 &

ble2mqtt's People

Contributors

devbis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.