I had the wrong assumption that the wifi MAC is the same as the BT MAC, but re-reading the thread made me realise that they are not one, so now I have 100 registering on the jfreyer scale and I am at peace, thanks a lot for your hard work. and I did not have to look for the .sh file…
Ha Ha we making the same mistakes, not installing MQTT (i am glad i so your message) and forgetting that the one i sett was not BT MAC.
Now all works fine
THANKS SO MUCH for all that contributed and help with this project.
Finally my lights will stay one when i am home and my HA will not think that i left home
Hey all - check out my github for an alpha of the rewrite. The project is named, for the time being, monitor. Any thoughts or reports would be greatly appreciated. I have been testing for a very long time, and it works for my family with the same performance, if not a bit faster, while scanning about 75% less often than presence (substantially mitigating wifi interference issues).
If you pushed it, then i already have it, since i made a script that checks for new versions and restarts the service.
Not particularly about this versions but I had some problems, already reported by many other, like the wi-fi interference (which made me make the “restart script”, but know my most commum problem is reporting of “name”: “unknown”, which happens about 7 times out of 10 and makes me get a lot of in/out of the house HA task running.
I also have a device (IOS 11.3.x) that takes about 16min to get the out of the house, which not sure if this is connected is my 1st device on the owner file, the rest is almost instantaneous.
I also notice that the devices that are further on the house, so far I have two instances, so less used is mare unresponsive and “loses” the connection more often that the one where we are connected most of the time.
To end and also Its a requisite so Please disregard if you have no interest in it, but I was wondering if it would be possible for the script to have a “scan” feature, this is because I have a company that cleans my house, most of the times they send the same people, but some times, they send others, and I notice that some clean very well and others…not so well, and I would like to “know” who is/was in the house so that I can specific that I dont want “this, this and that” and want, “this, this and that”
PS: I also connected my pie3 to the network to try to avoid the wifi interference.
Hi @jpm - The script I reference above is different from the presence script that is the subject of this thread. The monitor script is currently in alpha.
No, it is not possible to scan for arbitrary devices and know who owns those devices. You will either have to know the Bluetooth MAC address of each housekeeper’s device
yes
i have also tried to do pub with commend and it worked,
my broker is in different raspberry
i have changed the file permission to root and now i have different error
pi@raspberrypi:~ $ sudo systemctl status presence.service
● presence.service - Presence service
Loaded: loaded (/etc/systemd/system/presence.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2018-07-06 15:25:36 UTC; 2s ago
Process: 4904 ExecStart=/bin/bash /home/pi/presence/presence.sh & (code=exited, status=1/FAILURE)
Main PID: 4904 (code=exited, status=1/FAILURE)
Jul 06 15:25:36 raspberrypi systemd[1]: presence.service: Failed with result ‘exit-code’.
this is the result
pi@raspberrypi:~/presence $ bash presence.sh -d
presence 0.4.28 - Started. Performance predictions based on current settings:
Est. to verify all (1) owners as ‘away’ from all ‘home’: 30 seconds to 120 seconds.
Est. to verify one owner is ‘away’: 30 to 120 seconds.
Est. to recognize one owner is ‘home’: 0.15 seconds to 11 seconds.
Connection Refused: not authorised.
Error: The connection was refused.
DEBUG MSG: Scan result:
/owner/raspberrypi_zero/C1:0D:24:84:D5:FB { confidence : 0, name : Unknown, scan_duration_ms: 5059, timestamp : Fri Jul 06 2018 21:03:13 GMT+0000 (UTC)}
Connection Refused: not authorised.
Error: The connection was refused.
DEBUG MSG: Scanning for 0 guest devices between owner scans (no owner device is present).
DEBUG MSG: Remainder of delay before next owner scan: 6
DEBUG MSG: Scan result:
Nice! i just got it working . Needed to install BC and Bluez_hcidump, before autostart got working (so tried manual start with -d). Now it seems to work like a charm. Will monitor coming days to see if interference is lower. Thanks again Andrew
For those wanting to get ‘presence’ to fully integrate into HA so you have device_tracker.xxx, here is what I did to get the UI shown below in both native and lovelace.
N.B All of my ‘presence’ items are in one ‘package’ which keeps it real tidy.
i did all the installation again in raspberry pi zero and it doesn’t work ,
i am sure it is the mosquito broker, but when pub\sub to the broker manually it is o.k.
do you have any idea for solve this issue?