[Custom component] AsusRouter integration

Hey, there is a template in the integration GitHub for device support (link). Just fill it in, so I will know what device and FW versions work or do not work correctly.

Submitted!

1 Like

Hi guys!
i’m just exploring this card and i wonder - sensor “connected_devices” has delimiter comma, if i see correct. Now, is there any way to show all devices in one card as a list? All cards i tried show all devices in a single row, thus making reading impossible.
How to create card to show attribute “devices” and set delimiter so that i’d have a nice list, like:

- device1
- device2
-...

Battery card may work for you and could possibly filter for the entities you’re looking for.

Nope… at least i can’t put together nothing usable…

This might work…maybe :slight_smile:
Using the Template Entity Row card from GitHub - thomasloven/lovelace-template-entity-row: 🔹 Display whatever you want in an entities card row. as your card, and then something like the code below to list out the “devices” attribute (name the sensor to suit your setup)

{{state_attr('sensor.asus_router_connected_devices','devices') | list | join(",
 ")}}

(adapted the template code from this thread List & count entities / devices connected to specific AP)

Thanks, but sadly no… i tried similar to this, since i remember error in developer tools: “TypeError: ‘NoneType’ object is not iterable”

Hello,

The connected_devices sensor attribute devices is already a list of values MAC/IP/Name. You can easily convert the list with a template. You can use it as any other list object. So, let’s say you want to list only names of devices. You split each element by / and use the part with index 2.

{% for el in state_attr('sensor.devicename_connected_devices', 'devices') %}- {{ el.split("/")[2] }}
{% endfor %}

In principle, any dashboard card with the support of templates will be able to handle it.

An example with Mushroom:

type: custom:mushroom-template-card
primary: Connected devices
secondary: >-
  {% for el in state_attr('sensor.devicename_connected_devices', 'devices') %}- {{
  el.split("/")[2] }}

  {% endfor %}
icon: mdi:router-network
multiline_secondary: true
layout: vertical
fill_container: false

image

Maybe not the nicest looking, but the fastest one in a couple of minutes :slightly_smiling_face:

2 Likes

Many thanks, it works!
I’m not an programmer by nature, so these things are still strange to me, when it gets complicated (i’m more of a “basic - bascom language” guy). I’m learning and i always try to understand what i’m doing… i already succesfully converted your code to : name - IP address - MAC

Thanks again!

1 Like

Hi everyone,
I have an Asus RT-AC66U-B1 (same firmwae as RT-AC68U) with Merlin and I have the Asus Router integration installed in Home Assistant. My issue is that I have 10 connected devices to the Router but only 3 show up under the integration as devices. What could be the problem and the possible fix here?
Thanks for the help!

Hello,

The integration only creates device_tracker entities. The one, that belongs to a device known to HA (e.g. this device was added by some other integration) will show up within a device. See a screenshot as an example. In this case, the device will be shown within 2 (or more) integrations.

Screenshot

In case, this device is unknown for HA, the device_tracker entity is created in the disabled state and needs to be enabled by the user. A screenshot 2 for example.

Screenshot 2

In the latter case, there won’t be any device associated with the entity. Just this entity (entities).

This is a feature of HA itself. I Hope, this will help you.

1 Like

Does this integration have capability to enable/disable internet access for a connected device? I didn’t see such a feature.

1 Like

Hello,

This feature is planned for integration and will be added with one of the future updates.

3 Likes

Is this integration affected by these issues with official integration?

Edit: I am looking for an solution/custom integration to these issues mentioned, cause I am already tired from official integration due to his.

1 Like

Hello,

No, it is not. The official AsusWRT is using SSH or Telnet for the connection. AsusRouter is using HTTP API - the same way, Web UI or mobile apps from Asus work.

Asus devices can easily handle multiple HTTP/HTTPS logins, so there is no problem on more than one connection simultaneously.

1 Like

Hi, thank you, I am setting it up now :+1: :slight_smile:

1 Like

:bug: With the new version 0.8.1, the integration becomes more stable and fixes the annoying “Connection reset by peer” error happening to some users.

:open_book: Moreover, now AsusRouter is translated to Spanish!

Full release notes: Release 0.8.1 :bomb: Less bugs and more translations :open_book: · Vaskivskyi/ha-asusrouter (github.com)

1 Like

I have a problem installing this add-on. I install via Hacs, I reboot HA, but the integration does not found
Home Assistant 2022.9.6

2022-10-04_19h16_46

Can you share a screenshot showing it installed via HACS?

Hey. You might need to clear your browser cache. Or just click Ctrl + F5 - this should help. Some parts of the frontend are cached for faster UI load, which means changes are not shown immediately.