No known_devices.yaml file

Hello,

I am new here. I have Home Assistant installed as a Docker in Linux host.

I want to configure some mobile devices in known_devices.yaml, but there is no file in the configuration folder.

I configured the configuration.yaml this way:

device_tracker:
  - platform: nmap_tracker
    hosts: 192.168.0.0/24

I am missing something?

Thanks and best regards.

Starting with version 0.94 known_devices.yaml is being phased out:

Modernizing the device tracker

This release also introduces a long overdue overhaul of how the device tracker works. We are introducing this overhaul piece by piece, focusing first on device tracker platforms that push their updates to Home Assistant: mobile app, OwnTracks, GeoFency, GPSLogger and Locative.

These integrations will no longer use known_devices.yaml but instead use entities, like all other integrations in Home Assistant. You can change the name and entity ID via the UI. It is no longer posible to merge the devices with other device tracker entities, this includes using the see service. This was flaky at best. You should now use the new person integration for this.

Any customising you want to do, you can do with customizing rather then editing that file (while it still exists).

Thanks both,

I read the link you provide, but I don’t understand how to add an entry to check if my mobile is at home or not.

The Docker host is in other network (192.168.2.0/24) than the mobile network (192.168.0.0/24), both have allow traficc with no NAT. So maybe the MAC address is not a good option.

From the Docker network, I can ping to the mobile when I am at home.

I will appreciate any help.

Kind regards.

You add a presence detection integration. Editing that file doesn’t cause anything to be tracked.

There is, for example, a ping integration, or an nmap one, or


No disrespect intended but isn’t it a little strange that basically the first ‘instruction’ in the linked page(s) about presence detection mentions the ‘known_devices.yaml’ file 
 yet it’s doesn’t/isn’t meant to exist anymore? I’m struggling quite a lot to follow instructions to get device tracking working, in large part, because of this confusing situation.

4 Likes

It’s only some device trackers not using known_devices
 some trackers still use it. My iPhone Ping tracker uses it (custom component) and my router also still uses it
 other trackers like the iOS app don’t use it anymore so the answer is it depends on the tracker.

1 Like

So what dictates the auto-creation of the known_devices folder? Or is it now just a user created ‘thing’?

And if it is user created how do you work out devices that depend upon it? Is there a list somewhere? Or is it simply trial and error?

I have a Pixel 2 and struggling to get it to work in any way.

It can be created or edited by integrations that have not been updated to use entities. i.e. Anything other than:

mobile app, OwnTracks, GeoFency, GPSLogger and Locative.

So Google Maps should auto-create it?

Typically the tracker using it will create it for itself although I found I needed to create the entry manually for the ping sensor (even though it was supposed to be created automatically)

Yeah, that seems to be the case 
 a bit hit and miss.

Yeah hit & miss is a good explanation
 once it’s working properly you won’t need to worry about it again.

Just gotta get it working :wink:

So, in the spirit of sharing and informing 
 I actually finally got my device tracking working.

I have it working through my Xfinity Xfi Gateway 
which I had tried many times before and simply couldn’t get it to work using the instructions on this website 
 until I stumbled upon someone else’s post with their configuration file and 
 what do you know, it now works.

The key for me was that even though the instructions ask for inputting an entry in my config file with Username: and Password:, actually removing them completely solved the problem.

Simply having the “Platform” and the “Host (my router) IP address” was all I needed.

The 'known_devices.yaml" file also, automatically got created and populated. Worth try, though really just stumbled upon it, vague error logs, in hindsight, sort of indicated this but it seems ‘silly’ to me to simply not need those entries. My mistake maybe.

This doesn’t solve my problem though
 All of my devices that were added prior to the known_devices.yaml deprecation seem to work perfectly. ie: trackers for wifi globes, my ESPhome nodes, my Solar Inverter, etc. I tried to add 2x new wifi globes in the exact same manner (ie: same code entries to HA but with new IP addresses) and they don’t track. How else can these be tracked? I don’t see anywhere in the GUI to do so.

Hi, i am still using the 0.90 version. I have enabled bluetooth le tracker and i can see a list of devices but it is not getting updated in known_devices.yaml may be due to the new changes. I am using nut mini and i was able to track only that earlier but i am unable to remove other devices. So, should i always keep tracking all devices for nut mini to show up ?

I wish I could help but I’m stumbling myself 
 before I got my Xfinity option to work I tried the Bluetooth options as well but neither worked for me, using the standard format according to the Hassio documentation. I will say though that neither of the Bluetooth options, and I tried the Google maps options too, created a ‘known_devices.yaml’ file. And even if I created that file, it never got populated with anything.

The moment I got the correct code for my Xfinity setup the ‘known_devices.yaml’ file was auto-created and auto-populated. So it seems that some of the talk on these forums of some tracking methods requiring (and so auto-creating and populating) a ‘known_devices.yaml’ file and some methods not requiring a ‘known_devices.yaml’ file seems to have some merit. I just don’t know which methods they are (and it doesn’t seem like anyone really does either).

So it seems like, to me, that it’s stumbling around trying to find the correct code for your method that will cause the auto-generation and population to work OR finding how your methods works without the need for the ‘known_devices.yaml’ file. Maybe through the ‘entities’ tab in Hassio configuration?

Is there something you specifically need from it creating the file? If your integration/component works, the device is listed in the “states” page under the developer tools, and you have access to add it to automations/frontend/etc. Why do you NEED the yaml file to exist, when you can pretty much do everything you need to rename the device, customize icons, etc from the GUI?

I don’t specifically need anything from it 
 not sure I said I did?

I am just sharing my experience. When I worked out what i was doing wrong with my Xfinity setup, Xfinity then auto-created and auto-populated a file 
 that, to me, seems to imply more of a need from that method of device tracking?

Many of the topics here suggesting help about getting presence detection and device tracking to work talk of the ‘known_devices.yaml’ file 
 so I guess I can be tolerant of people who seem to think they ‘need’ it?

Before my Xfinity setup auto-created and auto-populated the ‘known_devices.yaml’ file, I could see what should have been my devices in the section you mention (the ‘states’ page) but for the life of me I could not get them to work correctly for updating my state/using them as presence detection 
 yes, surely my limitation not the programs but, the second my Xfinity setup did the auto-generation of the ‘known_devices.yaml’ file, I had it working in, literally, seconds.

Again, just my experience.