Sure you can use these. I wouldnāt use it, if something already on the Pi(s) uses/need BT. Other than that, go for it!
Noob question - I feel like Iām nearly there just missing one piece of the puzzle.
If I start monitor with -r flag and my phone bluetooth is on, phone is picked up (confidence 100).
If I turn bluetooth off on the phone, confidence goes 90, 45, 0. All good.
Now if I turn the phone bluetooth back on, nothing happens unless I trigger an Arrive scan via MQTT.
What am I missing here? Should the scan not run by itself without me having to trigger it?
Iāve read through several times but like I say, I think Iām missing something.
I thought the device itself (my phone) would broadcast its presence via bluetooth? i.e. monitor is scanning at regular intervals for āknown devicesā?
Like I said, it finds it on startup and detects when it has ādepartedā. Just doesnāt pick it up again when I turn bluetooth back on (āarrivesā)?
Iāve got two rPi 3ās running this. One is in my office (itās a Pi that I use for my 3D printer) - running Jessie, and the other is in my living room (for RetroPi) - running Buster. Neither use BT for anything else.
Running ābluetoothd -vā on both shows 5.43
I just set this up a couple of days ago, and - as I have time - Iām tweaking the settings and getting HA set up. Iāve noticed that the office pi seems to work fine. However, the living room pi doesnāt locate anything. Theyāre physically less than 20 feet apart. The office pi is at the front of the house, so Iām hoping it will ācatchā my son walking up the front path. The other pi is closer to the back yard, where we spend a considerable amount of time.
Iāve got a pi zero coming, which Iāll put in the garage. All of these will be pretty close to each other (small house), but we do alot outside, so Iām trying to cover to the street for our corner lot.
Hereās what Iām seeing on the living room pi:
And then on the office pi. Note, I started these scripts a few seconds apart (living room first).
Possibilities:
- Youāve configured
monitor
in such a way to exclude your phone from being able to trigger arrival scans - Your phone isnāt broadcasting itās presence
- Youāve actually configure it to only do arrival scans on demand
- Monitor is currently configured with the default settings. I havenāt changed anything yet.
- Is that configurable? All of our phones are iphones, with the current IOS version. Though, different models (one iPhone 11, one 8, one 7)
- See #1
Both piās are running the same files for preferences and known addresses. I may look into the differences of pi versions (Jessie vs Buster) to see if thatās the issue, as thatās really the only difference between the two.
I havenāt configured anything in HA yet; which leads me to another question. The author notes that he has HA configured to trigger a Depart scan 10 seconds after certain doors close. Whatās the recommended trigger for instigating an arrival scan? Or is that something the device (phone, etc) does automatically when coming in range of other BT devices?
Have not changed the config at all - just started it up with the -r flag after entering known devices and setting up MQTT.
If my phone is the issue why is it being picked up when I manually trigger the scan?
I restarted the Pi and that seemed to fix the problem initially, but it has now reverted back to not seeing the phone until I manually trigger the scan.
Because when you manually scan monitor
asks the phone directly. It only scans automatically when something triggers that. Thatās handled by the configuration option PREF_PASS_FILTER_MANUFACTURER_ARRIVE
. At the default it should scan when any device announces itself.
I am having this same problem. Did you ever find a solution?
Thanks - appreciate the help.
So starting monitor with the -r flag does not make it automatically scan at regular intervals? Something else needs to trigger it? This is what Iām not understanding I think.
I tried another Pi restart and once again it appears to be working (I havenāt changed anything and now my phone is being picked up arriving / departing).
As things are, I would say it is not responding to my arrival particularly quickly. Iām usually well inside the house and definitely in BT range for up to a minute or 2 before Iām picked up.
Is that normal?
Is there a way I can improve this?
Phone is Samsung Galaxy Note 8 Android 9 if there are settings that need to be changed.
Iām trying to understand a few things here. Iād appreciate some clarityā¦
I have four devices configured in the static section of the configuration. From what Iāve read, if all four devices are āpresentā, then issuing an arrival scan wonāt do anything, since they are all accounted for. Is that correct?
I thought the mqtt.publish topics were case sensitive. However, in the examples Iāve seen, people are using the lower case (arrival / depart). But, when I āexecute sudo bash monitor.sh -Vā it shows the topics as monitor/device/DEPART etc. Does case matter?
I donāt understand the correlation between the service and the script. If I have monitor running as a service, what happens if I execute the script? Is there a way to tell that the service is running properly? Does it have any logging options?
Iām not seeing -r
as a valid option, but my version of monitor is slightly old. The scan behaviour though is in the docs Iāve linked to, and I summarised it above
The problem is that scans wonāt happen until something triggers it. Personally I use a sensor on the front door (as discussed by others way up in this thread) to trigger arrival and departure scans. That way if it didnāt pick us up on the approach (one node is by the front, covering the approach), itāll pick us up then.
Iām interested in the rssi feature of monitor, but I have a few questions. Iām new to the concept of RSSI, so Iām trying to understandā¦
I would presume that monitor would triangulate a physical position (room) with a device by rssi levels. Is that how this works? According the the guide, Iām to run the script with the -c option to pair my phone with a node. Do I do that for each device and each node? How does Home Assistant know what rssi values match what room?
You may also enjoy this thread
Hi everyone, I tried this out a long time ago with several Pi-W and had it all functional but because I made mistakes with configuration it sort of messed up my 2,4 WiFi spectrum. Iām wanting to give this another try again, there was documentation on how not to mess up and was wondering if anyone has any hints on how to avoid it again
EDIT: Looks like the problem still exists, and itās not a Monitor problem, I realize that. I was hoping to put the Wās to good use!!! I suppose I can use the regular Pi I have.
Been using monitor for several years but for some time now it just started to be very unreliable and in the mqtt logs I see this.
Connecting and then disconnecting right after. Sometimes Iāve tried an run a āsudo bash monitor.sh -tad -uā and then it connects and updates the current status of my phone, but then disconnects. But sometimes works a couple of days after that anyway but last days itās been totally off. Any idea how to troubleshoot/solve?
Is anyone using RSSI for room detection, I can pair with my phone but then when I start monitor again I cant see any RSSI values and the bluetooth menu on my phone says not connected? Not sure if this is a silly question but can I use room assistant and monitor on the same pi?
Hi,
After a hiatus from this project I thought Iād try again.
I have 2 devices, an apple watch and a fitbit Ace 2
Running this I can see the fitbit device:
sudo hcitool lescan
AA:AA:AA:AA:AA:AA Ace 2
The Mac for my watch is DD:DD:DD:DD:DD:DD
(found in its settings)
I have successfully added DDā¦ to the known_static_addresses, and the confidence rises and falls with itās presence. Fabulous
When adding AA to known_static_addresses I see this output (but no change in the topic)
===================================================
*** BETA/DEV BRANCH ***
===================================================
> starting monitor.sh (v. 0.2.200)...
> removing web request caches
> warning: monitor.service not installed. Install service? (y/n)
n
> AA:AA:AA:AA:AA:AA confidence topic: monitor/pi/fitbit (has not previously connected to hci0)
> DD:DD:DD:DD:DD:DD confidence topic: monitor/pi/apple_watch (has not previously connected to hci0)
[-] 0.2.200 21-08-2020 07:11:50 pm [CMD-MQTT] monitor/pi/fitbit { ... confidence : 0 ... }
[-] 0.2.200 21-08-2020 07:11:56 pm [CMD-MQTT] monitor/pi/apple_watch { ... confidence : 100 ... }
[-] 0.2.200 21-08-2020 07:11:57 pm [CMD-NAME] DD:DD:DD:DD:DD:DD Ace 2 Unknown
[-] 0.2.200 21-08-2020 07:11:58 pm [CMD-NAME] AA:AA:AA:AA:AA:AA Apple Watch Apple Inc
[-] 0.2.200 21-08-2020 07:12:30 pm [CMD-NAME] DD:DD:DD:DD:DD:DD Ace 2 Unknown
When adding AA to known_beacon_addresses I see this output (but no change in the topic)
===================================================
*** BETA/DEV BRANCH ***
===================================================
> starting monitor.sh (v. 0.2.200)...
> removing web request caches
> warning: monitor.service not installed. Install service? (y/n)
n
> DD:DD:DD:DD:DD:DD confidence topic: monitor/officebt/phill_watch (has not previously connected to hci0)
> known beacon: AA:AA:AA:AA:AA:AA publishes to: monitor/pi/fitbit
[-] 0.2.200 21-08-2020 07:14:16 pm [CMD-MQTT] monitor/pi/apple_watch { ... confidence : 100 ... }
...
[-] 0.2.200 21-08-2020 07:19:40 pm [CMD-MQTT] monitor/pi/apple_watch { ... confidence : 100 ... }
[-] 0.2.200 21-08-2020 07:19:42 pm [CMD-NAME] DD:DD:DD:DD:DD:DD Phillipās Apple Watch Apple Inc
[-] 0.2.200 21-08-2020 07:19:43 pm [CMD-MQTT] monitor/pi/apple_watch { ... confidence : 100 ... }
[-] 0.2.200 21-08-2020 07:19:44 pm [CMD-NAME] DD:DD:DD:DD:DD:DD Apple Watch Apple Inc
[-] 0.2.200 21-08-2020 07:20:09 pm [CMD-RSSI] PUBL AA:AA:AA:AA:AA:AA RSSI: -73 dBm (initial reading | 127 dBm)
Any ideas?