Indoor BLE Location ( or presence detection)

  • Hero Member

    There has been a few threads on this topic here and also over at MCV forums and i think ive posted this idea in some of them... but of late i heard about these super cheap wifi modules which may enable my idea to be done very cheaply.

    So the idea is that each person ( and dog! ) in my house carries a "ble beacon" ( ble is 'bluetooth low energy" These devices are $10-20 dollars. Examples are devices trackr/tile/ stick n find (i also ordered a Xiaomi "mi band" )

    In each room /corridor etc i would place a small device comprised of :

    • a ble module eg: like this

    • these super cheap wifi modules using ESP8266. These have a serial port so hopefully can be interfaced directly with the ble module...and both run on 3.3

    • a mains to 3.3v powersupply ( cheap phone charger and regulator)

    These devices would simply listen for the ble advertisement packets sent from the beacons.. further info here and send this back directly over Wifi to a Rasperry Pi or similar. The data captured just needs to be the UUID of the beacon and the RSSI value. The RSSI is effectively the signal strength

    With this info coming in to a RPi., a script/process would crunch this data and determine the location of a person which could then be used to control the HA. The RSSI value can be used to determine if a user was entering ( signal gets stronger), leaving, or where they came from ( eg: the bedroom and hallway detects user, but the users RSSI signal strenght decreased in the hallway and increased in the bedroom...
    How this script/program will work...ive no idea yet.. but perhaps output would be to MQTT??

    I've just ordered some of the ble modules and some ESP8266 modules so hopefully ill be able to cobble them together.
    The esp8266 apparently have some processing capability on board Peter Scargill ESP8266 Blog- even using LUA so i hope i can include any initialisation commands which need to be sent to the ble module.
    ive no idea how to even approach the RPi server... but ill worry about that if/when i get that far....

    I realise this has nothing to do with MySensors ( so hope thats ok @hek )- but obviously this forum is full of HA DIY electronics enthusiasts who may be interested and even be interested to help get it done....

    So interested to know your thoughts....

  • Hero Member

    I think it would also detect iPhones/Android devices with bluetooth switched on. Which means this setup could even be used to answer that age old ( well last few years) question...

    "Do you know where ive left my phone" I personally hear this nearly daily.....grrr

    I guess you could also stick ble tags on anything frequently lost. Keys etc..

  • Hi, I had a similar idea to use BLE as some kind of presence detection. Did you have any success doing this, if so, what kind of modules did you use?

  • Hero Member

    Not yet - i asked the developer of the HM-10 module firmware to enable a "sniff" mode... they said they would, but ive not heard anything back ( despite asking a few times).

  • Did some more googleing yesterday and found this:
    Didn't have the time to try it yet, but it sounds promising. I also wonder what the power consumption of this mode would be, if it could still run on batteries.

  • Hero Member

    thanks for the link above but as per the comments at the bottom of the page, it doesnt sound like it will show the RSSI data although it can see the BLE mac address, i also want the signal strength ( RSSI).

  • Hardware Contributor

    Hi, I'm sorry to revive such an old thread, but I had the same need as you guys for doing just this very thing: using BLE beacons for location and presence detection.

    I made my own solution to it using an ESP8266 dev kit and a Nordic-based BLE module. You check out the project here: where I have the beacon gateways for sale. But I've also made all the work open-source and open-hardware as well. I hope this helps you guys out if you're still looking for something like it.

  • Hero Member

    @nemik - Really nice work Nemik!

    Ill be sure to check this out!

  • @nemik looks really well done! Have you considered including some environmental sensors and also publishing those via MQTT? Having one of these in every room of my house would be cool!

  • Actually, it's not 100% MySensors-related, but I have a working setup consisting of iBeacon (either HM10-based or PI-based) and Beecon app.
    When Beecon senses the iBeacon it can trigger various actions, eg make http requests or call IFTTT recipes

Log in to reply

Suggested Topics

  • 5
  • 2
  • 199
  • 1
  • 18
  • 11
  • 2
  • 3