[RELEASE] iPhone WiFi Presence Sensor

community_driver

#121

So, if I call this to run every 15 seconds, I need to change the timeout box (minutes)?

I changed the code to run it every 15 seconds for prompt arrivals for opening garage doors.....


#122

I believe you would need to assume the timeout box is in units of quarter-minutes, instead of full minutes. So enter a value 4 times greater.

Of course, you could modify the code to calculate the correct timeout value/number of counts automatically.


#123

Yup, this was purely laziness on my part to code it this way. :slight_smile:

I really should go back in and do it right...


#124

thanks for the app. This works great with Moto G5, G6, X4 and Pixel 1. We dont do fruit so i had to modify the code. Mine properly shows in the apps as "Wifi presence sensor"


#125

Hi, I can see my S8+ & my wifes S6 in devices. When I go into RM I can't see either of them,. Can anyone advise what I haven't done to make them visible please


#126

Have you selected the WiFi driver as their drivers?


#127

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.


#128

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.


#129

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.


#130

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


#131

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


#132

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.)


#133

Working fine so far on two Motorola Z phones.

Thanks for making this.


#134

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!


#135

@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!


#136

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).


#137

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


#138

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.


#139

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


#140

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?