# \[Tutorial\] Presence detection with bluetooth beacon

**URL:** <https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536>\
**Category:** Tutorials\
**Tags:** tutorial\
**Created:** [November 1, 2018, 12:00pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536 "2018-11-01T12:00:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Woudenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/james_woudenberg/32/3700_2.png) [@James\_Woudenberg](https://community.homey.app/u/James_Woudenberg)\
**Post date:** [November 1, 2018, 12:00pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/1 "2018-11-01T12:00:06Z")

</div>

**Tutorial version: 0.2**  
**Goal: Presence detection**  
**hardware:** Tile Pro **website** : thetileapp (dot) com  
**App: [Beacon](https://apps.athom.com/app/com.koktail.beacon) (credits Leendert De Kok )**  
**App topic :** [HERE](https://community.homey.app/t/beacon-using-ble-beacons-for-presence-detection/3550)

_It’s hard to find a good solutions for presence, after testing with wifi connections and z-wave/kaku remotes i tried it with bluetooth beacon on a keychain. The result is working perfectly._

Install the beacon app (appstore).  
Buy a beacon (i use a Tile Pro (2 devices for 60 euro, deliverd in the netherlands within 24hours ;-).  
Add the beacon to homey: result

![beacon1](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/2/202f0c80762935a494ea46eadcf94250161cfda8.png)

name it to a person and add it to the keychain of this person.

Now you can make a flow when this beacon is in range of homey to set a variable (presence of a person yes/no) (better logic) to yes.

And a flow when it’s out of range to set on no.

Questions, let me know.

---

<div class="post-metadata">

**Author:** ![Blarp](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/blarp/32/10278_2.png) [@Blarp](https://community.homey.app/u/Blarp)\
**Post date:** [November 1, 2018, 12:49pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/2 "2018-11-01T12:49:46Z")

</div>

There is a lot to love here. Replaceable battery. Slim dimensions (42x42x6,5mm). Attach it to your keys and then you can just move on with your life.  
And a mentioned range of 90m.

Can you confirm this range? When homey is inside a residence and you approaching around the corner, what is a realistic range in a urban setting?

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [November 1, 2018, 3:30pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/3 "2018-11-01T15:30:13Z")

</div>

I have a few of these nrf51822 modules laying around, Would they work with this app?

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/1/1032ee55333b774efa0366c13d5ebf664526cefb.jpeg)  
[aliexpress](http://nl.aliexpress.com/item/2V-3-3V-NRF51822-Bluetooth-4-0-Wireless-Module-for-iBeacon-Base-Station-Intelligent-Control-System/32826502025.html)

---

<div class="post-metadata">

**Author:** ![Koktail](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/koktail/32/51498_2.png) [@Koktail](https://community.homey.app/u/Koktail)\
**Post date:** [November 1, 2018, 4:54pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/5 "2018-11-01T16:54:31Z")

</div>

Throught wall the range will be +/- 8 meter. (Tile pro)

---

<div class="post-metadata">

**Author:** ![Koktail](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/koktail/32/51498_2.png) [@Koktail](https://community.homey.app/u/Koktail)\
**Post date:** [November 1, 2018, 4:55pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/6 "2018-11-01T16:55:07Z")

</div>

They will work, i have the same beacons myself

---

<div class="post-metadata">

**Author:** ![Koktail](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/koktail/32/51498_2.png) [@Koktail](https://community.homey.app/u/Koktail)\
**Post date:** [November 1, 2018, 5:43pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/7 "2018-11-01T17:43:02Z")

</div>

I’ve just released v1.0.13

### v1.0.0 - 04.10.18

- first alpha to app store.

### v1.0.1 - 05.10.18

- add support for NRF51822
- add app icon
- refactoring the drivers

### v1.0.2 - 07.10.18

- add trigger card for discovered devices
- add icon for discovery

### v1.0.3 - 07.10.18

- add generic device

### v1.0.4 - 20.10.18

- add verify process for detect/undetect events

### v1.0.5 - 07.10.24

- improve discovery of the devices
- change card description

### v1.0.6 - 07.10.24

- improve by connection and find the advertisement

### v1.0.7 - 07.10.24

- bump version

### v1.0.8 - 07.10.25

- improve sequence update beacons
- get peripheral for accurate range
- change timeout to 1 second
- improve logging to the app
- add retry strategy

### v1.0.9 - 07.10.25

- bump version

### v1.0.10 - 07.10.27

- introducing timeout and verification settings
- revert back to discovery strategy to improve speed
- add translations
- improve logging

### v1.0.11 - 07.10.27

- mismatch variable name bug
- also check on bigger that the amount if app restarts

### v1.0.12 - 07.10.30

- add default values in settings
- change comparator typo

### v1.0.13 - 07.11.01

- fixed change detect comparison mismatch
- add log handler to watch false positives
- fixed zero verification times

> [@\[APP\]\[Pro\] Beacon - Detect your presence with BLE beacons](https://community.homey.app/t/beacon-using-ble-beacons-for-presence-detection/3550):
>
> [image] Beacon Links: [https://github.com/koktaildotcom/com.koktail.beacon](https://github.com/koktaildotcom/com.koktail.beacon)Introduction This app integrate the basic flows for BLE beacons into Homey. Once the app is installed it will do a discovery of BLE devices, after a short adjustable timeout it wil keep discovering. After each discovery the app compares the found devices with the one paired. If the beacon is not found within the new “discovered list” the beacon is changed in state. For filtering out false positives there is a verificat…

---

<div class="post-metadata">

**Author:** ![Blarp](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/blarp/32/10278_2.png) [@Blarp](https://community.homey.app/u/Blarp)\
**Post date:** [November 1, 2018, 6:06pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/8 "2018-11-01T18:06:19Z")

</div>

Do you know if the range of the nrf51822 module is more or less the same as the Tile pro?

---

<div class="post-metadata">

**Author:** ![Koktail](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/koktail/32/51498_2.png) [@Koktail](https://community.homey.app/u/Koktail)\
**Post date:** [November 1, 2018, 6:19pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/9 "2018-11-01T18:19:39Z")

</div>

I’ve added a list in the ‘readme’ off the app.

#### Tested devices

Here is a list of used devices

- Tile Pro (8m)
- Nordic nRF51822 (5m)

---

<div class="post-metadata">

**Author:** ![Michael](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael/32/110520_2.png) [@Michael](https://community.homey.app/u/Michael)\
**Post date:** [November 1, 2018, 8:26pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/10 "2018-11-01T20:26:47Z")

</div>

Are these cases powerfull enough to put them on a key ring and use them daily or do you think [something like this](https://nl.aliexpress.com/item/Ble-iBeacon-NRF51822-Bluetooth-iBeacon-Draadloze-Module-Sleutelhanger-Voor-iBeacon-Basisstation-Near-field-positionering/32884490282.html?spm=a2g0z.search0104.3.3.35a0f22eZutTnp&transAbTest=ae803_4&ws_ab_test=searchweb0_0%2Csearchweb201602_4_5731313_10065_10068_5729913_10696_5728813_10084_10083_10618_5731413_10304_10307_10820_10821_10301_5731213_5731113_5730813_10843_5731613_328_10059_10884_5731513_10887_100031_10103_5731713%2Csearchweb201603_2%2CppcSwitch_0&algo_pvid=64b19b25-b4e7-45b0-87e2-8ce994137b74&algo_expid=64b19b25-b4e7-45b0-87e2-8ce994137b74-0) is better?

---

<div class="post-metadata">

**Author:** ![Toon\_Vos](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@Toon\_Vos](https://community.homey.app/u/Toon_Vos)\
**Post date:** [November 2, 2018, 5:54am UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/11 "2018-11-02T05:54:54Z")

</div>

Is it possible to connect/add more receivers besides Homey? I can imagine that way it would be possible to use the presence of certain beacons in certain areas of a building.

---

<div class="post-metadata">

**Author:** ![James\_Woudenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/james_woudenberg/32/3700_2.png) [@James\_Woudenberg](https://community.homey.app/u/James_Woudenberg)\
**Post date:** [November 2, 2018, 7:16am UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/12 "2018-11-02T07:16:48Z")

</div>

They are pretty solid, also the site advertisement with

" **Industrial strength**

Drop tests. Squish tests. Tumble tests. Our most rigorous testing means your real life is more than covered."

> **[Tile Pro Tracker Devices | Tile](https://www.thetileapp.com/en-us/products/pro)**
>
> NEW Tile Pro with replaceable battery is our most powerful Bluetooth tracker for finding all your things. With a 300 ft. range and loudest volume of any key tracker or key locator. Learn more about this durable, water-resistant wireless tracker. Our...

---

<div class="post-metadata">

**Author:** ![Michael](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael/32/110520_2.png) [@Michael](https://community.homey.app/u/Michael)\
**Post date:** [November 2, 2018, 12:37pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/13 "2018-11-02T12:37:56Z")

</div>

Thanks but i replied to willumpie about the ones from Aliexpress.

---

<div class="post-metadata">

**Author:** ![willumpie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willumpie/32/1115_2.png) [@willumpie](https://community.homey.app/u/willumpie)\
**Post date:** [November 2, 2018, 12:56pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/14 "2018-11-02T12:56:53Z")

</div>

Those you mentioned in an earlier post are the same modules, except the keychain is not included. The plastic is really cheap, if you press the button on it it can already crack, You also should glue them shut (replace the housing or just throw them away when empty), when the housing pops open, the module will drop out

---

<div class="post-metadata">

**Author:** ![Blarp](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/blarp/32/10278_2.png) [@Blarp](https://community.homey.app/u/Blarp)\
**Post date:** [November 2, 2018, 1:09pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/15 "2018-11-02T13:09:49Z")

</div>

You sure can use multiple homeys, place them at the outer edges of your property and voila!

But multiple bluetooth LE devices (all none expensive ones) that can receive and transmit signals of other bluetooth LE devices when they are in proximity of each other? Sounds to me like a Tile business plan you are describing there.  
Nevertheless, it can think -for presence detection with homey- it can be useful to be able to expand the range of those 5 or 8m.

Can this app -Beacon- use those devices in conjunction with eachother?

---

<div class="post-metadata">

**Author:** ![Michael](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael/32/110520_2.png) [@Michael](https://community.homey.app/u/Michael)\
**Post date:** [November 2, 2018, 1:34pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/16 "2018-11-02T13:34:33Z")

</div>

Thanks for the reply, i’m gonna search for different ones at Ali…

---

<div class="post-metadata">

**Author:** ![Thomas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thomas/32/7888_2.png) [@Thomas](https://community.homey.app/u/Thomas)\
**Post date:** [November 2, 2018, 8:00pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/17 "2018-11-02T20:00:13Z")

</div>

I`ve just purchased a Tile Mate. Managed to pair it with the app - this is great! But is it supposed to be marked "detected: No" even though it`s only a couple of meters away from Homey? It does, however, trigger detection when I`ve left the house and arrives back home.

---

<div class="post-metadata">

**Author:** ![James\_Woudenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/james_woudenberg/32/3700_2.png) [@James\_Woudenberg](https://community.homey.app/u/James_Woudenberg)\
**Post date:** [November 4, 2018, 6:23pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/18 "2018-11-04T18:23:45Z")

</div>

no this is not supposed to happen, i had this with my tile pro when i first used it. I re-added it and then it worked.

---

<div class="post-metadata">

**Author:** ![Gerrit\_Ekelmans](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gerrit_ekelmans/32/8452_2.png) [@Gerrit\_Ekelmans](https://community.homey.app/u/Gerrit_Ekelmans)\
**Post date:** [November 4, 2018, 7:46pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/19 "2018-11-04T19:46:58Z")

</div>

Hello, i have the same problem, i download the tile app activated the tile pro, and then pair it with homey. Now its detected when i hide the tile in the app, but undetected when i open the app and make it visible.  
For sure i’m doing something wrong.

---

<div class="post-metadata">

**Author:** ![Thomas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thomas/32/7888_2.png) [@Thomas](https://community.homey.app/u/Thomas)\
**Post date:** [November 4, 2018, 8:13pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/20 "2018-11-04T20:13:41Z")

</div>

Thanks for the reply. I have removed it and added it again. It still disappears after a while. If I push the button on the tile it appears again. Probably something I am doing wrong.

---

<div class="post-metadata">

**Author:** ![Gerrit\_Ekelmans](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gerrit_ekelmans/32/8452_2.png) [@Gerrit\_Ekelmans](https://community.homey.app/u/Gerrit_Ekelmans)\
**Post date:** [November 4, 2018, 8:24pm UTC](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536/21 "2018-11-04T20:24:02Z")

</div>

Maybe i dont understand it correclty, but is it possible that the beacon app in homey will not work at the same time as the app on my iphone?

[Next page](https://community.homey.app/t/tutorial-presence-detection-with-bluetooth-beacon/3536.md?page=2)
