Passive BLE Monitor integration

Passive BLE monitor integration

ATC, BlueMaestro, Brifit, b-parasite, Govee, Inkbird, iNode, Kegtron, Moat, Oral-B, Qingping, Ruuvitag, SensorPush, Teltonika, Thermoplus, Xiaogui and Xiaomi (MiBeacon and Mi Scale) sensors and device tracking

This custom component is an alternative for the standard build in mitemp_bt integration and the Bluetooth LE Tracker integration that are available in Home Assistant. BLE monitor supports much more Bluetooth Low Energy (BLE) sensors than the build in integration. Unlike the original mitemp_bt integration, which is getting its data by polling the device with a default five-minute interval, this custom component is parsing the BLE packets payload that is constantly emitted by the sensors.

Advantage of this integration is that it doesn’t affect the battery as much as the built-in integration. It also solves connection issues some people have with the standard integration (due to passivity and the ability to collect data from multiple bt-interfaces simultaneously). Read more in the FAQ .

BLE monitor also has the possibility to track BLE devices based on its MAC address or UUID. It will listen to incoming BLE advertisements for the devices that you have chosen to track.

Link to the documentation

Supported sensors

Xiaomi (MiBeacon format)
LYWSDCGQ, LYWSD02, LYWSD03MMC, XMWSDJ04MMC, MHO-C303, MHO-C401, JQJCY01YM, JTYJGD03MI, HHCCJCY01, HHCCJCY09, GCLS002, HHCCPOT002, WX08ZM, MCCGQ02HL, YM-K1501, V-SK152, SJWS01LM, MJYD02YL, MUE4094RT, RTCGQ02LM, MMC-T201-1

Yeelight (MiBeacon format)
YLAI003, YLYK01YL, YLYK01YL-VENFAN, YLYK01YL-FANRC, YLYB01YL-BHFRC, YLKG07YL, YLKG08YL

Linptech (MiBeacon format)
K9B switch

Qingping (Qingping and/or MiBeacon format)
CGC1, CGG1, CGDK2, CGD1, CGP1W, CGH1, CGPR1

Xiaomi (Mi Scale format)
XMTZC01HM, XMTZC02HM, XMTZC04HM, XMTZC05HM, NUN4049CN

Sensors with custom ATC firmware (custom pvvx and/or atc1441 format)
LYWSD03MMC, MHO-C401, CGG1 and CGDK2

Govee
H5051, H5071, H5072, H5074, H5075, H5101, H5102, H5177, H5178, H5179, H5183

Oral-B
Toothbrush 7000 series

SensorPush
HT.w, HTP.xw

Kegtron
Kegtron KT-100, KT-200

Teltonika
Blue Puck RHT, Blue Puck T

Thermoplus
Smart Hygrometer, Lanyard Hygrometer, Mini Hygrometer

Brifit
T201

BlueMaestro
Tempo Disc THD and THDP

Ruuvitag
Ruuvitag sensors

Inkbird
iBBQ thermometer (1, 2, 4 and 6 probes versions), IBS-TH2

iNode
iNode Energy monitor, iNode care sensor 1 till 6, T, HT, PT, PHT

b-parasite
Plant sensor

Relsib
Relsib EClerk Eco

Beacon protocols
iBeacon protocol
altBeacon protocol

A list of all supported sensors with their description and image is available here.

Device Tracking
All devices with a static MAC address can be tracked with BLE monitor

This topic was created in addition to github issues as a place where you can more freely discuss the operation of the component, ask for support, leave feedback and share your experience.

If you are looking for support, please spend some time reading our Frequently Asked Questions , as it may already contain the answer to your question.

22 Likes

Welcome to this second topic about BLE monitor. The previous topic had almost 900 replies and as I was not able to modify the opening post, we decided to move to this new topic.

Let’s discuss about sensors you want to be added, questions you have and/or new features!!!

New release
Today version 1.8.3 has been released. This version adds support for Kegtron :beer: devices. You can now keep track the amount of beers from the tap in Home Assistant. I also splitted up the BLE parser in individual files, to make it easier in the future to add other sensors.

3 Likes

1.9.2 Released
We have a new release available with some new devices added and some changes in the battery sensors and reporting of unknown new sensors.

  • Add initial support for Xiaomi Mi Electric Toothbrush T500. This version is a first draft. We are looking into the meaning of the different states. If you have more info which state corresponds to what, please post a message in issue #319
  • Add additional Qingping CGG1 sensors that use a different type code (thanks @swingerman)
  • Battery entities are now enabled by default. You can disable battery entities with batt_entities: False
  • Expand functionality of the report_unknown function, you can now specify a specific format to log (Xiaomi, Qingping, ATC, Mi Scale or Kegtron) or you can even log all BLE advertisements (use Other).
  • Bug fix for too short encrypted messages, fixes #322
1 Like

Hi Ernst,
Yesrterday, I couln’t remove a sensor. So, I tried to remove Ble-monitor integration.
I updated (installed with pthon venv) form 2021.3.1 to 2021.5.1, and now, I can’t find ble monitor nor passive ble monitor in HACS, is it normal?

Try to refresh you browser and clear the cache. Also check that it is installed in HACS.

Sorry, maybe I wasn’t clear.
I can’t install it, because it is not proposed by HACS.
I seacrhed with keyword "passive, or “ble” or “monitor”.
I clear my browser cache (Firefox) and tried another one (Chromium).

Ah, sorry. Can you check the custom_component folder, is there a folder ble_monitor?

$ ll /home/homeassistant/.homeassistant/custom_components
total 16
drwxr-xr-x  4 homeassistant homeassistant 4096 mai    7 21:40 ./
drwxrwxr-x 10 homeassistant homeassistant 4096 mai    8 08:30 ../
drwxrwxr-x  4 homeassistant homeassistant 4096 mai    7 21:40 ble_monitor/
drwxr-xr-x 12 homeassistant homeassistant 4096 mai    7 21:15 hacs/

Hum, there were still some files there.
After removing them, I restarted homeassistant service.

Sorry for french screenshot

Ok, sorry, I wasn’t searching correctly… I found it.

Really sorry.

No problem, glad you solved it

Hi @Ernst , I’ve successfully connected CGG1 sensor to my Home Assistant installation. But my update rate is 1 time in 10 minutes (at least judging by Grafana) instead of 20 updates per minute as in the FAQ.
Is there any way to debug this? I am a bit new to the HA ecosystem, but proficient in programming. So any help on where to start would be appreciated

The problem with these CGG1 sensors is that there are multiple versions. Moreover, they send data in Qingping format, as well as Xiaomi MiBeacon format. It might very well be that they changed the interval in a new version. If you have a version with encryption, make sure you set the encryption_key in the options, in that way it will use both formats, one might be sending out data more frequent than the other.

If you have a CGG1-M, you can try the custom ATC firmware, which will allow you to set the broadcast interval yourself. Flashing is easy with the online tool.

Yup, I indeed have the encrypted vesion and I’ve set it up in the config.
The production date is January 2021, IDK if that’s the “new” version (Xiaomi Home app says i have the latest firmware version)
Is there a way to debug and analyze that it is 100% the sensor that is sending the data not too often?
I really don’t want to tinker with the firmware on such “closed” devices

Yes, you can use hcidump with the following command.

sudo hcidump --raw hci > dump.txt

Count the number of messages with the Mac of your sensor and measure the time you collected the data. The MAC address is in reversed order per two characters.

what is your current firmware?

My version is 1.1.1_0208

Screenshot

photo_2021-05-15_10-05-06

I’ve made the measurments:
82 occurences in 90 seconds (41 in the row starting with > symbol)
I guess those are the “unique” messages. That is far more often that once in 10 minutes. Do you have any ideas where should I dig to find the root cause?

there are at least 2 eink versions in mi home. i have CGG1-M (cgllc.sensor_ht.g1). it has fw 1.1.2 and sends adv very often.

BLE monitor filters out the messages based on unique frame count number, so you first have to check how many messages you have with a unique frame count number. See this page, you need to check column R (frame cnt) or send me the file in a PM.

Hello all.
I want use integration with ext. USB-dongle (Hassio on VM “NAS-Xpenology”). What USB-dongle can you recommend for using with your integration “Passive BLE Monitor”?
Привет парни, спасибо за разработку. Какой недорогой внешний USB-стик брать (возможно с Али), который гарантировано заведётся с интеграцией, без конфликтов и т.д.?