limitium / wand

Xiaomi sensors bluetooth advertisement listener for esp32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wand - Xiaomi sensors bluetooth advertisement listener for esp32

Build Status License

Inspired by https://github.com/custom-components/sensor.mitemp_bt

Features

  • Simplest usage and api ever
  • Supports a lot of Xiaomi sensors

Quick start

void setup()
{
    Serial.begin(9600);

    WAND::Wand wand = WAND::Wand([](const char *sensorName, BLEAddress mac, const char *paramName, float value) {
        Serial.printf("Sensor: %s, param: %s, val: %.2f\n", sensorName, paramName, value);
    });

    wand.init();
}

Supported sensors

  • WRDSNR01

    (custom co2 sensor, build on top of esp32)

    WRDSNR01

  • LYWSDCGQ

    (round body, segment LCD, broadcasts temperature, humidity and battery level, about 20 readings per minute)

    LYWSDCGQ

  • CGG1

    (round body, E-Ink, broadcasts temperature, humidity and battery level, about 20 readings per minute)

    CGG1

  • LYWSD02

    (rectangular body, E-Ink, broadcasts temperature and humidity, about 20 readings per minute, no battery info)

    LYWSD02

  • LYWSD03MMC

    (small square body, segment LCD, broadcasts temperature and humidity once in about 10 minutes and battery level once in an hour, advertisements are encrypted, therefore you need to upload custom firmware

    LYWSD03MMC

  • MHO-C303

    (Alarm clock, rectangular body, E-Ink, broadcasts temperature, humidity and battery level, about 20 readings per minute)

    MHO-C303

  • JQJCY01YM

    (Xiaomi Honeywell Formaldehyde Sensor, OLED display, broadcasts temperature, humidity, formaldehyde (mg/m³) and battery level, about 50 messages per minute)

    supported sensors

  • HHCCJCY01

    (MiFlora, broadcasts temperature, moisture, illuminance, conductivity, 1 reading per minute, no battery info with firmware v3.2.1)

    HHCCJCY01

  • GCLS002

    (VegTrug Grow Care Garden, similar to MiFlora HHCCJCY01)

    GCLS002

  • HHCCPOT002

    (FlowerPot, RoPot, broadcasts moisture and conductivity, 2 readings per minute, no battery info with firmware v1.2.6)

    HHCCPOT002

  • WX08ZM

    (Xiaomi Mija Mosquito Repellent, Smart version, broadcasts switch state, tablet resource, battery level, about 50 messages per minute)

    supported sensors

Exmaple

  • Basic - basic=full usage example

Dependencies

License

Wand is open-source software licensed under the MIT license

About

Xiaomi sensors bluetooth advertisement listener for esp32


Languages

Language:C++ 100.0%