[UPDATED] iPhone WiFi Presence Sensor

1 Like

I've been trying to get this to detect if my Windows 10 PC is connected to the network or not but it doesn't seem to work. I want to enable / disable certain automations depending on whether or not the PC is switched on. I've assigned a static IP to the PC on the Router.

Has anyone managed to get this to work? How did you do it?
This is what the logs look like:

It's working perfectly fine for my Android phone:

Windows Firewall? You could try temporarily disabling the Windows Firewall to see if the behavior changes. If it does, then open port 80 on the MS Windows firewall for incoming connections.

1 Like

I have it working successfully on my sons win10 computer so the goodnight rule doesn’t turn the lights off in that room if he is online.

Edit. Have you tried just pinging the win10 computer to see if it responds?

I can ping the PC from another PC on my network just fine.

However, the presence sensor doesn't seem to be able to communicate with it. File & Printer sharing is turned on and in Windows Firewall, and the ICPMv4-In rules for Domain and Private are enabled in the Advanced Security settings. The home network is set to "Private".

Maybe this program would do what you want

From what I understand, that app pings a website. Would it work the same way for pinging a PC?

@Akshay or @thebearmay's Hub Ping app... I use it as a quick and dirty method to make sure HE is still connected to various IP devices. Should work fine with a workstation as long as it has a static or reserved IP and it responds to a ping.

You have to open port 80 in the firewall... Just as a quick test, disable the Windows Firewall and see if it starts working.

The way this Presence Sensor works, is that it attempts to connect to a web server on the device in question. If it gets a response from the device in any way, the device is assumed to be present. If, however, it gets a timeout, then the device is assumed to be not present.

A web server does NOT need to be running on the system in question, as the OS will reply back with a connection refused response, if the system is reachable. But, a Windows Firewall will most likely just 'eat' the request and not respond back unless port 80 is open in the firewall.

1 Like

Disabling the firewall works.
I followed this tutorial to open port 80, but as soon as the firewall is turned on, the presence detection stops working despite having a rule active that allows inbound connections.

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.


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