[Monitor] Reliable, Multi-User, Distributed BT Occupancy/Presence Detection

Tags: #<Tag:0x00007f47fd99f2b8> #<Tag:0x00007f47fd99f128>


I am using monitor.sh in combination with an iBeacon. On the latest beta’s the confidence is counting down while using ‘monitor.sh -b’ which is great.

Apart from my own iBeacon it is posting every beacon, which are a lot, that is in the area because ‘-b and -g’ are now combined in ‘-b’. To reduce wifi and mqtt chatter is there an option to whitelist my iBeacon uuid so that it is only posting that one and not everything else? Anybody else found a solution to this problem while using beacons? Thanks


Similarly, I would love the ability to whitelist which BLE devices’ advertisements were used to determine arrivals and departures. I have a BLE watch, BLE on my phone, and a BLE dongle in my car… but I also have 20+ other BLE devices that clutter up the log output and make it hard to follow what is happening (to be fair, I work for a company that manufactures BLE devices - so this is probably a very obscure request).


I just wanted to share that my problems with monitor not working seems to have been solved by turning off wifi on my rpi3 and connecting via cable instead. Have been up and running the whole weekend, that’s probably about two days more than with wifi on.


Hmm, this intrigues me, wondering if I could get a USB/Ethernet adaptor for my Pi Zero W’s and hard wire them, then that might help overcome the interference.

Hopefully someone can answer this for me, when Monitor is scanning, shouldn’t it only be throwing out Bluetooth signals ? Is the bluetooth that broad of a spectrum, that the scan’s from that can knock other devices off WiFi ?


I’m back to trying to get this working and OwnTracks is hacking me off… I have a HikVision camera the front door and it has “line crossing” so when the line is broken it activates a mqtt arrive scan, which works but way later than i would like.

Any other ideas out there please? or how to get an android phone to advertise BLE! :slight_smile:


I have a couple of Kontakt.io iBeacons, but with Monitor BETA (0.1.713) I see really odd behaviour on the confidence which jumps up and down - with -b argument and the iBeacon in known_beacon_addresses… In HASS the graph shows it quite clearly. Any ideas how to avoid this behavior ? iBeacon and Raspberry Pi Zero W is about a meter from each other. Thanks!


Bluetooth signals are sent via the 2.4 ghz spectrum. its not suppose to have a large affect but if its continually scanning it is doing it in the same spectrum, probably not he same channel though.

Also All of my Pi’s are using the Chromecast USB ethernet adapters. Seem to work just fine for me


I have a spare Pi3 sitting around that I use for testing things, might set that up with the wifi disabled, and see what happens. Not holding my breath, and my setup isn’t bad at the moment, but still getting a little interference on things.


I have read a lot about this problem the last week and one thing the experts siggest is to test to change the channel the wifi os workimg on.


Hi all,

No matter what I try I can’t trigger arrival or departure scans…

I do:

mosquitto_pub -h x.y.z.a -u username -P password -t monitor/scan -m d

…but when running monitor.sh from the command line, that does nothing. I’ve tried every combination with monitor/scan/DEPARTURE upper/lowercase I can think of and also with -m “d” and -n for null … I still can’t trigger a scan no matter what I do. I had it working once, but I cannot for the life of me find which combination actually worked :frowning:
Anyone have any input?


Some possible problems worth trying:

  1. Make sure you run monitor with “-tad”
  2. Make sure the topic is set to “monitor” in the preferences file of monitor.sh
  3. I personally use “monitor/scan/ARRIVE” and “monitor/scan/DEPART”

Hope it helps


My wife has the annoying habit to let her phone run empty. Although I have a ‘backup’ system with an NFC tag reader this is only use-full when she comes home and alarm is armed. Not when I leave the house while she is home and has an empty phone. House things no-one home and alarm arms…

In other words beside her phone I want and extra way of knowing if she is in the house. Reading across the forum this seems the most reliable way. As mentioned above I need something next to her phone.

What would you consider to be the best BLT/Ibeacon device I can attach to her key? Cost is not a major issue as long as it is reliable and has long battery live.


Do I have something configured wrong if I am not getting RSSI readings from my known devices in my MQTT messages?


I’m sure I’m missing something, but I just can’t figure this out. I’m attempting to use this primarily to keep track of my Tile beacons. After running through the process of adding them to known_beacon_addresses, and attempting to trigger looking for them on depart, I get the following:

0.1.675 01:34:07 pm [INSTRUCT] mqtt trigger depart {monitor/scan/depart (null)

The Tile is literally sitting on top of the Pi, but the trigger doesn’t cause the Tile to respond. The Tile will report on its own every 10 or 15 minutes (starting at 100 confidence and working its way down to 0).

I just don’t understand what I’m doing wrong. I feel like I’ve verified the following:

Monitor is running
The correct MAC address is in the known_beacon_addresses.yaml
The Tile can communicate with Monitor
Monitor is reporting to mqtt
Monitor is receiving instructions from monitor/scan/depart

Any help is greatly appreciated.


Try the beta branch instead. It’s not working perfectly with beacons, but at least better. I saw the same 100->0 behaviour as well on the ordinary branch.


Thanks for the advice. After moving to Beta, it’s performing a bit differently. Now, the only way it seems to see the Tiles is if I push the pairing button on an unpaired Tile. It will then give 100 confidence, and drift a bit more slowly down to 0. Triggers still do nothing.

It seems like my issue may be with the Tile brand of beacons rather than the system.


Is this still working for you? I tried this same thing on the current beta branch, and it only reports 0 confidence for the Tiles.


The beta branch is in active development, so some features might not work as expected while i optimize and test. For example, the -g flag has been merged with the -b flag. Try that.

I’ll get some tiles to test, but you might try including their mac address in the known_static_beacons file.


most known devices will not report an rssi, unfortunately. blank or 0 rssi is normal.


the last path component of the topic should be ARRIVE or DEPART. Capitalization doesnt matter.