No known_devices.yaml file?

Hi. I’ve been trying to setup presence detection on HA for a few days now, but everytime I do so HA never creates a known_devices.yaml file in the config directory. Why? Should I create it manually? I’m using Asuswrt to track through the router. My config for the device tracker is below. I also have discovery turned on if that makes any difference. Why isn’t it creating the file?

device_tracker: platform: asuswrt hosts: 192.168.1.1 username: myuser password: mypass home_interval: 10 track_new_devices: yes consider_home: 180

The file will be created the first time your presence state actually changes- if you haven’t left home since you set it up you won’t see anything.

1 Like

I have done this. Not only did a few of my family members leave a while ago, but i also disconnected my phone from the wifi and then reconnected it. Still nothing

Any errors in the log?

Yes, in fact. In the log it says: homeassistant.components.device_tracker.asuswrt: Unexpected response from router: password refused. However, the password works when logging into the routers config page at 192.168.1.1. Why would this be?

You need to enable ssh or telnet to access that router from Hass.

From the ASUSWRT components page:

protocol (Optional): The protocol (ssh or telnet) to use. Defaults to ssh.

I have enabled SSH in the router and set the port to 22. I even added the raspberry pi’s SSH key to the “Authorized Keys” list in the router

I see these:

From the ASUSWRT components page:

password (Optional): The password for your given admin account (use this if no public key is given).
pub_key (Optional): The public key for your given admin account (instead of password).

Make sure to use one or the other, but not both. If using password. Make sure “Allow SSH Password Login” is enabled.

You could also try disabling “Brute Force Detection” if enabled to see if that helps.

Sorry, my previous reply was unclear.

Anyways, I did only specify one, not both. I put the password to the router into the config page for HA. In the router page, Allow password is enabled and i have it set to port 22. Is there something i’m missing? The password does have a $ symbol in it, could that be tricking HA?

Nevermind. I got it to work by turning telnet on in the router and switching the protocol to telnet. Not sure why ssh wont work though. SSH is more secure so id prefer to use that.

Just happened to run across this a minute ago:

Looks like it should be fixed in the next release. :slight_smile:

Oh I dont see that myself. Interesting. Hopefully it is fixed in the next release because SSH is much more secure! Thank you

I have a ASUS using Tomato and SSH only works for mine if I use root as the username and admin password for the PW

Reusing an old thread if anyone encounters the same issue. I had the same problem when using an SSH-key, @r0gu3patri0t comment on using root as username instead of my actual admin account was the solution.