agittins / bermuda

Bermuda Bluetooth/BLE Triangulation / Trilateration for HomeAssistant
MIT License
603 stars 15 forks source link

Problem adding Iphone/Watch #332

Open giddorah opened 3 weeks ago

giddorah commented 3 weeks ago

First off, I'd like to thank the author of this for your tremendous work. I envy your way of keeping up with the issues and overall handling of the community. Cudos! :)

Now, I've read... And read... And read... And concluded that I just want to see if I'm understanding correctly.

I'm in the beginning of my room presence setup and was thinking of just going the Shelly way of having their devices mounted behind some outlets and/or switches to make things as simple as possible... Setting up their BLE-tracking capabilities the way I've found documented on different threads and guides.

However, I'm running an iOS home when it comes to wearable devices... Windows-based when it comes to computes.

From what I understand I need either a MacOS-machine or a BLE device running custom firmware to be able to get the necessary key for my iOS devices to be able to add them properly as tracked devices in Bermuda, and all other kinds of BLE-tracking/beacon-tracking software? Do I understand this correctly? Is there NO other way of making this all work?

Since from what I understand, I can't flash espresence or esphome to my Shelly devices, correct?

JonLaliberte commented 3 weeks ago

@giddorah I can't say for sure, but I believe you're correct. The easiest route would be to flash espresence and use that get the IRKs for your devices. You should be able to get an ESP32 dev board on Amazon for ~$10. All you need is a USB cable to flash those.

I'd be curious how well the Shellys would work considering all the interference potential (in wall, wires, switches/outlets).

tbrasser commented 3 weeks ago

I'm running esphome on shelly mini1g3 :)

agittins commented 2 weeks ago

Mostly, yes.

But you can start out by just installing the HA companion app on your iOS devices and enabling the iBeacon transmitter in the settings.

You can track that in Bermuda (it will show up as an "iBeacon" entry near the top of the list in "Configure Devices").

The downside is that iPhones often slip into various powersave modes and they either stop sending the app's broadcasts, or they pack them into a non-standard format and send a consolidated packet or something, which we can't track - or they just stop sending bluetooth altogether until they wake up for something.

Using Private BLE Device (and all the jumping through hoops to get the IRK, as you have read) means that any bluetooth adverts the iPhone sends (not just iBeacon adverts) can be used to identify and track the device. It's not always a full solution, but most people find it works well.

That said, I think there have been a few people who have not managed to get their iPhones to stay transmitting and they've resorted to buying some iBeacon tags instead.

There might be an iBeacon app for Apple Watch as well, but I am not sure on that.

As @tbrasser points out, yes you can flash esphome onto (most?) Shelly devices. Whether you feel like doing that though is a personal choice. They work pretty well behind walls and wiring etc (just as other proxies do), but if you have trouble with flashing it and need to connect directly it might be quite the hassle to dig it out of the wall to access it!

I'd second @JonLaliberte's advice on buying an esp32 board (I use the D1mini32 boards a lot, they're a bit old-fashioned but they cheap!) and flashing either espresence or the FryeFryeFrye firmware per the wiki.

There may also be a way to do it on Windows - I haven't tested it but there are instructions here - if you have any luck with that please let me know and I'll link it to the wiki as well.