Hi - I’m a relative HA newbie but enjoying the journey HA is taking me on. With the recent releases allowing Bluetooth Proxy to work without having a hardware device connected to the HA instance (which I can’t because it’s running in Windows Hyper-V) I though I’d try this out with a view to using presence detection, but I don’t know if I’m missing something or if I need to wait for things to improve.
I’ve got 2 Shelly Plus Plug UK devices, added to native Shelly integration, running >0.12 firmware, clicked on configure and set to passive scanning. Have added the BLE Device tracker in configuration.yaml
device_tracker:
- platform: bluetooth_le_tracker
track_new_devices: true
I set up the BLE beacon in the HA companion app on my phone (Samsung Galaxy S20) hoping the Shelly would find it.
I have looked at the known_devices.yaml file, and after having the device plugged in for about 2 days, I now have over 200 devices showing, each with an entry like this:
03_61_52_27_24_0d:
name: 03:61:52:27:24:0D
mac: BLE_03:61:52:27:24:0D
icon:
picture:
track: true
First problem is that not one of the mac addresses corresponds to my phone bluetooth mac address (as shown in settings->about phone->status information.
Second problem is that the Shelly doesn’t seem to be reporting the UUID, only the mac.
I notice on the Shelly device that after doing the Configure → Passive setting, a script is installed on the shelly:
// aioshelly BLE script 1.0
BLE.Scanner.Subscribe(function (ev, res) {
if (ev === BLE.Scanner.SCAN_RESULT) {
Shelly.emitEvent("ble.scan_result", [
1,
res.addr,
res.rssi,
btoa(res.advData),
btoa(res.scanRsp)
]);
}
});
BLE.Scanner.Start({
duration_ms: -1,
active: false,
interval_ms: 320,
window_ms: 30,
});
So unless the UUID is somehow encoded in advData or scanRsp, it isn’t sending it, and the BLE tracker integration certainly isn’t decoding or displaying it.
The final issue is that I have now set up a second Shelly Plus Plug UK, using all the same steps. I now see yet more things showing up in known_devices.yaml, but with no way of differentiating which Shelly device detected them.
So I guess my question is, are these all bugs or just the result of this being new and more development is needed? Or am I going about this the wrong way? and if so, how should I proceed to use the Shelly Plus devices for presence detection?
Thanks in advance