HACS Passive BLE monitor Xiaomi LYWSD03MMC with ATC

Using the HACS Passive BLE monitor with my Xiaomi LYWSD03MMC running ATC. As of yesterday, after updating to 12.3.2 via HACS, my dashboard are no longer getting updates for my 10+ devices! These have worked almost flawlessly since they were set-up!
Any ideas on where I should start looking for the issue? Have not seen anything specific in the logs related to this, but unsure what to look for!

The HACS Passive BLE page talks about a gradual migration of sensors to core integrations, starting last year. Xiaomi is on the list. Should you be using this instead?

“After the move, BLE monitor will probably be deprecated.”

Maybe, but how do I get that integration working? When I follow the guide, it throws this error:
Screenshot 2023-07-26 at 15.33.25

But I can see the devices under “Devices”:

So I know they are there, they are just not updated anymore:

Do I need to remove the “Passive BLE monitor”?

Screenshot 2023-07-26 at 15.43.17

So, I started looking into this today since I had gotten no useful responses except for using the “Xiaomi BLE” integration. What I found was that the “Xiaomi BLE” integration only works with the factory firmware using bind-keys. When updating these with the Telink flasher (like I did), the bind-key is removed! (Telink Flasher) Flashing them back to factory firmware seems to fail more often than it is successful, so I will not go that route. Battery also lasts at least 50% longer with the ATC-firmware saving me money and the environment.

This means I most likely need to keep using the HACS “Passive BLE Monitor”, or use something like the “ESP32 Bluetooth Low Energy Tracker Hub” (ESP32 Bluetooth Low Energy Tracker Hub — ESPHome). The second option will not work for me, since I have specifically acquired a Class 1 Bluetooth device (Amazon.com) and put it on a 6 foot cable to remove interference from the HA-CPU, and to reliably/consistently cover my whole house.

So, I started digging into the HACS “Passive BLE Monitor” again. When checking all settings, I find that bluetooth is disabled for the integration! This must have happened during upgrade to the 12.3.2 version. Did not find any warnings about this, and cannot find release-notes.

After changing this to using the bluetooth-adapter, it started working again! So, a simple oversight and easy fix!

1 Like

Not sure why your Bluetooth adapter setting was changed, this can happen if the Bluetooth adapter for some reason is not found during startup.

Anyways, you can use stock firmware with the Xiaomi-BLE integration, or you can use the pvvx custom firmware, and set it to broadcast in BTHome format. It will than be recognized by the BTHome integration.

BLE monitor will be updated till all sensors are available as core integrations, and I’m afraid that will take a long while.

Ok, tried upgrading to the pvvx firmware, and changed broadcast to BTHome format. My thermometers are now showing with way too may decimals.
What is the advantage of using BTHome over other formats?
Do I need to remove the HACS “Passive BLE Monitor” before BTHome will see devices and install the integration?

Screenshot 2023-07-30 at 00.36.53

Screenshot 2023-07-30 at 00.34.35

For the bthome integration, you need the Bluetooth integration to be installed.
Scanning mode should be the same (both passive scanning) for ble monitor and the Bluetooth integration. Otherwise they wont work at the same time.

The nummer of decimals should be using the default of. I think, 1 decimal for temperature. You can change it in the UI. Are you using a custom card to display the data
? It look like it doesnt respect the suggested display precision property.

Looks like you’re using the multiple entity row custom card and this is a short-coming of that card; you have to manually specify the number of decimals to show (it ignores the display precision setting) :

  - entity: sensor.pws_outdoor_humidity
    type: custom:multiple-entity-row
    name: Outside Temp / RH
    icon: mdi:thermometer
    format: precision0
    entities:
      - entity: sensor.pws_outdoor_temperature
        name: false
        format: precision1
1 Like

Yep, you are right! Already checked the GUI, and it is set to 1 decimal, but setting it in the “multiple entity row custom card” as suggested did the trick!

Screenshot 2023-07-30 at 11.39.44

For the Bluetotth integration, it is already installed, and set to passive scanning.

BTHome still throws the same error as already pasted above when trying to install (“No devices found on the network”). What is the advantage of “BTHome” over the HACS “Passive BLE Monitor” or other formats?
Do I need to remove the HACS “Passive BLE Monitor” before BTHome will see devices and install the integration?

I don’t know for sure, but I’m guessing the answer is yes.

Can’t speak to any backend benefits, but the general benefit I see is using an integration that is baked into HA and natively supported. It SHOULD be more stable relative to any future HA changes.

@Ernst, do you happen to know the answer to:

Do I need to remove the HACS “Passive BLE Monitor” before BTHome will see devices and install the integration? How do I get BTHome to not expect a bind-key?

What is the advantage of “BTHome” over the HACS “Passive BLE Monitor” or other formats?

No, that is not needed, you can use both at the same time, as long as both ble monitor and the Bluetooth integration are using the same scanning mode ( e.g. passive scanning).

You can turn off encryption in the pvvx firmware settings, which you can change with the telink flasher website (the same website you used to flash the device). One ot the settings is to turn off encrypted BLE advertising. Also enable the option to send “flags”.

BTHome is a BLE format ( opensource ). Xiaomi’s own format is called MiBeacon. The disadvantage of Xiaomi MiBeacon on your sensor with stock firmware is that it is only broadcasting one message per 10 minutes, which makes the response time very slow. If reception is not that good, it can take even more time before it updates. BTHome is a slightly more efficient format (less bytes). With the pvvx firmware you can send it as many times per minute as you want,

BLE monitor is just the receiving software, that decodes the bytes to sensor data in HA, both for MiBeacon and for BTHome, and many others, including the other available formats in the pvvx sensor. We are moving parts of the BLE monitor to official, brand specific, BLE integrations in HA. MiBeacon is supported with the Xiaomi BLE integration, BTHome with the BTHome integration. These integration on their turn use the Bluetooth integration for the scanning of the raw data, while BLE monitor is using a different, built in, scanner (aioblescan).

2 Likes