Closed Sk4zz closed 1 year ago
This needs some explanation
BLE monitor is NOT working with Bluetooth Proxy and is also NOT working with the internal Bluetooth integration.
internal BLE monitor is using aioblescan to get access to the BLE data at a lower level (HCI scan) compared to the internal Bluetooth integration. The internal Bluetooth integration is using bleak, which on its turn is using bluez.
external BLE monitor is working with ESPHome BLE gateway, as equivalent to Bluetooth Proxy.
So, two different ways to get the data, which don't work together.
Keep in mind that we are moving stuff from BLE monitor to HA Bluetooth integrations. BLE monitor can be seen as the predecessor of the Bluetooth integration + the individual BLE integrations (like Xiaomi-ble, govee-ble exc). Bluetooth proxy can be seen as the predecessor of Bluetooth proxy.
Now, the explanation why the Mi Scale isn't working. You are using Bluetooth Proxy to forward data to HA. The Bluetooth integration does receive this data, but it also needs an integration that understands the data. The Xiaomi-BLE integration is not yet able to parse MiScale data. MiScale is using a different format that the other Xiaomi sensors, and MiScale isn't converted yet. So, you have to wait till that is done. It's on my planning, like many other things.
If you place your scale close to your HA machine, and you install BLE monitor, it should be able to receive the data from the Miscale (via BLE monitor, NOT via the Bluetooth integration). But note that you use the same type of scanning (active/passive) for both integrations, if you want to use both (e.g. for other sensors). You can also use ESP gateway to forward the data to BLE monitor.
Hopefully it makes it a bit more clear.
Hi Ernst,
thank you for your quick and thorough reply! Indeed you made it a lot clearer.
I just realized that I can use Bluetooth proxy and Bluetooth gateway at the same time (at least it seems so). Now the MiScale was discovered by BLE monitor. However, the impedance seems not to be reported but that is a separate problem, that I will try to figure out myself.
Can I subscribe somewhere to get a notification as soon as the Mi Scale integration was moved to the native integration?
I thought I have seen a similar issue about the impedance. If you can’t find it, post some raw BLE date from ESPhome or BLe monitor, such that I can investigate
I was able to capture some raw BLE data and created a new issue: https://github.com/custom-components/ble_monitor/issues/1094
What happened?
I have a Mi Scale 2 (XMTZC02HM) that is not being detected by ble_monitor.
I have several ESP32 running a bluetooth proxy, the closest is about 2m from the scale.
At the moment they are setup as
I have tried
active: true
before but to no avail.Furthermore, there is a bluetooth dongle plugged in the HA Host that is set up using the native bluetooth integration.
The Mi Scale is not detected no matter if I use it in the bathroom, close to a bluetooth proxy or next to the HA host with the bluetooth dongle.
According to this issue https://github.com/custom-components/ble_monitor/issues/1015, the ble_monitor integration does not work with bluetooth_proxy but with the esp gateway. Is that information still relevant? However, the scale should be recognized using the internal bluetooth integration, correct?
Sensor type
No response
Relevant log output