[UPDATED] iPhone WiFi Presence Sensor

Hi, Sorry for not replying earlier, I've been away. Yes I have selected the iPhone Wifi Driver as the driver. What 'Event Trigger' should it be located within?? I'm pretty sure I've looked in them all?
They are both in the 'Devices' list, & both are showing 'Present' as we are both home.

Presence, but then saying that mine route through another app to combine them with others ie WiFi and GPS location which In turn uses another virtual driver but I'm pretty sure that they still show up in there.

Since the topic was discussed, I thought I would share what I've been doing. I maintained the default 1 minute polling interval, but use rule machine to poll every two seconds when mode is away and the deadbolt is unlocked. It then returns to 60 second polling. It usually detects presence with maybe three steps into the house, and this way I didn't have to change the app's code.

OK I'll have a look when I get home. Thanks.

@CaseyG4 I would like to let PCs to act as presence sensor, together with phones. How do you do?

I'd recommend using my other wifi presence app: [RELEASE] HTTP Presence Sensor

But you'll need the PC to respond to HTTP GET requests on some port. You may already have something running on your PC that does this. If not, you could install a super basic web server. (It doesn't matter what kind. It just needs to return successful responses to GET requests on any port you choose.)

Working fine so far on two Motorola Z phones.

Thanks for making this.

Can I recommend you also look into @jwetzel1492's Combined Presence Sensor. It really makes presence detection way more reliable and versatile.

Yup @jwetzel1492 - 100% deserves our thanks!

@jwetzel1492 Well, so far so good for me. I have not been able to play with it extensively, but I ran out of the house a few times this morning and according to my logs the app is correctly seeing when I am gone and when I return. For the record I am on a Oneplus 7 pro (android).
I have not had a chance to try how well this works with your combined app but hope to later this week.
Thanks again for taking the time to develop this app, really is a great tool especially for apartment dwellers like me!

Would it be possible to incorporate the time between checks into an option in the device page? Reason is that I would like it to check very often when I'm approaching home (using the HE app geofence). I have a garage door that automatically opens and shuts when my phone connects to the wifi network, based on this app, and I'd like the connection to my wifi and HE to be instant. So, I would have a rule that increased the checking in this app/device when I'm approaching home (as per the HE geofence).

1 Like

Can you post that rule? I'm starting to play with one myself and would love some guidance.

Sure, but I dont have the HE geofence app written - at this stage it's only an idea.

This is the rule for opening the garage door, and the second rule is one that only enables THIS first rule if I've been away from home for >15 minutes. While I have an extremely strong wifi network, I dont want my phone to drop off then on the wifi network, and then to open the garage door. Note that this rule is restricted to DAY and EVENING (not NIGHT or AWAY). I have a separate rule for AWAY which first turns off the alarm, then opens the door).


The VS automatically turns off after 500ms.

This (below) is the second rule that enables the first, when I'm away for >15 mins.

Here's what I'm playing with so far. I've commented out the refresh statements in the driver and put the refresh action into this rule below. I'm trying to limit the amount of refreshing by using the geofencing of the Hubitat App and my wifi. The "Joker" and "iPhoneX" are the same device. The Joker is the Hubitat driver and the iPhone is the Wifi.

28%20AM

Here's the actual rule to turn the alarm off.
43%20AM

1 Like

At risk of taking this thread off track, how would I do this repeat. I've not worked with repeats before.
I want to repeat the refresh at 10 second intervals until my wifi presence is detected.

This is the current rule, which triggers when the Mobile App enters the geo fence.

Do I use: wait for condition, and can wait for condition cancel repeats?

Unfortunately, this isn't working well on my S7. It keeps showing my presence as dropping and re-connecting at random times, even though, according to my router, my phone has remained connected the whole time.

I turned off all battery saver functions, but it didn't seem to help.

Does anyone have any suggestions?

So I plugged the phone in last night at 10:30 pm, and unplugged it a little after 8 am. While the phone was plugged in, it didn't disconnect once. After I unplugged it, it began disconnecting again at random times. This is despite the fact that I have turned off all battery optimizations, set several apps to not optimize battery usage and never sleep, and even installed an app from the play store which claimed to keep wifi awake. It seems like no matter what settings I use, I can't keep the phone from putting wifi to sleep when it's not plugged in.

Throw your iPhone out of the window and get an Android phone lol :wink:

2 Likes

This is with a Galaxy S7!

Woop ha ha ha :smile:

I'd say to increase the delay before timing out, but one time your phone put wifi to sleep for a full 30 minutes. That's too long.

Download the Hubitat app