[Custom component] AsusRouter integration

Hey,

The latest 0.2.0 version does provide a possibility to select network interfaces for monitoring (instead of just having WAN/USB monitoring hardcoded). Of course, it doesn’t solve the problem that your device doesn’t report INTERNET value, but now there is no need to fake it from the BRIDGE value.

So, a bit more flexible :slightly_smiling_face:

Hi, Im on 0.2.1 on RT-AX95Q.

Is there a way to define consider home time like scenario for device trackers? Because long after device disconnected from router still shows as “home” probably due to lease time. Or its not getting updated as devices connects and disconnect to the router.

Thanks for the help.

source_type: router
ip: 192.168.168.53
mac: c0:xx:xx:xx:xx:xx
host_name: Laptop-Acer
last_time_reachable: '2022-05-09T22:09:07+00:00'
connection_time: '2022-05-09T21:59:08'
icon: mdi:laptop
friendly_name: Acer Laptop

And this is my settings

  "data": {
    "entry": {
      "entry_id": "xxxxxxxxx",
      "version": 2,
      "domain": "asusrouter",
      "title": "192.168.168.1",
      "data": {
        "name": "Asus Router",
        "host": "192.168.168.1",
        "username": "**REDACTED**",
        "password": "**REDACTED**",
        "port": 0,
        "ssl": false,
        "verify_ssl": true,
        "enable_monitor": true,
        "enable_control": false,
        "cert_path": ""
      },
      "options": {
        "interfaces": [
          "WLAN0",
          "WLAN1",
          "WLAN2"
        ],
        "cache_time": 1
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    },

Can you share your UI Lovelace code ? Thank you

Hi,

There is no such option yet to select consider home time, but it is planned. Currently, devices are supposed to get a not connected status as soon as they disappear from the connected device list. Without any time delay and any wait if that was a glitch.

I’ll look closer into this issue with device_trarckers

1 Like

Hi,

There is a couple of dashboards examples in the repository for this integration: ha-asusrouter/dashboards.md at main · Vaskivskyi/ha-asusrouter (github.com)

I didn’t really try hard with dashboards yet. So if you will create a better one, you are welcome to suggest it for the integration docs - so other users will be able to have one :slightly_smiling_face:

3 Likes

I appreciate it, I’m a newbie to Home-Asistant. Your contributions help a lot to people like me.

Thank you :slightly_smiling_face:

Also, if you have any ideas of what sensors or data can be helpful to monitor from the router in Home Assistant, you can always suggest it either here or in the GitHub repository. For now, I’ve implemented something I needed the most, but there is quite a lot more that can be done with time.

1 Like

Thank you for your work on this @Vaskivskyi!

My annoyance with the AsusWRT integration is that it would show many device_trackers with the MAC address. My guess is that it’s because the device (usually an iPhone) has a private address in the connection settings. Would using the native API instead of SSH or Telnet allow for better naming of device_trackers?

Hi,

The device_tracker entities created by this integration are using the following priority list for naming:

  • Friendly name of the device (if set in the router admin panel)
  • Name as reported by the connected device
  • MAC address if neither of the above is known

So if you have given the device a name in the web panel or if the device reported at least some name (e.g. iPads definitely report their name properly in any case, even when reporting random MACs every time), there is no chance to get an entity with MAC.

Of course, that happens as well, but not too regularly

1 Like

Thanks for the great work!

I can see the device tracker for “recognized” devices, but all my “unrecognized” devices are disabled. For example, it sees my cell phone as “unrecognized” and disabled. how to enable it so i can use it as a device tracker for a person?

It’s not this integration, but home assistant in general that disables devices that aren’t tied with any other device in your home assistant.

To enable a specific device, select it and then at the top click on enable device.

Hey,

With the new version 0.3.0, you can manually set the consider home value. Moreover, device tracking got improvements, so it should be more reliable now

The new version 0.3.0 brings some new sensors and LED control (depending on your device firmware). Also, it is now more stable and customizable. Check it out: Release 0.3.0 :bulb:LED control support and new sensors · Vaskivskyi/ha-asusrouter (github.com)

3 Likes

works great, Netgear R7000!

Awesome work!

Temperature monitoring is coming in the next release!

image

P.S. Available sensors depend on the router model and firmware

1 Like

So, welcome the new 0.4.0 version with some cool features, including:

  • Temperature sensors for CPU and radio modules (device and firmware specific)
  • AsusWRT-Merlin support and Load average sensors (Merlin-only for now)
  • Improved device trackers with new attributes

and more. Already available in HACS

Release 0.4.0 :thermometer:Temperature monitoring and Merlin firmware support · Vaskivskyi/ha-asusrouter (github.com)

3 Likes

Using a RT-AX58U with AsusWRT-Merlin software I miss some sensors. Any idea what is wrong?
image

Do you have entities enabled?

Hey,

Can you check if entities are available on the device page for your router? Most of them should be enabled manually.

If they were already enabled, but show “Unavailable” status instead of something useful, please reload the integration.

If this also does not help, check your logs for the warnings and errors from the integration.

The device page should look somehow similar to this screenshot.