So I’ve been doing what i do quite well with HASS.
I look at someones config, work out where to bit of code is and add it to my config and change it to match what i want.
But I’ve hit a bit of a steep curve when it comes to presence detection.
I’ve got a PI with a PIR sensor, which publishes to MQTT if it sees movement. and this then updates a sensor in HASS saying “movement” True/False.
I’ve got GPStracker on my phone and that pushs to the WEB api.
But my wife and guest have iPhones and don’t want to be part of the home automation stuff.
I understand that i can ping the TV and if it responds its on.
Poll KODI (which i already do) to see it’s state.
Poll the Sonos’ to see there state.
But how would i use one of them to update a occupied/vacant sensor to use in automation tasks? or would i just check the state of each ?
Sorry for the silly question, but i’m having issues researching as the configs are all broken up so much.
I also have relatives with iPhones that don’t want me touching them. Also this will only work if your pie has built in bluetooth (pi3) or a bluetooth adapter…
My wife said the same thing. Funny how fast she changed her tune when the lights in the bathroom started turning off with her in there.
Presence detection for guests is a pain. Having them install something on their phone is invasive. Having them carry around a blue tooth device can get expensive when they forget to give it back when they leave or lose it. Assuming any motion in the house is a guest, gives burglars free access once they get inside. The house turns on lights for them and is real nice to them.
I have ended up using multiple methods similar to what you are doing. I have setup a sensor for each device. Some people have setup groups and put items in the groups and then monitor the group. I haven’t had much luck with using groups that way (but it’s been a few releases since I tried last).
Did you look into monitoring your wifi/LAN for presence of certain devices? It works pretty well as long as your wife and guests might be using your wifi anyway.
Problem with that is if they have iPhones, the phones go to sleep and don’t respond to nmap or ping. Also, Apple occasionally changes the MAC addresses on the phones in an attempt to prevent e-stalking so setting up a DHCP-reserve doesn’t work all the time. I had to re-do the reserves 3 times for my 5 iphones till I gave up and just started using ontrack instead. It’s not 100% because of the sleeping issue, but it helps.
So i’ve made some booleans_inputs i’m just gonna try triggering it on/off using automation.
if thats the correct way of doing it.
Yer iPhones are a pain, but as i’m using it more for monitoring and closed kinda loops. i.e. turn the heating up and down, and turning on and off a digital pic frame.
That indeed is a problem. I don’t use nmap but my fritzbox for wifi tracking. It’s not perfect but in general it is pretty reliably. It would be good enough for heating as the false events where the phone is marked as not home when it actually is at home are pretty short.