We are running monitor with 3 nodes, 1 with -tadr and 2 with -tad. All monitor nodes will report only home and not_home. All monitors are part of Person component with nmap presence detection. We have 3 doors leading to outside, so any door opening will trigger automation publishing depart script publishing to mqtt. Also, if nmap reports not_home for 15 seconds, automation will be triggered to run a script publising depart scan with (and if nmap changes from not home to home, arrival script is run). This gives us about 30 seconds delay leaving the house before we are reported as not_home (yard is quite big, so monitors will report not_home long before nmap does, but nmap will keep us home if we are home, but at yard). Coming home is about 15 seconds delay (nmap detects us first) and nmap detects us home from parking lot. As a backup I have automation running every 30 mins, scanning arrive + depart from monitors (if one of other scannings fail for some reason).
With this setup we are getting reliable precense detection. It is a bit of hack and it is not as fast it could be, but it works for us. Only using monitor, we had a lot of false not_home reports, also we were reported not home when at yard, so motion sensors for cameras etc were on, it was not good for us. Only using nmap we were also reported not_home, when phone was not connected to wifi for some reason. With -r flag our Neato vacuum and all monitor nodes were offline most of the time (too much interference to 2,4 ghz wifi) so I had to rethink the system. My phone is OnePlus 6 and wife has 5t (so only periodical scan or manually triggered will work).
Been using Monitor for a week or so now I have a Pi3 and a Pi zeroā¦Main floor and Basement. Im using as a peson home presence not room presence. For the most part its working but im noticing that it sometimes just stops scanning or not responding. Like example, I woke up this morning, im sitting in the same room as the pi3 and it shows me 0% confidence. Watching the mqtt activity nothing is happening untill I run the mqtt restart command.
Looking at the docs on guthub Im wondering in my case should I be using the -r flag to constantly monitor the area? Is it fine to use on both devices? I using my unifi aps as presence detection but plan to use all sensors in a bayesian sensor. As of right now Im not fully confidant using it with monitor. Any ideas or tips?
I just have finished the installation of monitor.sh on my seperate pi. But I am lost what to do next to get it integrated into home assistant. The target I want to achieve is to know when one of my family enters the room where the PI is. Only thing I configured is the mqtt config on the bluetooth pi so far. Any tips are welcome. I am very new in mqtt/home assist integration. So I dont know what exactly I have to do now.
" When I run sudo bash monitor.sh -b none of my iOS devices are showing up in the scans, though several items say they are are apple devices. I ran the following using my iPad MAC address
hcitool name 88:AE:07:79:FF:A0
And it returned iPad . I suppose I should add my devices to known devices, but why isnāt this and my other devices showing up with the monitor command? Where are the MAC addresses that are showing up in -b coming from?"
Hey, did you ever solve this? I think Iām running into the same issue. name call returns the name, but no iOS devices are showing up in the scan/on MQTT. I can get the neighborās AppleTV and Samsung TV, but not my iphone.
yeahā¦Iām pretty new to this whole thing too and I can attest to what lweberru is saying. The instructions are great, up to a point and then itās pretty confusing and assumes a lot of knowledge on the part of the user. Not that this kind of thing isnāt specifically for a very particular audience who generally know these thingsā¦
But yeah. just āread the instructionsā isnāt helpful in this case.
Yes but pointing to the instructions (as I did) is helpful. There is a section there in the link I gave that is clearly labelled āHome Assistant Exampleā. If that isnāt understood or is unclear, ask away, but donāt come here without having read and attempting to understand.
I read the instructions. Before I addressed here, that I have no clue, about how to continue. As Fart mentioned. The docu and the examples assumes a lot of knowedge on the part of the user. So lets assume the following:
I have the monitor.sh running as service - log says all is fine. The mqtt integration also works (hopefully), but I dont know how to test even that. So How can I test it.
I want to detect at least one single device if it is ānearā the PI, or want to know the distance or whatever it can tell me.
So an explanation what to do next is missing for me.
Which parts of the āstate_topicā is a fixed string, which is a variable I have to replace which something different?
Where do I define the name of the location - here āFirst Floorā. I think I have to tell it the pi with the running monitor.sh?
I hope its now clearer, why I dont know how to proceed
Hi John. Yes this helps me a lot. The feature āPREF_DEVICE_TRACKER_REPORT=trueā, does this prevent the monitor from pushing these % values or is this just an additional feature to get a clear home/not home message? Also unclear is the need to use this known_static_addresses or what happens if I let it empty
I left known_static_addresses empty because when I inputted my Tileās MAC in there it would scan my Tile twice and give a home message followed by a not_home message, thus rendering it useless. Left empty, it works fine, HA knows what MACs to look for via what I wrote in configuration.yaml
And yes, if you want percentages my setup might not be what youāre looking for, via PREF_DEVICE_TRACKER_REPORT I forced it to give me an āall or nothingā messageā¦in any case, I am not sold on whether the percentages given are good enough for room detection (at least not without multiple Pis) and for ābeing homeā detection a simple yes/no should suffice, no?
This setup + a Tile on my keychain means that I get recognized as Home as soon as I walk within BLE range (usually the front door of my apartment building, since I live on the ground floor) and get set to Not Home a few hundred meters down the street (which actually is very handy to not be set as Not Home when simply taking out the trash).
I got the system runnning now. But all I get is always a 100% confidence or a 0%. The pi is in my living room, target was to detect if someone is inside the living room, but whenever someone is inside the house (at nearly all locations there) the confidence is 100%. If I go away fast far enough, the value switches to 0%. So my problem is that there is no real benefit using the tool, because it is just a home/not_home detection. What I need is a real value of the signal strength to decide how near some device is.
Is there a way to make the system having values between 0 and 100% to give me more details about the signal strength or something like this? Even I would install several PIs all would just say 100% whenever someone is in the house
Looking inside the logs I see that there is a ādBmā value, but that value seems to be ignoredā¦
I am also still a bit unsure which switches to use as parameters for monitor.sh
Ah cool, thank you, will try that.
Do I need to change any settings within monitor.sh to send these values to mqtt?
How can I catch these values within home assistant best (in parallel to the confidence)?
I saw the following inside the mqtt platform documentation. But not sure how to configure it for monitor.sh:
Still dont think, that this will work, according to the docu, the message should look like that:
topic: monitor/{{name of monitor install}}/{{mac address or ibeacon uuid}}
message: {
"id":"{{mac address or ibeacon uuid}}",
"report_delay":"{{delay from first detection to this message in seconds}}",
"flags":"{{GAP flags}}",
"movement":"stationary",
"confidence":"{{ranging from 0-100}}",
"name":"{{if available}}",
"power":"{{if available}}",
"rssi":"{{if available}}",
"mac":"{{if ibeacon, the current mac address associated with the uuid}}",
"manufacturer":{{if available}}",
"type":"{{GENERIC_BEACON_PUBLIC or APPLE_IBEACON}},
"retained":"{{message retained?}}",
"timestamp":"{{formatted date at which message is sent}}",
"version":"{{monitor version}}"
}
so the topic stays in the format without the rssi ending and rssi is just part of the message as it is confidence (which works). So in my oppinion there is something else wrong.