[Custom component] AsusRouter integration

@dl3,

If you are using the new Asus feature for IoT VLAN, everything is as it should be. This VLAN is supposed to be well-isolated from the router and main network.

Unfortunately, I don’t have access to a device with 6.102 firmware, so I cannot tell more, but my first idea to try would be to move HA out of this VLAN. This should be relatively easy for a single device. But, of course, it depends on how complicated your network is.

1 Like

Thank you for this awesome piece of kit, just jumped on the homeassistant bandwagon, a question, is there any option using this or any other method to keep record of which device accesses which IP automatically? I see the info I am looking for in the ‘active connections’ tab on the Asus under system log, but would like to grasp a snapshot every so often. My intention is then to keep a filtered list of users in question and then send any new items to a person to assess, they will then block that IP or allow. The last step is for me but need to get the list somewhere first

Hi, using this intergration for some time now, but I notice that some of my devices are constantly switching between “connected” and “disconnected” in their device tracking.
I notice the same thing in the connected devices sensor, where the number constantly changes, while the devices are actually connected.
When looking in the GUI of the router, all devices are connected, but the integration tells otherwise.
When I’m pinging the ip of a device that is supposed to be no longer connected, the device is still there.
It happens for both wireless and wired devices, what’s make me think there is something wrong with the integration, because the wired ones (camera’s) should not really loose their connection (if they would, my camera system should also complain, which isn’t the case).
However, I noticed one thing: It only happens for devices connected via a managed switch or another accesspoint.
Devices directly connected to the asus router don’t seem to have this problem.
Could it be that there is some kind of issue for checking the connection of devices, connected to the router via an intermediate AP or switch?

1 Like

Im experience the same, but haven’t analyzed it, so i havent found a ( pattern ), but it’s also for both Wired and Wifi connected ( I have no AP, only Router )

Edit: now that i think about it , a few weeks ago i was thinking about disable the integration, trying to exclude this, but never tried.
But my gut-feeling was / is , i.e laptops going to sleep , devices such as sensors going to sleep / deep sleep … devices going to deep-sleep even Vanish from the Router, very fast. which got me thinking about a resent ( feature ) which was introduced ( removing unavailable entities/device-trackers )

I’m even having it for camera’s, which are poe powered and 24/7 online…
So I don’t think it has something to do with going to sleep.
Within the GUI of the router itself, I don’t see the devices going offline or disconnecting.

OK, well i noticed for these new bunch of sensors i bought , they went into deep-sleep after about 15 seconds (door/window sensors) , showed as unavailable in HA, but that’s the Device behavior apparently ) , and about 30seconds later the device-tracker turned away , about 1 min later they vanished from the Router
However the laptops seems to stick around , in Router

Cameras i have 4 Tapo and 3 DLink , all direct-powered in wall (no smartplugs) , but no issues what i know (don’t look at them regularly :slightly_smiling_face: )

However ( now that i think about it ) in HA the Asus-Connected-Devices most of the time shows 2-5 devices less than i have , changing often ! , My HA-instance and Aqara-Hub is most frequent gone , in Asus-Connected-Devices ( shows up now and then ) , and some plugs i think , pops up and down
While writing this the device-trackers was 22, 23, 24, 25, 23 ( Router currently has 27, i hardly never see that amount in HA ) … i Have asus-sensor-connected-devices in 3 place, they all shows different !!!
1 in custom: auto-entities
1 in custom: mushroom-chip-template

  1. in custom: template-entity-row

currently showing 23, 24, 21 ( in same order as above )

I better stop writing, now auto-entities show 26 :laughing:

Edit: now it’s 24 in auto-entities , and 22 in template-entity-row

Pretty Pretty anoying

PS: And i have unplugged all the new sensors a week ago, returning them

Yeah, same issue with the connected devices… That was the reason why I started to have a look at it why it wasn’t really matching the real number of connected devices.

Apologies in advance; I am new to HA but have an Asus Router integrated with HA. I have a house cleaner come each week that connects to my WiFi. I want to know what time they connect to the WiFi and what time they disconnect (when they leave the house). I don’t have a smart lock as yet, so I’d like to set up a sensor for a newly connected device to my router. Can anyone suggest the code I need to insert? I want to get a notification to my phone when they connect and another when they disconnect.

Thanks again. I do have a fairly complex network. Since the last questions here, I have moved HA out of that VLAN. This has enabled me to try the AsusWRT integration. However, when I attempt to configure the AsusRouter integration, I am consistently returning the following log error.

Unknown error of type ‘<class ‘ValueError’>’ during connection to 192.168.1.1: invalid literal for int() with base 10: ‘info’

Apologies if i missed someone else with the same issue, but with the parental control (RT-AX86U Pro) and the “block internet” switch that comes with it, i run into a problem.

On some devices (most that are always blocked) i receive a normal switch entity, and sometimes the control from HA works:
image

With others i get the switch u see below, and it does never work:
image

Anyone got a clue on how this is possible?

Thanks in advance

Not by just looking at pictures, it requires atleast your card-code , and in some cases log-files entries when “clicking/tab-ing” the card

Sorry for the confusion, it is not even in a card yet. Its in the device entity created by the AsusRouter integration. Hope this clarifies it a little:

im not less confused, which HA version are you running ?

Where does that picture comes from ? … Babyfoon-Motor ?

  1. it’s not the ASUS Router integration Page you are showing ( But something"verbonded via" )
    Maybe a Camera or other Device, which belongs to another integration

So maybe the other picture you were showing, which looked different, is from another integration/card also, because that also didn’t look like anything! from the AsusRouter integration page

  1. seems like what you are seeing is " Block Internet " entities in various other integrations ( for Devices which you can Block from internet, or not )

This is not much to go upon, you have to go through 1 by 1 if you have issues, saying i have problem, here and there sometimes, sometimes not …

I would say the second “Block Internet” with the open lock is not a (default) Switch icon, seems rather for a sensor, which there is no on/off function on, maybe running/not running, or power/no power

For some reason this AsusRouter Integration, have an idea of “attaching” Devices to it self ( Which i dont Like , if i haven’t specifically “marked” this ! ) i have 5 Cams which fluctuates in and out of the AsusRouter UI ( Sometimes it’s 2 sometimes 4 )
Below 3 out of 5 Tapo-Cams with Asus ICON
Very annoying and in the beginning confusing, what on earth do they do in my ASUS Integration !???
11.02.2024_18.18.43_REC

Here is a picture of 1 of the Cam TAPO CAM ! ( sorry for yelling :smile: ) , it pisses me of
I Don’t wanna see the ASUS LOGO, in my Tapo-CAM

So yes im still a little confused, but your entity ( Block Internet ) is in your BabyFoon-Motor integration ( in the last pic)( As the Header also says )

@sparke,

The connected_devices sensor has a list of all the devices as an attribute device, including the IP addresses of the active clients.

In principle, it would be easier to watch (and don’t forget to enable it first in the integration configs) the HA event asusrouter_device_connected (new connections) and asusrouter_device_disconnected (device connects again after being disconnected). This events hold some basic info about the client, including MAC, name and assigned IP

image


@h3llrais3r,

Can you please add a comment to this issue ([Bug] My device (client) gets dis-/reconnected regularly or not tracked well · Issue #792 · Vaskivskyi/ha-asusrouter (github.com)) and give more info on your router (including model and FW) as well as the switch / AP info you are using and with which you are experiencing tracking issues. Please, also specify the make and models of the devices which are disconnecting and reconnecting.


@boheme61,

The troubleshooting of the connected clients issue is switching to the per-client basis. Please, use the issue by the link above to add the details about connected devices that bother you in the integration


@rorynolan

You can easily use the asusrouter_device_reconnected as a trigger and check whether it’s triggered by a device with a specific MAC address. But that would require the cleaner to use a static MAC address when connecting to your WiFi (so, not the anonymous IP as defaults in the modern Android / iOS phones).

In this case, it might be easier to just watch the device_tracker for this exact MAC, which would be even easier. Just set an automation triggered by device_tracker getting state home.


@dl3,

Can you please open an issue in the GitHub of the integration (if you haven’t yet). Unfortunately, I have a rather limited amount of time lately and don’t regularly check the forum.

P.S. If you already opened an issue and I haven’t replied to it yet, this will be done as soon as possible.


@jhummel,

Integration works with 2 out of 3 types of parental control rules - block and allow. The time rules are not supported (yet). Please, make sure that the rules not showing properly in the integration are not in the time state (when you select the schedule for the internet access)


@boheme61,

AsusRouter is creating device entries in the registry only in a way as described in the HA documentation for the Link device type - which means it only says how the device is connected to your network. Home Assistant takes this into account to provide the connected via and other link functionalities. The integration shown as the main in the UI is the one defined as Primary in the docs. If the HA web UI is showing AsusRouter as a primary integration - this only means either there is an issue with HA itself, or the other integration (which has to be primary is not implementing it up to the docs).

Link to the docs: Device Registry | Home Assistant Developer Docs (home-assistant.io)

Moreover, AsusRouter does not create devices without user explicitly marking it (block switches for the internet access or on the MANUAL enabling of the disabled trackers) in the configs or HA doing it as it is designed to do.

image
image

Device trackers come to the second group. They are bound to existing devices because HA is doing this. All the trackers that do not have the same MACs as known by HA are not even enabled by default.

If you would like to suggest changes to the HA architecture, feel free to create a new discussion in the corresponding repo. But this has nothing to do with the AsusRouter. You can check that out using the in-built AsusWRT integration or any other integration for any other router - they will all work in the same way

Just for your information, i HAVE NEVER “ticked” any of these 2, and the Cams was installed long before i used this integration , and While i was from the very beginning was using ASUSWRT integration, without this “behavior” as well, randomly change Icons
I Have tried to uninstall AsusRouter, and in stall it again (DEFAULT Settings), and as i mentioned before ( Without ticking these fairly reason added options ! ), so it has absolute nothing to do with that pic you shows , or my answer to the previous poster above my latest commend )

As i have reported long time ago, here, this is the 3rd or 4th time you reply with about the same answer, it doesn’t change fact, i install this integration and my Tapo cams turns up as Device, ( In the AsusRouter integration, with randomly applied Asus icons
And there seems to be no way i can “remove” these, I HAVE NOT TICKED, created a device, and i really can’t see any reasons why these cams should turn up as Devices in my Router Integration
So maybe you are right, i don’t understand , WHY are they showing up as Devices in My Router-integration, AS The Only Device, out off my 30+ IP Devices ( And they have always done this , long before you added the new options( creating device when enable device_tracker ) ( And i can not remove them, i dont even know the purpose of showing them
This is MY Asus-Integration (5 Device "1 is the Router it self, the other 4 , my Tapo-cams, randomly showed with an ASUS Icon vs Tapo-icon)

Next we have my Tapo-integration (4 Device “the Cams” )

As it’s only this which bothers me, then tell me how i can avoid these cams showing as Devices in AsusRouter ( So they sticks to there rightful Icons, and Not Showing ASUS-Icons on Devices/entities, or in Settings-page and UI

Details provided in github issue.

1 Like

:framed_picture: The new release is fixing a couple of things bothering some users

Auto-discovery is removed

Unfortunately, this feature didn’t work for some users and got devices re-discovered on HA restart even though the device was already configured. None of the provided by the users info helped to reproduce the issue and fix it. Since it seems device-related (and not model-related), the decision was made to avoid any constant issues for some users.

Setting up the integration without discovery takes 1 more step of providing the IP address / domain of your router once, which should not be a large issue for most HA users.

Forcing clients

The feature to force clients to update has been rebuilt. Instead of being called with querying clients, it’s now a separate button which you can trigger from your automation at whatever rate you would like.

Note: the button click will send a request to the router to update its client list. This process can take several seconds (and up to tens of seconds in case you have 200 devices connected).

Customize it now in whichever way you need it.

Rebuild your AiMesh from HA and reconnect wired clients

Now you can force the AiMesh refresh directly from your Home Assistant. The process can take several seconds and will force all the wireless clients to reconnect.

Moreover, one more button will help you reconnect all the wired clients.


0.29.0 :computer: Clients stability and better control

2024-02-15

:octopus: GitHub release ←

:rocket: Features

  • Moved force_clients_update to a separate button instead of regular call
  • Added restart_wired button
  • Added release notes to the update entity
  • Removed SSDP discovery since it was causing issues for some user with re-discovery of the device (reports #581, #741)
  • Added rebuild_aimesh button

:bug: Bug fixes

  • Fixed issue with AsusRouter interfering with Web UI on too regular client forcing (report #760)
  • Added capabilities check for the device_tracker entities before querying them (report #785)

:package: Dependencies

  • Bumped asusrouter library to 1.7.0

:hammer_and_wrench: Experiencing issues with some clients monitoring in HA

Please, report it in this new general issue:

Including info on your router, your client with issues and connection method. Refer to the original issue description to make sure you are providing info which would help fix the issue for you.


:coffee: Support AsusRouter

Monetary support:

Non-monetary support:

1 Like

Thanks @Vaskivskyi , after deleting the time rules, the switches showed up as they should. Thanks!

But still, the block internet switches rarely work for me. Are there any router settings i need to reconsider for this to work?

Is it possible to see the names or count of users connected to one of the vpn servers?

Hey, so I’m not sure if something broke or it was intentional, but after a recent update the Guest Network connected devices disappeared; my guests are on a different subnet on the primary router, but were reporting until recently.

I figured I would ping you here, rather than open an issue tracker on GitHub. It seems to have occurred after one of the recent major updates but I’ve been busy so I can’t nail down when it occurred.

I’m running YazFi, so if anyone has any ideas, please jump in. It’s not a necessity for me and if something similar is happening for others I can open up an issue report.

Thanks for the amazing integration, it’s crazy it hasn’t been accepted into the main HA library yet. It’s really lightyears ahead of the AsusWRT integration in terms of stability as well as features…