Migrate from Passive BLE monitor to BTHome

Recently upgraded my Xiaomi LYWSD03MMC devices (have a bunch) via the pvvx Telink Flasher to use the BTHome protocol.

They are currently working with the HACS “Passive BLE monitor” integration, but I would like to move them over on the “BTHome” integration. How do I do this without having to setup everything from scratch?

My “Bluetooth” integration is set to “Passive scanning”, and all devices are currently with the HACS “Passive BLE monitor”. When trying to add the “BTHome” integration, it will not install, it throws the error “No devices found on the network”.

Screenshot 2023-07-31 at 15.24.38

They will be discovered automatically. You will need to change the advertising format by going to the Telink flasher website, where you flashed the firmware. Connect to your device and you can change the settings. For BTHome, change the advertising format to BTHome, enable the option to send “flags”. After sending the changes to the device, it will start broadcasting in BTHome format after a few minutes (after being disconnected). HA will pick the device up automatically, you only need to click add/configure once after it has been foundation.

Yup, enable the option to send “flags” did the trick! Now I see them in HA, and the values are also seen!

Thanks!

How are they being discovered automatically? I have tried with 5 different sensors, each flashed and set to BTHome v1. Nothing appears, the integration never loads into Home Assistant (2023.2.2 running in Docker on a Raspberry Pi 3). I can see them all when I run:

sudo hcitool lescan

Hi Dan!

Just do as Ernst stated above:
“You will need to change the advertising format by going to the Telink flasher website, where you flashed the firmware. Connect to your device and you can change the settings. For BTHome, change the advertising format to BTHome, enable the option to send “flags”. After sending the changes to the device, it will start broadcasting in BTHome format after a few minutes (after being disconnected). HA will pick the device up automatically, you only need to click add/configure once after it has been foundation.”

After this, they will be automatically detected. The “For BTHome, change the advertising format to BTHome, enable the option to send “flags”.” is the most important part.

Thanks for the reply. I did do all that and still nothing.

While I didnt find out the root cause of the issue, stopping the docker container, editing my docker-compose file to include a dbus volume for Home Assistant and then bringing it back up seems to have worked:

Volumes:
  - /run/dbus:/run/dbus:ro

Also make sure that the Bluetooth integration is installed/working! This is the integration that takes care of receiving the data in the first place (and forwarding it to the BTHome integration or one of the other BLE integrations).

I have been using custom BLE integration for a long time because at a time it was the only one working with my Xiaomi LYWSD03MMC sensors. I would like to get rid of it because after upgrading HA often i have to manually update the integration.
All my devices are on a very old version of pvvx fw.
I flashed one sensor to the latest pvvx firmware and enabled BTHome v2 format.
In HA (docker on linux host) i enabled Bluetooth and added dbus directory.
After restarting the container I have 2 integrations discovered the same sensor :slightly_smiling_face:
Which one to use, BTHome or Xiaomi BLE?
Didn’t even now the second one exists :slight_smile: