Known_device.yaml not recreating / device tracker

I am getting really happy with my hassbian setup. So its time to get device tracker working properly for automations and I am running into issues.

Owntracks and CloudMqtt is all working fine. I can see updates on Websockets UI.

My issues seem to be with Home Assistant, and I feel like I am missing something simple. I am currently getting the below error:

2017-07-14 20:29:49 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /home/homeassistant/.homeassistant/known_devices.yaml: Config file not found: /home/homeassistant/.homeassistant/known_devices.yaml

I have had this working once, about a month ago. The known_devices.yaml created itself as per the below in the documentation:

Once device_tracker is enabled, a file will be created in your config dir named known_devices.yaml. Edit this file to adjust which devices to be tracked.
(Device tracker - Home Assistant)

For some reason the above doesn’t seem to be happening. When I put a copy of known_devices.yaml I have from a backup, the error disappears. However none of the information repopulates and I can’t track anything.

I have spent a few hours trying to get this to work now. Following the BRUH video etc. I have removed mqtt and device_tracker from the yaml, restarted home assistant, popped everything back in but I don’t seem to be getting any closer.

Any advice would be warmly welcomed!!

Contents of my configuration.yaml is:

mqtt:
  broker: mXX.cloudmqtt.com
  port: XXXXX
  username: xxxxxx
  password: xxxxxx
  
device_tracker:
  platform: owntracks
  track_new_devices: yes

PS: I know there is a bucket load of posts related to this and I have ready many many many posts and tried everything I can think of. Hence why reaching out! :slight_smile:

I am still really struggling here… is there anyone with some knowledge that could lend a hand?

Did you find any solution? I am having the same problem…

in my case the solution with automatically created known_device.yaml file was to check and update the authority for the file.
I’m working on a Linux system and I changed the owner, the group and the ACL-settings (getfacl, setfacl).
Then it works fine

I have the same problem - no known_device.yaml file being created. I’m running HA in a Docker container on Lubuntu 16.10. Could you please tell me what changes you made - i.e. did you change details of the known_devices.yaml file, or the config folder? What did you set owner/group to?

I’ve manually created a known_device.yaml file using the touch command, and the ACL settings look like this:

# file: known_devices.yaml
# owner: homeassistant
# group: nogroup
user::rw-
group::r--
other::r--

But it’s still not being updated by the device_tracker.

Hi itm1960,

this are my settings:

file: known_devices.yaml

owner: homeassistant

group: nogroup

user::rw-
user:thomas:rw-
group::rw-
mask::rw-
other::r–

the difference is the group authority.
Do you work with the user homeassistant?
I’m working with user: thomas

I guess my group authority isn’t a problem as I just created another device_tracker as an experiment - using the ASUSWRT platform. After adding that device_tracker the known_devices.yaml file was created fine, and was populated with all of the devices connected to my Asus router. It’s just the owntracks device tracker that is not creating the known_devices.yaml file (and is not updating the file created by the ASUSWRT device tracker either.
???

So it turns out that it was the internal MQTT broker that was the problem - I switched to Mosquitto and the problem went away.