issues with "presense" using ping sensor & iphone

I have two ping sensors, one for each of out phones, and a virtual switch that dictates if the people are home or not home…
My scene is setup so that any time either of the ping sensors are tripped run a scene to see if we are home or not… If only one of us are home, then the house should still stay in “home” mode and not away mode… This works fine on my phone using android phone, the iphone on the other hand sucks since it turns off the wifi when in sleep mode, and not connected to power. Does anyone know of a different option?

Both of the ping sensors are set to a poll time of 30…

Here is my code for the check if anyone is interested…

if(luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","Tripped",17)=="1") and (luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","Tripped",16)=="1") then luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, 18) --"home" else luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 18) --"home" end

In this case, you may want to try PLEG. You can set it to verify a period of inactivity. So if your iPhone returns a ping every 8-10 minutes, you can create a condition to test if it has connected in the past 30mins, for example. No connection for a longer period: DoSomething.

I didn’t realize it at first, but the ping sensor has that same functionality… I set the phones to 20min timeout, so any time during the 20 min if the phone responds it will reset the 20min timer…

So poll time 30sec, timeout time 20min…

Thanks for the help!!

Hi @mchipser, I’m interested to set up something like that. Can you elaborate a bit more on what a “ping” sensor is please?

I have an iPhone which I can use iPhoneLocator to detect presence. But my wife recently switched over to Android and I’m trying to find a replacement to detect presence.

Thanks in advance!

[quote=“jeff3lo, post:4, topic:181134”]Hi @mchipser, I’m interested to set up something like that. Can you elaborate a bit more on what a “ping” sensor is please?

I have an iPhone which I can use iPhoneLocator to detect presence. But my wife recently switched over to Android and I’m trying to find a replacement to detect presence.

Thanks in advance![/quote]

sure…

Goto the app section of the ui5 interface, or ui6 legacy and login… Once there search for “ping” and install it…

Once it is installed, you can create a virtual switch of sorts that triggers when a ping has been responded to, which means the device is home…

This can be used for a bunch of things, like to detect if my desktop has shutdown, and if so send me a text… or maybe the family tablet is no longer responding to pings, and it never leaves the house so maybe the battery is dead, or someone stole it…

Just a few examples…

If you need any other help let me know…

This works just fine if you don’t need it to be very accurate. If your phone is in your pocket untouched the ping sensor also won’t know you home until the phone wakes up and check for wifi. Android is better but no different when you arrive if its asleep.

Why not run a geofence along with this to get better results? for Iphone, Iviri app and for andriod you can use Vera Proximity.

use PLEG and combine the use of both to tell you which is faster.

If you get false alarms like when your phone goes asleep it says your away. Well then use PLEG to ignore that only if the front door, garage or what ever you use to leave hasn’t been opened in the last 5 min or something.

I have quiet a few things to keep false triggers from happening including some of the things above plus a few others. And Mine and my wifes phones are setup to do different things when only one of us leaves or arrives vs. both. I rely on my home away status to be accurate and to trigger when I get no more then the end of the street to lock up behind me and to turn on outside lights when I pull up not when I’m already inside the house.