Knowing if anyone is home for certain?

Too bad Sweden is in the EU… :pensive:

Hmmm, maybe we can leave…

C

Yeah, so sorry, truly. From the technical side, it works anywhere that smartphones do, but the GDPR thing… too much risk for a project I currently view as experimental.

2 Likes

Hi.
I use the plugin “ping sensor”. I ping the phone. You have to be connect to your wifi with your phone. Now you can easy see which phone is home. :wink:

Just as an idea, but some TPLink routers have IFTTT integration. You could tell IFTTT if someone is connected to WiFi then do this… I find that at least in my house (my wife and I) always have our phones when we leave. The nice thing about this is that it uses WiFi and not GPS.

I have geofence with ifttt and a custom script asking the router about connected devices. It is mostly ok, even if not instantly. But I mainly use it for notifications, to decide what’s relevant based on presence. In the future I plan to make an experiment with presence tracker based on beacons.

Just to get this whole discussion on topic…
Fanan. You can use Reactor for this purpose as long as you have your motion sensors and door sensors.
You just need to make 1 reactor and use AND on all the sensors as false. That way, if all sensors are showing no movement and the doors are all closed, then set the output to do whatever you want. (vswitch, mode change, whatever.)
You can also use the restrictions with a “Condition must be sustained at least 600 seconds” so it watches all sensors in the reactor conditions to see if anything changes.

That will not work, unless you have sensors covering literally every corner of your house.

I usually stay in a designated room for hour and I don’t open any door during that period. The only way to really check for presence is by combining at least geofencing with other sensors (movement, router, Bluetooth, and so on).

I had the same challenge. What I did was:

  • Enable GEOlocation on my and my girlfriends phone, and make a GEO-zone around your house. Do NOT use the Vera function to automatically set Home/away, it is buggy as ****.

  • Gave our phones an fixed IP address

  • Installed the following app’s on my Vera: Reactor & Ping Sensor

  • I made ping-sensors for me, my girlfriend, polling the IP’s every 15 seconds

  • I made two reactor sensors, one for “comming home” and one for “okay, maybe they left…”

  • In the “comming home” reactor, the main conition is “OR” and then several subconditions-groups, 2 for every person. One is a condition “if house mode is away or vacation” AND “User … is in geofence”, the other one is “if house mode is away or vacation” and “Ping sensor … is tripped and equals 1”.

  • In the “okay, they all left, I’m home alone” reactor, the main condition is “AND” and then I made subconditions for the ping-sensor and geo-location. But, it is important to add to the ping sensors the restriction "Condition must be sustained for -at least- 300 seconds. Or something a bit smaller, because occasionally it can happen that your phone is out of Wifi range for a short period. That happened before to my girlfriends phone when she was home alone, Vera thinks she left, and the house went dark … It’s good for a laugh but it can scare the sh*t out of other users:rofl:

1 Like

I just tried the native Vera App too and noticed it doesn’t always work.

@anauta, how do you enable GEOlocation without using the Vera app?

I use iPhone locator and Reactor…

C

do you need LUA code to use iphone locator? if so, can you give me some samples. i am not good at coding

I am lousy at coding. No you don’t need LUA to use iPhone locator. The home location is simply a box in the options.

I think you can use it to control Home mode directly as well, but I don’t do that for various reasons :wink:

C

thanks. used iphone locator many years ago with LUA i got from this community. then i stopped it when VeraMate came out but i believed was abandoned by its developer. i also used the geofence Vera mobile app but stopped about 3-4 months ago because of its unreliability. ok thanks will go back to iphone locator again. but i never used Reactor - this will be my first time.

If I can (mostly) make Reactor work, anyone can.

Patrick is a star assisting idiots as well :wink:

C

Thank you all for your thoughts and ideas. The purpose of the question was to able to do something similair to what I hope/believe is possible with HA; to have something like this pic below, and know if someone is in a room (maybe thats not possible i HA either - maybe it´s just me dreaming, misunderstanding and wishing). It would be nice if those ‘people’ icons represented a presence in corresponding room:


It would be even nicer if it were possible to have a view like this in the Vera UI.

Much discussed in this community over the years.

Needs the right combination of sensors and algorithms.

Thread with some references here…

Strangely, searching this forum for “Wasp in a Box” will find something of interest.

For me, over the years, what I have found out that works is a combination of pooling the wifi router for an specific MAC/IP address, then use the NetMon sensor to ping it, and combine that with the room motion sensors to determine presence.

This is what I do:

  1. Script goes to my router every 5 minutes and gets a list of connected devices. Scrip compares the list of the WiFi devices that I am interested and triggers a virtual switch in Vera whether the device is connected or not. Virtual switch = ON then device is home.

  2. NetMon also pings the device every minutes and triggers when not connected.

  3. Reactor then detects the Virtual Switch OFF and NetMon for that device and Trigger.

  4. Reactor starts a 45 minute delay timer before any action about the presence of that person is marked as “Away” and additional actions are triggered based on what I need.

The reason to wait 45 minutes is to make sure that the device is not dormant and disconnecting the WiFi. Typically, IOS and Android devices go dormant on WiFi after a period of inactivity, but wakes up at about every 30 minutes and reconnects. This way, waiting 45 minutes, I can eliminate all false positives about the device not being home and my presence based scenes work property 99.9% of the time.

At step one, my WiFi AP also detects Bluetooth devices so I combine WiFi with the BT MAC of the device, helping also to keep false positives down, which for me was the most important aspect of presence detection. So the script looks for both WiFI IP/MAC and BT Beacon and MAC for a particular device. If any of them are present, then no action, if both are not seen by the AP, then change the state of the VS.

Would you be prepared to share the script?

C