That’s the idea, yes. I’m quite likely to roll back a number of features of presence including guest detection and beacon detection.
presence will be simplified as a simple “ping” script. Monitor is much more sophisticated and robust already, and - in my experience - is substantially faster. And causes substantially less 2.4GHz interference.
Note that monitor already performs the same function as presence by using the -r flag.
Mmmm I only installed presence as it seemed to fit my use case better (detect known devices via MAC address and report present or not) or you saying I can replace presence with monitor and get the same result (I believe it 0 or 100% confidence with monitor)?
Yes, that’s exactly right. Monitor detects (1) generic BTLE beacons (2) ibeacons, and (3) known devices via mac address, reporting confidence of presence.
Monitor can be set to binary confidence (i.e., 0 or 100) but that is not the default. By default monitor will decrement the confidence value of known devices, just like presence.
Beacons (both generic and ibeacons) are only 0 or 100 confidence for the time being.
The most important notes to keep are your known addresses. Variable names in the config file are also slightly different because the behavior of monitor is inherently different.
Instructions for installation are on the github page. Beacon detection is still an active area of development but known devices works very well.
The systemctl script is handled by monitor itself. Run manually from the command line and you’ll see the option if you haven’t added a systemctl script already yourself.
Thanks, the updated script is working again with my phone, issues with the mi band persist;
0.1.570 07:18:37 pm location/scan/departure/start
0.1.570 07:18:37 pm [CMD-INFO] **** Started departure scan. [x4 max rep] ****
0.1.570 07:18:38 pm SCANNING FOR 00:00:00:00:5A:AD
0.1.570 07:18:38 pm [CMD-SCAN] (No. 1) 00:00:00:00:5A:AD departure?
0.1.570 07:18:40 pm location/owner/6C_Pi_Zero/00:00:00:00:5A:AD
{
retain: false
version : 0.1.570
confidence : 100
name : Oneplus One
timestamp : Wed Sep 05 2018 19:18:39 GMT+0100 (BST)
manufacturer : XEROX CORPORATION
type : KNOWN_MAC
}
0.1.570 07:18:41 pm [CMD-INFO] **** Completed departure scan. ****
0.1.570 07:18:43 pm location/scan/departure/end
0.1.570 07:18:45 pm [CMD-RSSI] C8:0F:10:69:44:6B Mi Band 1s PUBL RSSI: -89 dBm (Slow/No Motion)
0.1.570 07:18:45 pm location/owner/6C_Pi_Zero/C8:0F:10:69:44:6B
{
retain: false
version : 0.1.570
confidence : 100
name : Mi Band 1s
timestamp : Wed Sep 05 2018 19:18:45 GMT+0100 (BST)
manufacturer : Unknown
type : GENERIC_BEACON
rssi : -89
}
0.1.570 07:18:45 pm [CMD-PUBL] C8:0F:10:69:44:6B SCAN_RSP Mi Band 1s Unknown -89 dBm
0.1.570 07:18:48 pm [CMD-RSSI] C8:0F:10:69:44:6B Mi Band 1s PUBL RSSI: -95 dBm (Slow/No Motion)
0.1.570 07:18:48 pm location/owner/6C_Pi_Zero/C8:0F:10:69:44:6B
{
retain: false
version : 0.1.570
confidence : 100
name : Mi Band 1s
timestamp : Wed Sep 05 2018 19:18:48 GMT+0100 (BST)
manufacturer : Unknown
type : GENERIC_BEACON
rssi : -95
}
0.1.570 07:18:48 pm [CMD-PUBL] C8:0F:10:69:44:6B ADV_IND Mi Band 1s Unknown -95 dBm
0.1.570 07:19:02 pm location/scan/arrival/start
0.1.570 07:19:02 pm [CMD-INFO] **** Started arrival scan. [x2 max rep] ****
0.1.570 07:19:03 pm SCANNING FOR C8:0F:10:69:44:6B
0.1.570 07:19:03 pm [CMD-SCAN] (No. 1) C8:0F:10:69:44:6B arrival?
0.1.570 07:19:11 pm SCANNING FOR C8:0F:10:69:44:6B
0.1.570 07:19:11 pm [CMD-SCAN] (No. 2) C8:0F:10:69:44:6B arrival?
0.1.570 07:19:19 pm [CMD-INFO] **** Completed arrival scan. ****
0.1.570 07:19:21 pm location/owner/6C_Pi_Zero/C8:0F:10:69:44:6B
{
retain: false
version : 0.1.570
confidence : 0
name : Mi Band 1s
timestamp : Wed Sep 05 2018 19:19:21 GMT+0100 (BST)
manufacturer : Unknown
type : KNOWN_MAC
}
0.1.570 07:19:21 pm [CMD-NAME] C8:0F:10:69:44:6B Mi Band 1s Unknown
0.1.570 07:19:21 pm location/scan/arrival/end
It looks like it finds it alright when it reports it as “type : GENERIC_BEACON” but when the arrival scan runs it reports it as “type : KNOWN_MAC” and “confidence : 0”, it is therefore constantly flipping from 0 - 100.