custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.93k stars 248 forks source link

[Bug]: Does "Passive BLE Monitor" support multiple objects with the same ID (BTHome format)? #1407

Open pvvx opened 6 hours ago

pvvx commented 6 hours ago

What happened?

Multiple objects with the same ID are not tracked (BTHome format). Only the last "objects" is displayed.

Sample:

Displayed sensors in "Passive BLE Monitor": image No second "opening".

Displayed sensors in "BTHome" integration: image

Sensor type

DIY

Relevant log output

No response

pvvx commented 6 hours ago

image


image

(The configuration shown here and similar ones have long been present in alternative firmware for thermometers.)

And there is a difference in the names of sensors with the same ID. Example: "Power" in BTHome , and "Switch" in "Passive BLE Monitor"...

Switching to BTHome integration is difficult, as there is no support for all types of BLE devices. Sharing BT adapter does not work on different configurations.

Another problem occurs when using two BT adapters. This is due to the fact that one adapter receives in the "LE Long Range" and "Legacy" modes (PHY 1M + PHY Coded - BT5.0+), and the second only "Legacy" (PHY 1M - BT4.0). When the BT adapter operates in two modes, it switches sequentially to receive one of the PHY types. During this time, events may arrive and gaps may occur. For these reasons, it is advisable to turn on the second adapter only for "LE Long Range" reception. But then nearby sensors working with another adapter and "Passive BLE Monitor" integration are deprived of sensors. "Passive BLE Monitor" does not support BT adapter operation in BT5.0+ modes. Resets in PHY 1M mode (when accessing the "Bleak" API. "Bleak" API does not support BT adapters with Bluetooth version higher than 4.2.)