That is the mac address and the RSSI that are needed for detection as well as (not always) the ManufacturerData, ServiceUUID and Name (not published to mqtt).
Itās only a very quick and dirty piece of code that still need a lot of improvement but you can already see it here:
Iāll for example certainly replace the MQTT library with another one as this one is giving me trouble, it lost connection after a while (I had the same phenomena on ESP8266 with the default PubSubClient).
Happy-Bubbles can treat the received mqtt message without problem:
Iāve just implemented the first type of message, no Eddystone beacons or iBeacons, I honestly donāt know the difference and donāt know how to separate one from another, Iāll also have to check into that. https://www.happybubbles.tech/presence/docs/mqtt/
@touliloup very great jobā¦ Iām really interested to your work. I hope you could produce new releases of your ESP32 BLE solution for better integration with HA. Thank you for your contributionā¦
Ah yes, you are right, thanks for the hint.
Some module now offer connector for external antennas, Iāll try to get my hand on such a module, and see if it works better.
I have installed room-assistant on a rpi3 and rpi zero w. It was installed successfully on both but thereās no detection on the console after it initializes BLE/iBeacon. No logs nor error. WHen I try to scan using hcitool, it shows ble/bluetooth devices. Iām trying to track my mi band2. I used below config btw:
If the band is a ble device you probably want āuse_macā to be true, but as with watches it doesnāt seem to be easy to track wearables. Try using scan on in bluetoothctl but you may have to work out MAC addresses for your devices.
I tried the mac option too, and removed the whitelist content so it could show all ble devices but the console doesnt show any discovery at all. The scan on on bluetoothctl and hcitool acan shows ble devices around me.
Yay! Just got mine working on my Pi Zero W with Mosquitto running on it. A few observations followed by a question:
Observations:
I couldnāt get mine to work with the newest version of Node, as @getsmokes mentioned in his post from Nov 1, and using the built in version worked A-Ok.
Once I had all the room assistant config done, I cloned my Pi Zero W SD card so I could easily spin up new SD cards for new Pi Zeros as I spread them across the house.
I managed to blow up my Pi at first by not updating the update_frequency to 5 seconds. Will probably up it a bit more for good measure.
As for my question:
I had thought that this would let me track my Galaxy S8, my daughterās iPhone 7 and my wifeās Pixel, but Iām not seeing their MACs / UUIDs in the logs. Is this not possible? Or am I missing something?
Thanks much for the post and all the helpful comments. Wouldnāt have achieved success without them!
To track phones and other devices you need to add a BLE beacon app, and thereās no guarantee that it will work as default permissions donāt always allow it- I never had any joy with unrooted LineageOS on my phone.
Follow-up question:
Based on your response, Iām now looking to add Pi Zero W Beacon to my Owntrack regionsā¦I have it (Owntracks) running on each of the phones I want to track, and my research indicates that I can tie the Pi Beacon to a specific Region/Lat/Long. Doing so requires the UUID of the Beacon.
For the life of me, I cannot figure out how to find that. Iāve done scanning with various apps on my phone and my wifeās phone and no joy. Any thoughts?
Is Room Assistant still needed if you just want your Pi (witch is also running HA) to detect an ibeacon with builtin bluetooth in Home Assistant? Doesnāt have HA a built in bluetooth tracker now?
My HASS Pi is in the same room as the table i always put my keys on. Is this enough to track if im home? Of course adding a bluetooth tracker to my keys.