2017-08-15 15:27:08 ERROR (MainThread) [homeassistant.config] Invalid config for [device_tracker.asuswrt]: not a file for dictionary value @ data['ssh_key']. Got '/root/.ssh/id_rsa'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/device_tracker.asuswrt/
/root/.ssh/id_rsa is the valid private key generated for the pi. And I’m able to ssh into the router from the pi terminal. Is there something I need to do, so the private key can bee seen by Hass?
HASSIO uses ResinOS underneath. ResinOS utilizes Docker containers - basically like running each program in it’s own VM, but with two key differences - Docker eliminates the need for each ‘container’ to have it’s own set of libraries, etc and each container does not have it’s own operating system.
Since Home Assistant is running in a container, isolated from the rest of the system, when you’re typing ssh_key: /root/.ssh/id_rsa the Home Assistant container is searching for /root/.ssh/id_rsa within it’s own file system, seperate from what you see when managing Hass. io via SSH.
You’re likely thinking that you need to somehow get the id_rsa file in the container’s filesystem. However, this is not a good solution. Because of how Docker works, the filesystem in each container is not permanent, meaning it does not persist between restarts of the container.
To resolve this problem, Docker implemented something called volumes. Volumes are a way for your Docker container to see files that exist on your host’s filesystem (where you’re storing your id_rsa file). HASS. io automatically mounts the /data folder on your host’s filesystem to /data within the Home Assistant container as a ‘volume’. So, to resolve your issue, copy or move id_rsa to /data/.ssh/id_rsa and reference it within the config like this:ssh_key: /data/.ssh/id_rsa EDIT: If /data does not show up in the HASS container for some reason (I just assumed it would via some Googling), put the file in Home Assistant’s config directory and use /config/.ssh/id_rsa instead.
Here is some more in depth explanation about how Docker’s filesystem works. http://container-solutions.com/understanding-volumes-docker/.
Thanks. Putting it in /data/.ssh/. But it pointed me in the right direction. It is caused by the docker not seeing the folder. But for some reason it didn’t see the .ssh folder when I created it in /data/. But moving it into config worked.
Also thanks for those links, those will help a lot.
It seems my ASUSWRT is adding devices non stop. I recently had so many devices the device tracker stopped responding; purging the known_devices.yaml fixed it.
Is there a way to tell it to stop adding devices?
my config:
device_tracker:
platform: asuswrt
host: 192.168.1.X
username: Super secret username
password: Super secret password
interval_seconds: 10
consider_home: 180
track_new_devices: no