[monitor] Reliable, Multi-User, Distributed Bluetooth Occupancy/Presence Detection

Normal behavior per this FAQ.

1 Like

Mmhh I foollowed suggestions red in this thread, this is my config

PREF_ARRIVAL_SCAN_ATTEMPTS=1
PREF_DEPART_SCAN_ATTEMPTS=2
PREF_BEACON_EXPIRATION=240
PREF_MINIMUM_TIME_BETWEEN_SCANS=15

PREF_PASS_FILTER_ADV_FLAGS_ARRIVE=".*"
PREF_PASS_FILTER_MANUFACTURER_ARRIVE=".*"

PREF_FAIL_FILTER_ADV_FLAGS_ARRIVE="NONE"
PREF_FAIL_FILTER_MANUFACTURER_ARRIVE="Google|August|Microsoft|Samsung"

from the 5 minutes I was watching the log (BTW where is this log stored?) I have a lot of man:unknown in passed filter.

Shall I collect all these unknown object MAC address, and put them in the filter?

Other info please, is it possible to know if all instances of monitor are up and running (automatically) in front end, if yes, how?

What do you think of this development board battery operated with Bluetooth. 8Mb, could monitor be installed there?

[US$8.80 22% OFF]TTGO T-Energy ESP32 8MByte PSRAM WiFi Bluetooth Module 18650 Battery ESP32-WROVER-IB Development Board Module Board For Arduino from Electronics on banggood.com
https://banggood.app.link/cJH1qcTiEU

Been using this for 2 weeks, works really great, rarely fail for me :), but the rssi updates is kind of slow, sometimes it took 1 min sometime it took longer, I try publish monitor/scan/rssi but it did not work at all for me. Is there a way to make it more responsive?

It canā€™t. Monitor is a bash script with dependencies that require some version of Linux. Plus using a project like this on batteries is certainly going to give you one big headache.

rssi updates are intentionally rate limited. They update every few minutes at most.

Wouldnt be easy, and considering that the pi zero w is just $1 more and is more accessible and supported, I dont think its worth it.

You get the pi zero w at 9-10 dollars?

I paid the pi zero w 25 Euro plus the adapter.

1 Like

Yup. In the US at least, we have the pi zero at $10.

Good day.
Tell me, iphone 7, responds only when the screen is unlocked, can this be changed by setting the phone?
So I did not understand whether it is possible to use miband as ibeacon? I registered macadres miband in the file known_static_beacons, turned on the visibility in the miband settings. What else can you try?

Pi Zero W is Ā£9.50~ over here (UK) plus Ā£4 or so for a power adapter.
Itā€™s Ā£20-Ā£30 for literally everything (SD, Case, Heatsink, Mini HDMI>HDMI, Mini USB>USB + Ethernet, Pi Zero W & Header Pins to solder in if you want them).

It may be cheaper for you to import from UK than US, check Amazon.

@andrewjfreyer

Love this component, its the only one working reliably (once its well programmed by a user based on his case).

I do have some logic to follow based on how the family goes in and out of the house (I have a large house and 4 garden exits, not all connected to HASS so to cover all the possibility need some thoughts) and then will be 99,99% reliable, great tool.

1 Like

Bite the bullet and connect all your used exits. Either that or use an outdoor motion sensor, but itā€™ll scan more than necessary.

1 Like

problems with those is that they are controlled manually and with a ESP8266 connected with HASS: of course when activated manually there is no possibility of control from HASS.
Adding a door sensor is difficult: are metal gates (reed switch problem with magnetization of door) plus are far from the hub (50 meter or so, since I have a garden): RF its too far, Xiaomi Zigbee will need to put some repeater in the garden.
So not impossible but a bit difficult

In any case once having those sensor in place:
a) for depart no problem, when the external door sensor is activated, a scan depart will update perfectly the presence/departure;
b) for arrival when to start the arrival scan? Because its not certain the time from entering the garden to entering the house (although I can make an automation checking both entering the garden and then eentering the house)

1 Like

yep exactly, I thought about that, but checking the logs its triggered too many times.

The good news is that I see the light for a working presence component: with this component I know there is a solution, just need to think the logic and apply it

2 Likes

Also in case people arenā€™t aware, if youā€™re lucky enough to live next to a Micro Center, they sell single pi zero wā€™s for $5 (limit one per person and in store only). You can get a small microsd card for only a few bucks too.

2 Likes

yup, all 3 of my Piā€™s cost $15 total lol. I only use two of them. I live a few miles away from a microcenter

1 Like

FYI the line

PREF_FAIL_FILTER_MANUFACTURER_ARRIVE="Google|August|Microsoft|Samsung"
is 100 percent based on my personal environment. If I were you I would use none at the beginning and see which manufactures are showing in
journalctl -f -u monitor.service
than filter out the ones you dont want to trigger scans

Is it possible to save the log somewhere for, letā€™s say, a day (automatically)?

I want to launch the log, wait a day, and then open it with a text editor, for easy searching