ASUSWRT component installation

Please advise what can be wrong?
I am trying to install ASUSWRT component

following this guide

though System Console reports Error.
I am on Homeassistant Hass.io (running on VM).
Maybe there is some other way of installation?

Take a step back and look through some of the terminology on the getting started pages.

asuswrt is an integration, meaning that you need to add it to the configuration.yaml file like this:

Also anything in ALLCAPS you need to replace for your situation.

# Example configuration.yaml entry
asuswrt:
  host: YOUR_ROUTER_IP
  username: YOUR_ADMIN_USERNAME
  ssh_key: /config/id_rsa
  sensors:
    - upload
    - download
    - upload_speed
    - download_speed

Addons are a way to add other docker container based “addons” to your home assistant instance.

So the home assistant Supervisor tab is where you can manage all off the addons (installing, updating, configuring)

Thank you for advice, but.
I added up above mentioned text with my router credentials to configurations.yaml
and ater reboot of server I see notification that there is error in asuswrt component

Error during setup of component asuswrt
16:09 components/asuswrt/init.py (ERROR)

Have you copied your Home Assistant SSH key onto the AsusWRT router? You must use SSL login, telnet is no longer supported.

No, I tried to use username/password.
Doesn’t it work without SSH key?
I can upload it to WRT Router. In root folder of router or where?
If I create config folder inside /www folder of ASUSWRT router, how should I specify SSH key path in configuration.yaml?

ssh_key: /www/config/hassio.ppk
?

Having a question about the AsusWRT component. Thought this would be the most appropriate place to ask about, instead of opening a new topic.

I’ve configured the AsusWRT component this week. And now I’ve found out that there’s a file automatically created, named known_devices.yaml
Well This was also to be found in manuals, but seems I’ve overlooked it somehow.

Now the thing is, it seems like every single device in my network is integrated automatically into this file, but they also got all their own entity. This is a bit annoying, since also every smartplug is integrated this way as a device_tracker now.
What can I do about this? Can I stop it somehow from “autodetecting”? And when I remove them from the list, will they keep away. And what about the entities?

Thanks in advance!

One thing you can do is set track: to false in known_devices.yaml manually for each device.

devicename:
  name: Friendly Name
  mac: EA:AA:55:E7:C6:94
  picture: https://www.home-assistant.io/images/favicon-192x192.png
  track: false

If you have device_tracker enabled in configuration.yaml you can use a default for new devices:

device_tracker:
  - platform: xxx
    new_device_defaults:
      track_new_devices: false
1 Like

Ah yes!
I’ve configured AsusWRT, so I suppose that I can add the line “track_new_devices: false” here.
Also found info about this part in the “Device Tracker documentation” must have overlooked it.

If understoot correctly, when set to “false” new devices are still added to the yaml file, but not showing up as entities annymore?
When configured all the connected devices of the router will be imported?

Unfortunately asuswrt does not accept track_new_devices. It only applies if you have another platform setup through device_tracker (like bluetooth, google maps etc). If you’re not using anything else, you need to do this manually in known_devices for each device.

1 Like

Thanks for your feedback!
But I did only have configured the AsusWRT configuration since yesterday. Since then I’ve spotted this known_devices.yaml file and the extra entities of all the connected devices of my router. Maybe something has changed or updated?

AsusWRT creates known_devices.yaml, but you can’t use track_new_devices in your configuration.yaml because AsusWrt component doesn’t accept that key. You need to do that manually.

To use track_new_devices: false and have all new discovered devices automatically set to false in known_devices.yaml you need to use that key together with device_tracker, but then you need to use a platform as well.

One workaround could be to use device_tracker together with f.i Ping and have a “fake” host just to be able to use track_new_devices.

If you want to try that, you can add this to configuration.yaml:

device_tracker:
  - platform: ping
    hosts:
      hostone: 192.168.2.10
    scan_interval: 3600
    new_device_defaults:
      track_new_devices: false

This will create a new device but then all new devices detected by your asuswrt component will be automatically set to false in your known_devices,yaml. If you want new detected devices to be visible, you need to edit known_devices.yaml and set track: true.

1 Like

Thanks for clarifying things! I was misunderstanding thjngs.

So the AsusWRT integration automatically creates the known_devices.yaml file. And also automatically adds connected devices to this list.
But the line “track_new_devices: false” alone will not prevent to show up new found entities. So I could try your aditional yaml code to get around. Right?

Correct! Using platform Ping is just to enable usage of track_new_devices.

1 Like

Great! :smiley:

I will try :slight_smile:

Thanks! That seemed to work like a charm.
Just edited the hostone-IP to the IP (10.0.0.1) of my AsusWRT router. Or does it not really matter?
It created the following new device:

hostone:
  icon:
  mac:
  name: hostone
  picture:
  track: false

But left all the new discovered devices to state: false in known_devices.yaml

:metal:

Great! IP adress could be anything really. If it gets a ping response it will set the device to home, if not it will be not_home.

1 Like

Would that still apply today? Based on the information on the Device Tracker Integration Page, known_devices.yaml was being phased out as of 0.94.

They provided an example for a netgear router, could it be modified for asuswrt, as so?

device_tracker:
  - platform: asuswrt
    host: IP_ADDRESS
    interval_seconds: 10
    consider_home: 180
    new_device_defaults:
      track_new_devices: false

Hi @FredTheFrog,

Can you please explain further how I can do this?

Thanks in advance!

It’s been a long time since I did it. Essentially, your router and Home Assistant systems need to exchange keys to establish a trusted connection. You can use FTP, or SCP commands to copy the key file across. It seriously helps if you can login to your Asus router via puTTY or another terminal emulator. Like I mentioned, it’s been a LONG time (and my memory is old and somewhat rusty. :slight_smile: )

I have tried for a day now and still can’t get the ASUSWRT integration to connect. I fill in details for host
username
port
ssh path and I have the following in my configuration.yaml file
asuswrt:

host: 192.168.1.1 #ASUS Router
username: Admin
ssh_key: /config/ssh/id_rsa
mode: router
sensors:
- devices
- upload
- download
- upload_speed
- download_speed

and all I get is an unexpected error