agittins / bermuda

Bermuda Bluetooth/BLE Triangulation / Trilateration for HomeAssistant
MIT License
417 stars 10 forks source link

Use the FTM capability on ESP32 chips #291

Open jonsmirl opened 3 weeks ago

jonsmirl commented 3 weeks ago

FTM will let you map the location of the fixed nodes much more accurately. It can give you a distance to within 0.5m. Then you can make circles using that distance and accurately locate all of the fixed nodes.

https://ieeexplore.ieee.org/document/9733026 https://discuss.ardupilot.org/t/esp32-s2-s3-c3-time-of-flight-wifi-positioning/106895 https://github.com/espressif/esp-idf/tree/master/examples/wifi/ftm

agittins commented 3 weeks ago

Hey Jon, thanks for bringing this feature to my attention! I wasn't aware of what the wifi standards are capable of there. That's some very interesting research and results.

Given that implementing this would need to be on the esphome firmware itself, as a feature it's well outside of the scope for Bermuda - but if an effort were being made to add support for this into esphome, and then to proxy that data back to HA, I'd be all over it!

All my esp32's are the OG plain esp32 modules, so no s2 / c3 etc here yet, so I wouldn't be able to test it here on anything, but I'd certainly pick some up if there was an esphome custom_component written to support this.

What would be great is for the esphome to periodically (maybe every 5 minutes or something?) perform measurements to each of the other proxies, and report the results in sensor entities (which would be easier than having to implement it directly in the esphome/ha api protocol). If we had that I'd be happy to implement features in Bermuda to use the values of those sensors (assuming a stable naming pattern) to feed into the trilateration estimates.

I think it could be really helpful, and would love to see it happen - but I don't think I'll have the time myself to do it any time soon. I'm hoping someone will pick up the torch, though! Maybe a feature request on the esphome tracker would get a few more eyeballs, too.