[Custom component] AsusRouter integration

:warning: Beta release ahead!

This release is not a final version, but rather a beta. It can have issues not listed below as well as some unexpected behaviour.

Please, read all the breaking changes before upgrading!


2023-10-30

  • Both releases are marked as pre-release in the repository. Now it will be showing only to those who have selected the Show beta versions option in HACS

0.23.0b1 :hammer: New backend

2023-10-29 / beta

:octopus: GitHub change log ←

:bug: Bug fixes

  • Fixed temperature sensors
  • Fixed sysinfo sensors (report #641)

:books: Documentation

  • Added TUF-AX3000 V2 to the supported

0.23.0b0 :hammer: New backend

2023-10-29 / beta

:octopus: GitHub change log ←

:bomb: Known issues

  • Issue with temperature sensors (WLAN sensors not available)
  • Issue with load_avg sensors
  • Does not load on stock FW due to a bug with load_avg sensors

:lock: Requirements

  • Minimum HA version set to 2023.10.0

:rocket: Features

  • Rebuilt backend
  • Improved device tracking
  • Added support for more error codes reported by the device (another, captcha, reset required)
  • Improved firmware processing for different generations
  • Added support for HA EntityCategory
  • Added support for HA unit conversion (traffic and speed sensors)

:bug: Bug fixes

  • Fixed issue with wrong FW update status (report #605)

:boom: Breaking

  • Temp: Removed HA services
  • For pairs of binary_sensor/switch entities, removed binary_sensor
  • Removed option device_control in the configuration flow
  • With HA unit conversion supports, the native value for speed and traffic sensors changed, which creates a breaking change for HA history
  • Removed bytes / bits attributes of traffic / speed sensors

:open_book: Translations

:books: Documentation

  • Updated device list
  • Changed release log layout on the documentation webpage

:package: Dependencies

  • Bumped asusrouter library to 1.0.0b0

:coffee: Support AsusRouter

Monetary support:

Non-monetary support:

2 Likes

Hello,

The idea behind the beta releases is to make sure there are fewer bugs when a final stable version is released.

From now on there will be a beta release published first for those who want to check the latest features or fixes immediately. A stable release will be published ~3 days after the first beta & in case there are no new bugs reported before that.

To access beta releases in your HACS, you need to set the Show beta versions flag for AsusRouter repository

image

P.S. :warning: For some time those beta releases were not marked properly in the repository and were available to everyone. Sorry for that. Now everything should be as expected

3 Likes

0.23.0b2 / 0.23.0b3 :hammer: New backend

2023-10-30 / beta

:octopus: GitHub change log b2 ← :octopus: GitHub change log b3 ←

:bug: Bug fixes

  • Fixed blocking issue when JSON cannot be parsed
  • Added handling of Unicode errors in JSON

:rocket: Features

  • Added logging on JSON parsing errors

:package: Dependencies

Great stuff. Thanks for the integration.

I am looking for parental controls switch on my dashboard. I have 2 kids profiles on my asus app. But don’t see any entities/sensors in HA. Is it possible to have something like that Or not? Maybe I missed some configuration? Device control is enabled in operation mode.

Do I need to enable something on Router side?


image

I’ve recently been getting error messages beginning with the following, both with the previous stable version and today’s beta. Am I missing something please?

This error originated from a custom integration.

Logger: custom_components.asusrouter.router
Source: helpers/update_coordinator.py:290
Integration: AsusRouter (documentation, issues)
First occurred: 2:54:47 PM (1 occurrences)
Last logged: 2:54:47 PM

Unexpected error fetching port_forwarding data: 'rules'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/asusrouter/bridge.py", line 322, in _get_data_port_forwarding
    return await self._get_data(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/asusrouter/bridge.py", line 263, in _get_data
    return process(raw)
           ^^^^^^^^^^^^
  File "/config/custom_components/asusrouter/bridge.py", line 392, in _process_data_port_forwarding
    for rule in raw["rules"]:
                ~~~^^^^^^^^^
KeyError: 'rules'

Looks like I haven’t got access to the service any more: asusrouter.device_internet_access
I can’t see anywhere any more to switch on ‘enable device control’.

0.23.0b3 with Asus GTAX-11000:

USB Download
USB Download speed
USB Upload
USB Upload speed

are Unavailable

No error lines in the log

Hello,

@ace310, the parental control features are temporarily limited to only an On/Off switch. The proper parental control functionality with some more user-friendly features will be released as soon as possible. It might be unavailable in your case due to a bug which is already fixed and will be released soon.

@spry-salt, the exception you get is fixed in PR #653 and will be available in the next release (today or tomorrow).
The services are temporarily removed from the integration with all the beta releases. They’ll be back in even better and more user-friendly shape as soon as possible.

@poudenes, already working on it. The sensors will be back soon.


Update 1: USB WAN functionality is fixed and will be available in the next beta release (via AsusRouter library #320)

2 Likes

:open_book: A story of AsusRouter services

As you have noticed, in the latest beta releases 0.23.0bX all the sensors earlier available in AsusRouter were removed. This is not a final decision to remove some functionality, but rather to adapt it to the new ways Home Assistant can work with integrations as well as to the new backend library AsusRouter.

Before, AsusRouter had the following services:

  • adjust_wlan to change settings of WLAN and Guest WLAN networks
  • device_internet_access for parental control rules
  • remove_trackers to remove useless device trackers from HA
  • port_forwarding for port forwarding rules

The plan is to revive them in either a similar or a bit different form. E.g. by the possibility of creating actual switches for parental control rules, that can be easily automated by users in HA automations or easily added to the frontend cards.


Unfortunately, all of the services missing will stay a breaking change when a stable 0.23.0 version is released. All the functionality will be recovered / adjusted in future releases.

1 Like

0.23.0b4 :hammer:

2023-10-31 / beta

:octopus: GitHub change log ←

:rocket: Features

  • Implemented 0 values for the network speed sensors on integration load. This will prevent unknown values on startup or reboot, when the actual speed cannot yet be calculated
  • Add Unicode error handling

:bug: Bug fixes

  • Removed orphaned attributes from device trackers when clients are disconnected
  • Fixed latest_connected sensor
  • Fixed bug when no parental control or port forwarding rules are set (report #651)
  • Fixed missing USB WAN sensors when interface is not connected

:package: Dependencies

  • Bumped asusrouter library to 1.0.0b3

:loudspeaker: Stable release 0.23.0 is expected tomorrow 2023-11-01

Together with updated documentation on the official docs webpage


:coffee: Support AsusRouter

Monetary support:

  • You can make a donation using the Buy Me a Coffee service
  • Thinking of buying a new Asus router to use with AsusRouter integration? Check the compatibility list in our Docs. If you will use any of the Amazon Associate links, I might get a small (1-3%) bonus from Amazon (usage of the associate links does not change the price of the items for you)

Non-monetary support:

  • Star AsusRouter repository
  • Know a person with an Asus device using Home Assistant but not AsusRouter? Let them know, AsusRouter is cool and has lots of useful features
1 Like

Here everything is loaded correct now. Usb part and last connected. (GT AX-11000)

1 Like

0.23.0 :hammer: New backend

2023-11-01

:octopus: GitHub release ←

This release brings a fully-rebuild core of the library, making it faster and simpler.

:lock: Requirements

  • Minimum HA version set to 2023.10.0

:boom: Breaking

  • Python 3.11+ is now required
  • Temp: Removed HA services
  • For pairs of binary_sensor/switch entities, removed binary_sensor
  • Removed option device_control in the configuration flow
  • With HA unit conversion supports, the native value for speed and traffic sensors changed, which creates a breaking change for HA history
  • Removed bytes / bits attributes of traffic / speed sensors

:rocket: Features

  • Added support for HA EntityCategory
  • Added support for HA unit conversion (traffic and speed sensors)
  • Added error codes 9, 10 and 11 reported by device (another, captcha, reset required)
  • Added proper timeout when login blocked
  • Added USB WAN data recovery when interface is off
  • Added debug logging for SSDP discovery and fired events
  • Implemented 0 values for the network speed sensors on integration load. This will prevent unknown values on startup or reboot, when the actual speed cannot yet be calculated
  • Improved FW processing for different generations
  • Improved clients monitoring
  • Improved latest_connected sensor
  • Removed orphaned attributes for disconnected clients

:bug: Bug fixes

  • Fixed issue with wrong FW update status (report #605, #620)
  • Improved JSON parsing
  • Added UnicodeDecodeError ignore on reading content (report #564, #611)

:open_book: Translations

:package: Dependencies

  • Bumped asusrouter library to 1.0.0
  • Bumped homeassistant to 2023.10.0

:books: Documentation

  • Confirmed support for device / firmware:
    • DSL-AC68U / 386.50117
    • RT-AC66U B1 / 386.51255
    • RT-AC86U / 386.49709
    • RT-AC88U / 386.48260, 386.5_0
    • RT-AX58U / 388.22237
    • RT-AX86U Pro / 388.23565
    • RT-AX88U / 388.24198, 388.2_0, 388.4_0
    • RT-AXE7800 / 388_22068
    • TUF-AX5400 / 388.22525
    • TUF-AX6000 / 388.32432
    • TUF-AX3000 V2 / 388.23785
    • ZenWiFi AX (XT8) / 388.23285
    • ZenWiFi XT9 / 388_23285

:coffee: Support AsusRouter

Monetary support:

Non-monetary support:

1 Like

How Come this “dropped out” of supported Versions ?

RT-AX68U Firmware Version:[3.0.0.4.388_21732]

Hello, it’s not dropped. The release log only lists devices / FW versions added since the last stable release. The full list of compatible devices is available in the repository or in the docs

1 Like

0.23.1 :bug: Bugfix / FW 380

2023-11-02

:octopus: GitHub release ←

:bug: Bug fixes

  • Fixed issue with an empty latest_connected list (report #659, #662)
  • Fixed issue with device identity on 380 FW (report 661)

:package: Dependencies

  • Bumped asusrouter library to 1.0.1
1 Like

:thinking: :wink: :clock1030:

image

Hello, the services were not compatible with the new backend library, which caused their removal in the current shape.

There will be a new way to control internet access for separate devices with special switches. Expected in a week or so. Sorry for the inconvenience

1 Like

0.23.2 :rocket: Better features for older devices

2023-11-03

:octopus: GitHub release ←

:bug: Bug fixes

  • Fixed issue with temperature processing for older devices (report #661, #665)
  • Fixed issue with the clients processing for legacy format (report #661)

:package: Dependencies

  • Bumped asusrouter library to 1.0.2

Hi, i’ve mentioned this “issue” before, but it doesn’t seems that anyone cares

But after last updates this Integration seems to " take a little more control" over Devices, where it shouldn’t !

I Am talking about i.e Tapo Cameras ( which are added in My Tapo-Camera-Control Integration ! )

Asus Integration Not only listing these as “Devices” in the Asus-Integration ( i wonder why it’s only the cameras, and Not i.e other Wifi-Devices susch as i.e Tapo Plugs etc
Asus3

( Notice 6 devices( Pic from Asus Integration, 1 is my Asus Router, 5 Is my Tapo Cams)
When i click this “expander”, i come to the “/ Settings/Device list” ! (obviously) , it looks like below
… Notice Sorted by “Asus Router”

Now if i do this in the Tapo-Integration, click Devices, i get this(Obviously as it from the “Device-list-Page” )
… Notice ( Sorted by Tapo Camera Control ) And the ASUS Icons

Another pic from the Devices list ( Sorted by Integration )
(Notice the Asus Icons @ My TP-Link Devices) Another pic, from Devices-list, Sorted by Devicec

Now the worse thing about this “mess-up” IS
When i click these Cameras( In Either ASUS or TAPO Integration ), i ends up at the “Device Page”


NOTICE the ASUS ) So THIS IS NOT AN ASUS Device !

AND if i then click “Download Diagnostics”, I get Diagnostic from ASUS-Integration ( where the ONLY info in regards to this Device is " A Device Tracker " ! )

Could you Please fix this, i can’t see any reasons why these turns up in ASUS, as devices belonging to ASUS, It’s only Devices-Trackers , AND non of all other Device Trackers, is Listed/Added AS Devices to the ASUS-Integration

PS: I don’t want my cams ( Or Any other Devices ) belonging to 2 Integrations , i think you can understand what this could implies, in certain scenarios ( Even thou it actually “looks like” ALL My cams(Devices) Belongs to ASUS-Integration

Sorry i can’t recall your explanation previously to this “phenomenon” but now i feel it’s Not only annoying, it a Bug, Somewhere, and it’s caused by this integration, AS i have never installed my cams through ASUS integration ( It’s still just a “silly” Tracker Entity, which causes this mess )

PS: After latest update, i can’t even “download diagnostic” , my FF just opens a new Tab ??? , and EDGE says “could’t download”

Small question. There is no “Tor Support” switch to turn this on and off