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

@coolguymatt

That’s from the dev …I think this indicates that no automatic scans occur with -t. Which brings to mind the question of a situation I have where it takes a while for one of the two Pi’s at each end of the house to pick me up. I think when I walk from one end of the house to the other one loses me but it takes awhile for the other to find me. This shows me away which is a problem. I thought maybe the -r option might help but idk if I want all the scans to be triggered. I think somethings have changed and it’s a bit confusing heck the -r flag had a different purpose in the beginning but was deprecated to the newer purpose

I believe you can use the -u flag to update the service script. So with -ux flag update the script to run with x flag @ boot up

Lots of confusion. Really what I want to know is which flag(s) I need to use to “act like default, but trigger other devices that are setup to only respond to arrival and departure triggers (-tad)”. Maybe that is how default works and I am complicating things.

Yes I agree the -r flag would seem what we want in order to “relay” to other pi’s running the script to scan. Problem is unless I’m reading the developers post incorrectly it cant be run without -t which is a purely triggered mode and so no scans on random advertisements etc.from that original pi. It seems we both want the one pi to keep scanning as per default and cut down the scans of the others. Ive read alot of this thread and the dev was really helpful but then you know probably life lol

For this you want -tr as the flags for your ‘main’ device. That means act normally and send triggers to other -tad instances whenever you perform an ARRIVE or DEPART scan.

After the demise of Google Home presence detector, I have decided to give this a try on my spare Raspberry Pi 3.

I manage to get it working with my Mi Band 3 (BLE device).

However, after testing this for few hours, I notice that the coverage area is quite big. It spans across few rooms and floors making it unsuitable for room based presence detection. I am wondering is it possible to adjust the sensitivity so that it covers smaller area thus more suitable for room sized presence detection?

Maybe this has been discussed before but it’s very hard to find answer in more than 1415 messages. Appreciate it if someone can help me out. Thanks.

when i woke up this morning, the whole thing has stopped working.

Master @masterkenobi,

Stable it is, and confirm I can that I do room presence with its level of force. I have two running on the same Pis I have Kodi (OSMC). The dark side, resist you must, to think stable it is not. For fear leads to hate, and hate leads to suffering.

This I do with the rssi value I get from it, and room detect you get using it.

Rudimentary it is, but it still works with some mathematical modelling; which perfection I am still working out.

Helps, hope this does.

3 Likes

@shbatm
?sure,maybe but based on what. Please point this out where it says this. You can see in my previous post that the dev states -t is triggered mode only. -r is maybe for “relay” to the rest of the machines running the monitor script

The ‘Example with Home Assistant’ section of the readme.

The -t flag is supposed to require one or more of rad -r is a different flag. -tr != -t -r in this case (or at least that’s how it’s supposed to work; I’ve found a few bugs around flags elsewhere in this script).

So I have went a bit overkill and both 2 raspberry pi zero w + 1 raspberry pi 3b+ which I plan to use with Monitor.

However im struggling with when I boot up all three then they all will report condidence of 0, but If I only keep one up at the time than it works fine.

Any ideas?

Ya I guess your right but its weird if you read the thread front to back where he mentions that -t is triggered mode only. Guess its required for both the ad and r flags though. A little confusing but I suppose every big thread can be, as a good idea evolves. I guess to some it up a pi with the -tr flag acts like the script is run in default mode with the exception that on any detection of beacons, recognized, or fake advert it triggers an arrival/depart to the other pi’s that are set to -tad

Thinking about testing monitor because I’m not satisfied with my current presence detection. Anyone that using google pixel phones with it and can verify that works fine with them?

1 Like

Hi Yoda. Sorry I gave up and gave in to the temptation of esphome. It works for me.

Lols I was just in the mood that day :wink:.

Anyways I haven’t used ESPHome before, but if it works for you, that’s nice. I will guess you have several of the ESP devices around the house already. I try to use or cramp different functions into a single device. So since I use Kodi in most rooms, felt it was good for me.

Besides I don’t think the that of ESPHome gives the level of flexibility the monitor script gives. Like scanning when you want it to, and the type of scan which helps speed detection up a lot.

Regards

it’s my first time using esphome too. i know monitor is way more powerful but i just don’t have the time anymore to learn how to program it. i just want something that just “work” and esphome seems to be able to provide just that. it just keep on scanning every minute no matter what and report the rssi value. i have tried it for 2 days and it is still running.

I’m using a pixel3 and it seems to work okay for me. my wifes iPhone Xs works much better however.

I’ve been using some variation of this project (monitor since it was released and presence for a few months before that) for over a year now with two Pixel 2s and haven’t had any problems.

1 Like

Good to know :slight_smile:

Benjimatt presents and interesting idea I think. It wouldn’t be for everyone, me as an example since I can’t trigger on door opens, but sending a message that triggers and arrival scan and clears out any “home” devices that don’t answer back instead of doing departure scans would get you fast arrivals and fast departures - assuming you have a way to reliably kick off this sort of sequence such as an alarm system telling you that a door has opened and thus you need to send the MQTT message to trigger a departure via arrival scan, hope that makes sense.