Owntracks Integration (known_devices.yaml missing)

Hi,

This is my first time posting in this forum, so excuse the error if this is posted in the wrong category. I have homeassistant running as a docker instance on ubuntu. I have created the integration for owntracks and setup my connection with homeassistant cloud. I have also configured my owntracks app as per the documentation to send location information to homeassistant cloud and in turn to my HA instance.

Communication appears to be working well, however, on startup of HA, an error related to the homeassistant.components.device_tracker component is throw regarding the unavailability of the file known_devices.yaml. In addition, all incoming location updates are rejected.

Startup Error:

2019-02-05 13:45:15 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml

Errors on position update:

2019-02-05 13:43:09 WARNING (MainThread) [homeassistant.components.device_tracker.owntracks] Ignoring encrypted payload because unable to decrypt using key for topic owntracks/***/OP6

I have tried creating an empty file named known_devices.yaml under /usr/share/hassio/homeassistant and /usr/share/hassio/homeassistant/config but in both cases, the same file not found error is logged in homeassistant.log during system startup.

Can anyone point me in the right direction ?

If you are running hassio , ssh into hassio, cd into /config and touch known_devices.yaml

I’m running hass.io under docker and I have tried creating the file in both /usr/share/hassio/homeassistant and /usr/share/hassio/homeassistant/config but the error persists (I’m assuming all configuration is stored outside of the actual docker images as these are recycled on upgrade)

known_devices.yaml should exist in the same place that your configuration.yaml file is. Do you have either the ssh or samba add-ons installed? They will give you access to the /config folder if you have any question about where the mount points are for the container.

Install samba addon, go to config. Create it.
Done.

Thanks all. It appear that there is a difference between creating the empty file from the host OS vs from inside the docker image itself, even though the Unix permissions and ownership appear to be the same. Once I created the file from inside the docker, this was populated with info and tracking is now working.

Thanks, !

Hi, Can i just clarify what you mean by ‘touch’ known_devices.yaml… do you mean open it and then close, or update and save, or is ‘touch’ something i am missing? thanks.

I have had to create the file manually in HassOS, but i am still getting the errors.

thanks

The touch command will create an emplty file.

touch known_devices.yaml is a command you can run which will create an empty file for you.

Thank you, I will try this tonight and report back.

replying to myself, for others to know… This fix worked. Thanks all involved.