[UPDATED] iPhone WiFi Presence Sensor

Must be new in one of the latest Android versions? My older Android 8.0 doesn't have this anyway.

It looks like they started laying the foundation in 8, added it in 9 but hidden away in the secret developer features menu, and then enabled it by default in 10.

https://source.android.com/devices/tech/connect/wifi-mac-randomization

2 Likes

Thanks!

Yes, but it is an option you can turn off.
Right now it seems to be on by default even for existing WiFi connections, however that may just be in the beta.

Regardless i figured it out, and am happy that the feature exists (yay) and I am able to get this back working as normal.

1 Like

After a security update to my phone already on android 10 it enabled the random MAC addresses for all of my networks so this might not be the case.

For anyone using this driver with my app Combined Presence, I have just release V2.0 of Combined Presence. The best way to get the update is to install via Hubitat Package Manager, but you can also install directly from GitHub.

It should be fully backwards compatible and not break any existing combiner instances.

The most important update is the new "Standard Combiner". This instance has the optimal logic for detecting presence of a person using multiple geofencing and wifi-based presence sensors. You don't have to think about the boolean operations involved. It just does it the best way based on the performance characteristics of the different sensor types.

https://community.hubitat.com/t/release-combined-presence

1 Like

Just installed this and I see this in the log?

Bill's iPhone Presence: httpGetCallback({"headers":null,"warningMessages":[],"status":408,"errorMessage":"Connect to 192.168.50.191:80 [/192.168.50.191] failed: Connection refused (Connection

and

Bill's iPhone Presence: httpGetCallback({"headers":null,"warningMessages":[],"status":408,"errorMessage":"Connect to 192.168.50.191:80 [/192.168.50.191] failed: connect timed out","errorData":null}, data)

It does seem to be working however.

Yep, those are the two expected responses from this driver trying to connect to your phone via http.

Connection Refused means that the phone is at least on the local network. (i.e. "present')

Connect Timed Out means that the phone is not on the local network. (i.e. "not present")

4 Likes

This question has come up a number of times from new users. I'm tempted to wrap that logging statement in an explanation of what it means. I'm actually taking some time off from work soon...

7 Likes

Ok, I made that logging statement less confusing. New v1.03 is live on GitHub. As always, the best way to get the update is with Hubitat Package Manager.

7 Likes

I have a question. In the house we have Galaxy s8 s6 and A5.
The S8 presence works really well on this and shows no false not present.
Why would 1 phone (it has the hubitat app but dont thing thats the reason) work 100% and the others not ? is there something that can be sent on the phone to make the presence readings as accurate as the S8 ?
Thanks

Unfortunately, I'm not an Android user, so I don't truly know. My guess would be that those other phones aren't giving the same response to the requests I make.

Ideally, there would be a version of this driver designed for Android. It would ask you what phone you had, and be able to understand the different responses that come from the different device types. Unfortunately I don't have any Androids and maintaining something like that isn't a commitment I'm going to be able to make.

But if anyone else wants to take the idea and run with it... :smiley:

Are the others possibly shutting down their WiFi when they are not actually being used? iPhone guy here but I remember reading that this is a possiblity.

Do you mean manually ? Then that would be no.

Unless the phone is doing something automatically but then would it not do that on all galaxy's?

Don't know not an Android guy. On the iPhone it depends on how many apps you are allowing to run even when you aren't using them. In this case those apps would also need to be doing some kind of wifi activity I would assume. Just was a guess.

Lots of Android shut off wifi after the screen goes dark. My Motorola is nearly instant, it drops off Wifi almost simultaneously with screen saver.

Different models and different Android versions seem to handle power saving differently.

check the logs and see the responses when the phones are on and off the wifi. You might need to change the status code or the description to match what the phone is giving

I AGREE. Xiaomi and Huawei are famously known for this. Even notifications of whatsapp wont be received. This is how they sell longer battery life marketing.
However being a samsung user myself I can tell you samsung is so big a company They are not consistent with their products performance.
My one tab 4 years old can last 3 weeks straight and only goes down 40 percent when screen is off. It also uses minimal wifi like once a day to receive any notifications.. atill my most reliable android device.
My latest S4 tab and S8 last 4-6 days even with wifi turned off.
Use wifi analyzer app and see how they run

So coming back to my posts from May, this is still occurring where it looks like a scheduled job gets stuck which means the presence detection doesn't work. Clicking refresh does nothing, neither does restarting the hub. If I remove/add the device, it works for some time before getting stuck. I still think this is related to an earlier system update, because I recall having problems since that time.

I just installed this on my wifes iphone 8 and my pixel 3.

It works better on the pixel than it does on the iPhone?

It keeps flipping between present and not present on her phone but rock solid on my pixel, is this the wifi sleep thing on iphone? if so how doe one get around that?