[UPDATED] iPhone WiFi Presence Sensor

Bingo, I’m good now! Thanks

FYI - I'm on the iO14 beta, and by default Apple now adds a "privacy" setting that screws with this integration. Specifically every few days the iPhone will now change Mac Addresses which in my case (most routers?) changes the IP of my phone.

Good news is you can turn this off, but just FYI in the event you upgrade and are initially confused about what's happening.

3 Likes

Thanks for the tip!

Ooh, I haven't tried iOS14 yet, but I'm going to be ticked about this if I can't find a workaround. So you're saying you assigned a fixed IP address to your iPhone on your router, but then iOS14 changes the MAC address, so your router sees it as a new device and assigns a new IP address?

1 Like

You can specify by hitting the "i" next to the wifi network the phone has joined. This is more for non-home networks I would think. Similar functionality is built in to Windows 10.

1 Like

This is actually a feature in Android as well, but I think it will not be turned on for existing wifi connections. But when I go to my wifi settings, click on my network, and go to advanced I can choose device MAC or randomized MAC. I'm not sure if it defaults to on for new connections or not. Or maybe only defaults to on for access points with no encryption. I don't know.

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?