Professional Documents
Culture Documents
Indoor Location Tracking / Presence Detection: Joseph's Projects
Indoor Location Tracking / Presence Detection: Joseph's Projects
Joseph's Projects
Software Overview
I am running an iOS app called OwnTracks [https://owntracks.org/] which supports GPS location tracking via MQTT and
HTTP(s). I have configured OwnTracks to send location updates via HTTPS to a VM on my home server via a Cloudflare
tunnel; this data is immediately processed by Node-Red which can then log the data and perform any home automation actions I
may have set up.
I was previously sending the data to a VPS with MQTT running on it which was bridged to my house. This allowed me to have a
static IP address and a public server without opening up my server at home. Thanks to Cloudflare Tunnels, I no longer need the
VPS.
Hardware Overview
I found some inexpensive iBeacon modules on ebay which can be powered with a CR2032 battery or 3.3v DC. This module
appears to be a HM-11 (which is based on the Texas Instruments CC2541 SoC) so it should be capable of much more than just
broadcasting iBeacon messages.
These can be found on ebay by searching for “bluetooth ibeacon” and looking in the price range of about $5-8. There now
appears to be a new design which has more sellers but I haven't tried it.
The UART pins are clearly labelled on this module which makes it very easy to configure. This PDF file
[https://www.elecrow.com/download/bluetooth40_en.pdf] on elecrow.com lists the supported AT commands but I'll also list the
commands I used for configuration below:
When setting up your iBeacon, you should use a random UUID rather than my example above.
The broadcast interval command AT+ADVI (0-F) values are listed below:
https://jhewitt.net/indoor_location 1/2
18/7/22, 19:03 indoor_location [Joseph's Projects]
0: 100ms
1: 152.5 ms
2: 211.25 ms
3: 318.75 ms
4: 417.5 ms
5: 546.25 ms
6: 760 ms
7: 852.5 ms
8: 1022.5 ms
9: 1285 ms
A: 2000ms
B: 3000ms
C: 4000ms
D: 5000ms
E: 6000ms
F: 7000ms
I'm using '3' for some of my iBeacons which means they send out a broadcast every 318.75ms. The iBeacon specification says
that broadcasts should be sent every 100ms but this will consume more battery and not necessarily yield any improvements to
the accuracy or reliability.
Summary
These inexpensive iBeacons are a really good way to give per-room location accuracy and home automation without sacrificing
your privacy.
These beacons can also be attached to things you are worried about losing. When your phone leaves range of it, you can perform
whatever action you think is relevant (push notification, drop a pin on a map, etc). This can have a negative affect on your
privacy though because these beacons use static IDs which can be tracked by people monitoring Bluetooth signals.
In my experience, the battery life of these modules is around six months when broadcasting 3 times a second using a cheap
battery. Where possible, I am now powering these with power supplies to reduce the number of batteries I waste.
https://jhewitt.net/indoor_location 2/2