[UPDATED] iPhone WiFi Presence Sensor

Is the firewall allowing icmp through? Ping doesn't really use a port (port 80
Is for http)

By default, I believe the built-in Windows Firewall does allow ICMP traffic through. However, the "iPhone WiFi Presence Sensor" does not use ICMP to determine whether or not a device is active on the network. It uses an http call, and interprets the type of response it gets back. A 'timeout' means the device is not on the network. Any other response, is interpreted as the device being on the network, including the old "Client has actively refused..." type of response. Thus the reason I was suggesting that the Windows Firewall was probably the source of the issue that @Akshay is trying to resolve.

1 Like

Ahh thought it was using icmp

It's early and I'm groggy - but I recall win 10 does indeed block icmp by default IF the network is public. That change occurred (again - from memory) at the 10h2 upgrade in late 2020 or early 2021.
It may have coincided with the Apple security change to hide the MAC by default.
Which, maybe this is related to?

1 Like

Good info!

The user is trying to figure out whether a Windows 10 computer is on or off. I don't believe there is any relation to the MAC Address randomization on iOS and Android devices.

erp! I saw the title and connected dots that weren't there. oops. Which I seem to have been saying a lot lately.

1 Like

The network is already set to private. The inbound firewall rules are set to work on all three, private public, and domain. Since it's a desktop, I am not worried about it connecting to a random public network. It's always going to be plugged in at home :slight_smile:

I would simply configure the firewall to be disabled when on the private network.

Or, use one of the community drivers that utilize a true ICMP ping to determine if a device is responding on the network.

4 Likes

Is there anything that you know works reliably? Or at least is there anything you would suggest? I was thinking of giving this one a shot.

That’s the driver I would probably start with as well.

1 Like

Thanks. This seems to be working perfectly! It's pinging the PC and updating the presence precisely as required.

Now I need to experiment with this and see if it ends up being a more robust presence sensor than my phone.

Perhaps because of Android 11's battery management logic, my phone keeps getting marked as "not present" despite using both Geofencing and WiFi presence.

Hopefully by adding my PC into the mix in Rule Machine will result in better presence detection.

1 Like

Do you use Alexa ? If so create a virutal presence sensor for Alexa associated with your mobile device. That works pretty good for me and use in combination of Combined Presence.

No I do not. I don't really use any assistants.

Thank you, this was most helpful for my Android phone.

@jwetzel1492

This driver works very well on my Android phones.
But unfortunately the response is very slow, sometime more than 2 min.
Since I am living in the big apartment complex phone(s) making an attempt
to connect to my WiFi when I am basically right behind the door.
Unfortunately this 2 min delay makes it unacceptable.
Is it any way to increase driver responsiveness?
I guess, the acceptable delay should be less than 20 sec.
Occasionally 1 out of 10+ attempts are blazing fast, almost instant.
I have no idea why but this makes me fill that it is possible to
improve driver responsiveness.

PS.
I tried android tasker app.
The delay is still next to 1 min but somewhat more consistent vs IPhone Driver.

@jwetzel1492
i seem to randomly get the following errors on my phones:

org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_joelwetzel_WiFi_Presence_Sensor_725.parse() is applicable for argument types: (java.lang.String) values: [ENTER]
Possible solutions: main(java.lang.String), use([Ljava.lang.Object;), wait(), run(), run(), any() (method parse)

org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_joelwetzel_WiFi_Presence_Sensor_725.parse() is applicable for argument types: (java.lang.String) values: [EXIT]
Possible solutions: main(java.lang.String), use([Ljava.lang.Object;), wait(), run(), run(), any() (method parse)

Oh, that's weird. parse() should never be called in this driver. Did you install using Hubitat Package Manager?

i dont recall. should i delete the driver and reinstall with hpm? what is the best practice here?

Yeah, that's a good next step to try.

still happening after reinstall. not sure what to do.