[Custom component] AsusRouter integration

I recently turned off (safe shutdown and disconnect from power) the RPi running HA, and my router to move stuff around.

Once I got it al back up and running the integration stopped working. I removed it, rebooted the router, and tried adding the integration again.

Error log and device info below. Any ideas what might be the cause?

Logger: custom_components.asusrouter.config_flow
Source: custom_components/asusrouter/config_flow.py:269
integration: AsusRouter (documentation, issues)
First occurred: 22:44:40 (1 occurrences)
Last logged: 22:44:40

Unknown error of type '<class 'asusrouter.error.AsusRouterTimeoutError'>' during connection to `192.168.1.1`: ('Reached maximum allowed timeout for a single connection attempt: 425.0. The last error: ("Cannot connect to `192.168.1.1` on port `8443`. Failed in `_send_request` with error: `Cannot connect to host 192.168.1.1:8443 ssl:False [Connect call failed (\'192.168.1.1\', 8443)]`", None)', None)

Router

RT-AC68U
Merlin 386.13

HA

Core
2024.8.0
Supervisor
2024.08.0
Operating System
12.4
Frontend
20240806.1

Just to follow up, I did a firmware update to my router and still no luck.

Now running Merlin 386.14

0.33.x :rotating_light: Aura support & firmware improvements

2024-08-28

ā†’ :octopus: GitHub release ā†

0.33.0

2024-08-28

:rocket: Features

  • Added sensor with the number of clients connected to guest networks via sensor.{}_connected_guestnetwork_devices (by @GaryHuang-ASUS)
  • Added Aura RGB support:
    • light.{}_aura entity for the global colour/brightness control (as single-zone light)
    • light.{}_aura_zone_{} for the per-zone colour/brightness control (disabled by default to avoid cluttering the UI when not needed)
    • full effects support (Gradient, Static, Breathing, Evolution, Rainbow, Wave, Marquee)
  • Improved handling of client entities
  • Switched to the new firmware backend:
    • better support for different formats on FW branches (Stock, Merlin, Gnuton)
    • improved version comparison
    • added update.{}_firmware_update_beta entity for the beta firmware updates (disabled by default)
  • Changed the default update time for the update entities to 10 minutes (can be changed in the integration settings in the same way as before)
  • Updated the asusrouter_device_disconnected event to show the last known guest, guest_id and connection_type attributes

:bug: Bug fixes

  • Fixed issue with some entities being assigned to AsusRouter before their native integrations
  • Fixed issue with the update entity showing:
    • lower beta version as an update
    • version from a different branch (e.g. Stock when on Merlin)
    • _rog and non-_rog FW versions are treated as different (Merlin, Gnuton)
  • Fixed issue with integration blocked by unsafe type conversion on startup

:books: Documentation

  • Added AsusRouter logo
  • Updated supported devices

:package: Dependencies

  • Bumped asusrouter library to 1.12.0

:adhesive_bandage: Patches

0.33.1

2024-08-28

[Bugfix] Fixed blocking call when fetching Aura data on non-Aura devices
[Dependency] Bumped asusrouter library to 1.12.1


:coffee: Support AsusRouter

Monetary support:

Non-monetary support:


@neekulp, your log is saying that you try to connect on port 8443 with the SSL option set to False. Please, check this. If you are using plain HTTP, the default port is 80. For HTTPS the default port is 8443. But you can always check both in the Web UI of your device - Administration - System - Local Access Config


@myromeo, looking into it. I will let you know if any more info is needed from your side

2 Likes

I just updated to the latest version and I am taking the opportunity to ask a question. The ā€˜problemā€™ was already before the latest update. I have 7 asus routers in my home (Itā€™s a farm). All connected to HA. But one I never got to see in the list


I am missing 192.168.2.3
If I add it as a HUB, it tells me it is already connected. How do make it visible in this list?

Hey,

Does someone have a idea to show all the connected devices thatā€™s inside the:

sensor.<router_name>_connected_devices

in a card with some repeated template?

Those are not created with my GTAX11000

All my devices connected gives this error in the log:

2024-08-28 19:30:15.738 ERROR (MainThread) [homeassistant.components.device_tracker] asusrouter: Not adding entity with invalid device info: Invalid device info {'connections': {('mac', 'SECRET')}, 'default_name': 'Nest', 'identifiers': {('asusrouter', 'SECRET')}, 'via_device': ('asusrouter', 'SECRET')} for 'asusrouter' config entry: device info needs to either describe a device, link to existing device or provide extra information.

@Geedsen,

is this device by any chance of the same model as any other which are already set up? Unfortunately, AsusRouter integration has some issues with similar devices not being added to HA correctly (or not at all). The issue is a bit complicated to troubleshoot since it happens only on some occasions. But maybe you can provide some info on whether this device is separate from any other, connected in AiMesh or as a repeater?


@poudenes,

there was a card with detailed info on all devices: in comment 385

The issue with device_trackers is fixed in 0.33.2

Please, check whether you still donā€™t have Aura light entities. If so, check the log and if nothing is in there, weā€™d need to do some troubleshooting, so I would appreciate if we can move over to GitHub issues


0.33.2 :computer: Firmware and device handling improvements

2024-08-28

ā†’ :octopus: GitHub release ā†

:rocket: Features

  • Improved logging of errors when creating entities

:bug: Bug fixes

  • Fixed issue with device info when creating client devices
  • Fixed issue with beta flag handling in firmware strings

:package: Dependencies

  • Bumped asusrouter library to 1.12.2

For the full release log of 0.33.x branch, please refer to the comment above

1 Like

@Vaskivskyi
image
Actually it is the second AC66U. All, except of the first one, are only configured as AP. Would it not be possible to add it somewhere manually such that it is visible in the interface?

0.34.0 :phone: DSL support and connection improvements

2024-09-07

ā†’ :octopus: GitHub release ā†

:rocket: Features

  • Added sensors for DSL upload and download rates (by @GaryHuang-ASUS)
  • Improved connection handling in the backend library

:package: Dependencies

  • Bumped asusrouter library to 1.13.0

:coffee: Support AsusRouter

Monetary support:

Non-monetary support:


@Geedsen, please allow me some time to check on this. Unfortunately, I have a really limited amount of time currently, but I am working on the fix for the issue with devices ā€œalready configuredā€

2 Likes

Two days ago HA stopped working, and I could not get it to work . So I decided to a new install and restore a backup. After that I saw that the AsusRouter integration has 1 problem, the main router gave an error. So I removed it and try to add it again, no luck. it just stays endlessly in this situtation:
image

2024-09-09 09:15:08.300 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:15:10.778 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:15:22.508 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:15:36.717 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:15:40.780 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:15:50.925 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:16:05.133 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:16:10.783 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:16:19.342 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:16:33.549 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:16:40.785 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:16:47.757 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:17:01.965 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:17:10.787 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:17:16.172 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:17:30.380 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:17:40.789 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:17:44.588 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:17:58.797 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:18:10.791 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:18:13.004 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:18:27.213 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:18:40.794 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:18:41.420 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:18:44.072 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=31 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=31, family=2, type=2, proto=0, laddr=('0.0.0.0', 45470)>
2024-09-09 09:18:55.632 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:19:09.837 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:19:10.796 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:19:24.044 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:19:38.252 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:19:39.708 ERROR (MainThread) [custom_components.asusrouter.config_flow] Unknown error of type '<class 'asusrouter.error.AsusRouterConnectionError'>' during connection to `192.168.2.1`: ('Cannot connect to `192.168.2.1` on port `80`. Failed in `_send_request` with error: `Server disconnected`', None)
2024-09-09 09:19:40.798 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:19:45.551 ERROR (MainThread) [custom_components.asusrouter.config_flow] Unknown error of type '<class 'asusrouter.error.AsusRouterConnectionError'>' during connection to `192.168.2.1`: ('Cannot connect to `192.168.2.1` on port `80`. Failed in `_send_request` with error: `Server disconnected`', None)
2024-09-09 09:19:52.460 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:19:56.447 ERROR (MainThread) [custom_components.asusrouter.config_flow] Unknown error of type '<class 'asusrouter.error.AsusRouterTimeoutError'>' during connection to `192.168.2.1`: ('Reached maximum allowed timeout for a single connection attempt: 425.0. The last error: ("Cannot connect to `192.168.2.1` on port `8443`. Failed in `_send_request` with error: `Cannot connect to host 192.168.2.1:8443 ssl:False [Connect call failed (\'192.168.2.1\', 8443)]`", None)', None)
2024-09-09 09:20:06.668 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:20:10.801 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:20:20.887 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:20:35.116 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:20:40.804 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:20:49.325 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:21:03.537 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:21:10.806 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:21:17.741 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:21:31.949 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:21:40.808 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=93 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=93, family=2, type=2, proto=0, laddr=('0.0.0.0', 56425)>
2024-09-09 09:21:46.156 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)
2024-09-09 09:21:53.206 DEBUG (MainThread) [asusrouter.connection] Initializing connection to 192.168.2.1
2024-09-09 09:21:53.206 DEBUG (MainThread) [asusrouter.connection] Requesting authorization
2024-09-09 09:21:53.213 DEBUG (MainThread) [asusrouter.connection] Connection failed with error: ("Cannot connect to `192.168.2.1` on port `8443`. Failed in `_send_request` with error: `Cannot connect to host 192.168.2.1:8443 ssl:False [Connect call failed ('192.168.2.1', 8443)]`", None)
2024-09-09 09:21:53.220 DEBUG (MainThread) [asusrouter.connection] Will try again in 120.0 seconds
2024-09-09 09:22:00.365 ERROR (MainThread) [custom_components.tuya_local.device] Failed to fetch device status for Asus router switch (local)`Preformatted text`

The router is pingable from the pi, and the normal webinterface works just fine.

I just got the same problem; I had removed the AsusRouter integration and re-added it (hoping to try to solve a problem with my AiMesh nodes), and now I canā€™t get it back. Iā€™m tracking it in [Bug] Can't setup integration after a reboot Ā· Issue #847 Ā· Vaskivskyi/ha-asusrouter Ā· GitHub, but it might be that the original bug report was about a different problem and I incorrectly hijacked it.