# Use Bluetooth to scan for devices as a presence detector?

**URL:** <https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379>\
**Category:** General\
**Created:** [18 October 2021 20:52 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379 "2021-10-18T20:52:17Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![WhiteLion](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/whitelion/32/12266_2.png) [@WhiteLion](https://discourse.nodered.org/u/WhiteLion)\
**Post date:** [21 October 2021 13:27 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379/21 "2021-10-21T13:27:31Z")

</div>

ok thx for your help. I tested and played around with it and the delay between detection and switching the BT on is unacceptable high. I ve no options in my phone to change BT setting. I wished it works like when entering my car within 2 seconds or so....  
Using BT from my PC triggers it at once. so I guess there is something with the BT device of the phone not like the tool wants it.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [21 October 2021 14:09 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379/22 "2021-10-21T14:09:39Z")

</div>

Well, in my case I have built a flow in NR that controls the scanning in a way so that it is slower while phone is present but faster when it is away. You can control the scanning frequency up to a certain level. So in my case I think the detection is fast enough, when the phone is away and then being detected is a few seconds

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/054a4279b35f5e2e060db0fadd0628d7e68d4675.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9b8bd4e7e28deccbf3d71d6499820fade81353ff.png)

---

<div class="post-metadata">

**Author:** ![WhiteLion](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/whitelion/32/12266_2.png) [@WhiteLion](https://discourse.nodered.org/u/WhiteLion)\
**Post date:** [21 October 2021 14:28 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379/23 "2021-10-21T14:28:21Z")

</div>

ah ok, could you share the flows ?

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [21 October 2021 16:35 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379/24 "2021-10-21T16:35:36Z")

</div>

Sure, here it is

To start, maybe you should just disable the BLE service init tab until you got things working the way you want. Also check configuration of all nodes since several of them are personalized for my usage. I'm sure you manage that. Later you can enable the init tab if you want. That tab flow is checking that the Monitor script is alive and will restart it if it should be needed

[ble\_monitor\_flow.json](https://discourse.nodered.org/uploads/short-url/nMms5QFF6PbhGjEUbtztPXRlCQC.json) (7.4 KB)

---

<div class="post-metadata">

**Author:** ![WhiteLion](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/whitelion/32/12266_2.png) [@WhiteLion](https://discourse.nodered.org/u/WhiteLion)\
**Post date:** [21 October 2021 17:12 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379/25 "2021-10-21T17:12:22Z")

</div>

Thank you very much ! I ll try it out and report back later.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 November 2021 17:13 UTC](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379/26 "2021-11-04T17:13:08Z")

</div>

Closed on 4 November 2021 17:13 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/use-bluetooth-to-scan-for-devices-as-a-presence-detector/52379.md?page=1)
