Windows 10 PC always shows as not_home in device tracker

Anyone run into this issue before? I have a Windows 10 PC that’s on the same ethernet network as two other Win10 PCs, which is running my Plex server.

The two other PCs show up in device tracker in their proper state but the other one always shows as not_home. I can ping it from the Pi running my HA instance, there are no firewalls/anti virus beyond what comes with Win10, there’s an entry for it in known_devices and when I first brought it online (it was a new install) it did show up in my dev panel. It still does, but always as not_home.

Here’s the entry in known_devices.yaml:

1921681195:
  name: 192.168.1.195
  mac: 44:87:FC:E3:CF:25
  picture: 
  track: yes
  hide_if_away: no

IP and MAC address are confirmed correct. It’s in the same subnet as the other two PCs that do show up.

I was hoping for some leads on what to check next…

what router do you use?
and does that PC show up in the router on the same way as the others?

FiOS router, so no HA component support. I use NMap. But the device shows up in the router and all the settings are the same as the others.

what does it say when you look in nmap? does it there also show as up?

1 Like

I figured it out!

I did some reading on how NMap works and what it uses for ping probes and without elevated privileges, it pings ports 80 and 443 on the target device and seeks a response.

So I simply installed IIS on the machine in question and rebooted, then rebooted my Pi and restarted HA twice and it started showing up.

Thanks for working on the problem with me, Rene!

1 Like

Just to make sure I understand you correctly. You installed IIS and are only using it to get a nmap ping response? That not only sounds like a big overhead to me but also a possible security risk if you do not update IIS regulary. :confused:

It’s behind a firewall with no port forwarding. The alternative is to run NMap at a privileged UID on a machine that does have outside links and edit HA core code for running NMap and re-editing it with every update.

To me, that’s more of a risk and more overhead.

1 Like

BTW, if you have a better approach - I am all ears! I’d rather do this correctly if there’s a way to do it without modifying core code.

Okay I just checked out the nmap (Edit: nmap component) code and I don’t really get why they would do a port scan instead of a host discovery. The use the nmap option “-F” which corrosponds to a fast scan. The better method would be imho to do a “-sn” which is a host discovery without any port scans at all.

Anyways nmap should discover your host even if it’s not running anything.

Maybe you can try running this manually at your machine which is running HA? (with “-sn” as well as “-F”) and compare the results.

If this does not give you back your windows 10 machine you might want to check out if you can ping you Win10 machine from your HA machine. If this doesn’t work as well your Win10 might be configured not to listen to ping request where this could help https://technet.microsoft.com/en-us/library/cc749323(v=ws.10).aspx

1 Like

I’m having similar issues. My Windows10 pcs don’t seem to be discoverable to the nmap device_tracker. Would be great to figure out a solution to this…

`pi@hass:~/$ nmap -sn 192.168.0.3

Starting Nmap 7.01 ( https://nmap.org ) at 2016-08-06 00:13 BST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.01 seconds`

That .3 host is definitely running, as it’s hosting the virtualbox instance of hass. I can also ping it from my Macbook and from the hass server on which i ran that nmap command.

Thanks Phyber, but I tried all of that, unfortunately. Ping worked at all points during testing, only Nmap wasn’t seeing it.

Running without -Pn or elevated privileges, I would get the same error as @Soul in the post just above thisl. All of this changed when I installed IIS. For me, this issue is resolved easily by adding IIS. Other users have solved this by elevating privileges and then modifying the core code to include different options for NMap, but I don’t want to have to add my changes in every two weeks when HA sends out an update.

1 Like

Update:

Had to remove the solved tag from this because despite running IIS, two of my three Win10 boxes are no longer showing as up. Can’t understand why the other box, which runs only my Plex server, is seen as up using the same method.

Does anyone have any ideas of a reliable (and not too complicated) method of tracking Windows10 PCs with HA that they could share? I was thinking maybe MQTT but I can’t figure out how to implement it on the Win10 boxes.

i have no trouble seeing my windows 10 PC which is downstairs with nmap.
only the pc on which i am rumming HA on doesnt show like it should.

before i had fritzbox rumming but it kept giving the wrong information. thats why i changed to nmap.

Mine continue to show as down, only the Plex server is recognized. Pinging them and running NMap from the command line on the pi with elevated privileges works, but not from within HA. :frowning:

was that al the time or after recent updates?
i still have 030 running and i know that there were some changes in 0.31

Been this way for a while now, it may have gone back to .29

then i have no clue. :wink: sorry.

nmap is a bit unknown territory for me. im glad it works but i dont know how :stuck_out_tongue:

It would work if I edited NMap to work with increased privilege but I don’t like to edit core files. It only gets overwritten anyway.

I wish there was some way to do this with MQTT but I don’t know how to set up a client on Win10 that would report it to my mqtt server.

cant you write some py code which tries to write a file on your win10 pc and if it succeeds it sends on to HA and if it doesnt it sends off?

1 Like

You know that just by writing that you have summoned @aimc to come in here and tell me how this could be done in AppDaemon in two lines, right??!? What were you thinking?!?!

LOL :grin: waiting for Andrew to see this

Seriously though, I suppose I could just check for the existence of a file without even writing it with Python. It’s an approach I never thought of - thanks. I’ll look further into this and let you know what, if anything, I come up with.