Please excuse what’s probably a very simple beginner question - but I just want to make sure this is what I need before splashing out on a couple of pi zeros. Is this suitable for an HA installation running in VirtualBox on a Mac (and which doesn’t therefore have direct access to Bluetooth)? Am I right in understanding that a separate raspberry pi would report back over wifi, and would be able to detect the presence/absence of iphones and items equipped with ibeacons?
I can’t find a clear answer in the docs, or in the forum - but perhaps that’s because to more experienced readers the answer may be obvious!
Yes, that’s indeed the way it works. To give an example:
Pi4 with HA installation (supervised install), in my office at home, no monitor.sh
PiZero, next to the front door, with monitor.sh
PiZero, in the kitchen, with monitor.sh (this is the Pi for my Grocy barcode scanner)
PiZero, in the garage, with monitor.sh
PiZero, next to the outside car park, with monitor.sh
All these PiZeros report back to HA and are notifying each other to perform a scan under some circumstances.
My recommendation (but that’s really only me!) is, don’t use the BT on your server installation. This one is reserved for my BT devices like thermometers and such. The presence detection (aka monitor.sh) is running best at the “gates” to your appartment/house.
The communication between your monitor.sh instances and HA is btw not WiFi, it runs with MQTT (that is using WiFi, ok, point taken)
The only thing I can’t say for sure, how monitor.sh is running with Apple devices. I’m only using Android, but in theory there shouldn’t be any problems. Maybe some things need to be adjusted on the iPhone, so it sends BT data, but that will be configurable.
Anyone have connected to MQTT Broker using ssl certificate? In the mqtt_preferences file, what certificate it’s asking? Shouldn’t it be at least 3 separate paths?
# MQTT CERTIFICATE FILE (LEAVE BLANK IF NONE)
mqtt_certificate_path=''
I think it would be looking for the cert file specified in the mqtt broker. Are you using the addon? In the configuration on the add-on page you should have a cert file specified. That file should be stored in the ssl folder of your HA install.
You could copy that to /etc/ssl/ on the remote pi, then for the path in mqtt preferences use /etc/ssl/fullchain.pem. I dont have this setup with a cert file and this is just my best guess.
yes, I have the mqtt addon and this is what I have in the config setup.
On the client side, it usually ask for 3 files like this example taken from MQTT Explorer. The server ca cert is optional and possibly not need since the MQTT Broker is pointed to this same file for signing.
So, I am confused as what single file mqtt_preference is asking.
I have tried combining all 3 files into a .pem, but I still get the same error message above.
On mine (and this might not be technically correct), the .crt file used in monitor is the same file that my mosquitto server has specified in the line starting “cafile” in mosquitto.conf
I have double checked to make sure the same file pointing at cafile: is the same one I am using on my remote pi which it is. It is still failing to connect although. Wonder if it is a file/owner permission I have to set?
Currently is set to this:
ms1@ms1:/etc/mosquitto/ca_certificates $ ls -la
total 16
drwxr-xr-x 2 root root 4096 Jun 20 00:50 .
drwxr-xr-x 5 root root 4096 Jun 19 07:59 ..
-rw------- 1 ms1 ms1 1432 Jun 20 00:49 mqtt-ca.crt
-rw-r--r-- 1 root root 73 Aug 19 2020 README
Yes - it’s not intuitive. You would think the setting forces all clients to use certificates to verify the identity of the server, but it’s actually forcing the clients to identify themselves to the server using certificates, which is an unusual configuration for MQTT.
I have 6 devices (all apple) I am monitoring. The monitor script is working as it should.
Given this scenario. All devices are home and all is showing 100% confidence in HA when I check via developer tool. However, when I open MQTT Explorer, the one that is highlight in red below, always shows confidence: 0 where it should read 100 like the others. What is causing this? I am assuming is qos, but where do I set this for this particular device?
Purchased a Pi Zero W, followed through all of the setup instructions right through to the final Setup Monitor section, when I get this:
git clone git://github.com/andrewjfreyer/monitor
Cloning into 'monitor'...
fatal: unable to connect to github.com:
github.com[0: 81.99.162.48]: errno=Connection timed out
Any ideas, please? I have very liitle experience of Linux command line so I don’t know what to check. The Pi doesn’t have any problems connecting to the internet generally, though. All of the preceding download and install steps worked fine. So nearly there …
I’m struggling with the -tdr flag. I want to trigger on depart, but scan recursively for arrivals. It is connecting and disconnecting all the time as if its not waiting for the departure trigger. If I change settings to -td it won’t scan for arrivals. I noticed on -h that the -r flag is for both arrival and departure so am I missing something to set it to only scan for arrivals and have a trigger for departures? Thanks.