[Custom component] AsusRouter integration

I just tried your suggestion and after reloading and rebooting it does not trigger as home. It seems to be just when I’m on the wifi mesh node. The wires backhail nodes appear to be fine. My router is an Asus XT8 with a second node and my two other nodes are Asus RP-55 repeaters. I feel like I have something not quite set right somewhere in my setup?!

EDIT: To further complicate matters, I’ve noticed that the Asuswrt integration is showing the same phone as Home on its entity while the Asus router integration shows away while on the wifi node?!

I’m currently running both while trying to get this figured out.

1 Like

Oh, that’s interesting that’s only the wifi one does it while the wired doesn’t. My setup is:

RT-AX86U Primary
RT-AC88U mesh with wired backhaul
RP-AX56 mesh with wired backhaul

So I don’t have a good comparison not having a wifi only node.
Sorry, wish I could be of more help but your note of the two integrations showing different values may give the dev something to look into though.

I have a setup with 2x RT-AX58U nodes using wireless backhaul and the integration is working correctly in terms of home/away status for devices I want to track.

Overall AiMesh is a bit flaky generally (nothing to do with this integration) and different combos of routers and different firmware have strange results.

I find running merlin’s FW on the main router and latest stock FW on the nodes works best for me (after many years of trial and error).

My advice would be to try to do a clean/fresh/manual install of the FW on the main router. Do a wps reset after flashing the latest firmware - do not restore any settings. Then do a wps reset on each node and add them as a mesh node one at a time. Do not make any further advanced/config to any settings.

Now test how the tracked devices roam across nodes and see how they look in the integration.

Hope this helps. I know it’s a lot of work but in my opinion, a clean/fresh install saves a load of time troubleshooting weird issues.

Thanks Jata, but I don’t think it’s the router/aimesh in this instance, since the ASUSWRT integration appears to be working semi-normally at this point for me in regards to the tracking feature. Hopefully someone else has experienced this and can point me in the right direction. Ugh! lol

How did you fix this? It used to work but now doesn’t.

I just spent time to get my asus router / mesh network working nicely. To do this I completed a full reset and manual reconfiguration. Made minimum changes to default config. Then I added the integration to HA and slowly got things working.

Got the integration to monitor the network and nodes.

Used connected devices entity to create the connected devices view - including node.

Then I used enabled device_tracker for the few devices I actually wanted to track home/away status for (family member iphones)

Then I linked those devices to people entities and it works perfectly - all family members are currently home…

2 Likes

Thanks! Were you able to sort the table by IP like your yaml suggested? For me it won’t expand and I get “flex-table-card.js?hacstag=156292058072:22 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘toString’)”.

Yep. Got sorting working. Ended up sorting by client name but had a hidden column for IP address to hide some unwanted clients.

Will post the yaml if helpful. It was a while ago so can’t remember all of the tweaks I needed to get it working.

code for the device table. I think you need to switch the IP column to the first position if you want the order by IP address.

type: custom:fold-entity-row
padding: 0
head:
  label: Connected Devices
  type: section
  tap_action:
    action: none
entities:
  - type: custom:flex-table-card
    sort_by:
      - devices+
    strict: true
    entities:
      include: sensor.rt_ax86u_connected_devices
    columns:
      - data: devices
        name: ' Device Name'
        modify: x.name
      - data: devices
        name: ' IP'
        modify: x.ip
        hidden: true
      - data: devices
        name: ' Connection'
        modify: x.connection_type
      - data: devices
        name: ' Node'
        modify: >-
          if(x.node == "a8:5e:45:xx:xx:xx"){"Balcony"} else if(x.node ==
          "7c:10:c9:yy:yy:yy"){"Living"} else if(x.node ==
          "3c:7c:3f:zz:zz:zz"){"Bedroom"} else{x.node}

2 Likes

Brilliant. The strict: true fixed it for me. Thanks!

Cool. I think the issue is caused when there is no data in a record for the field that is being sorted.

Hi! I have two hubs and both show almost entirely the same connected devices at all times.

I was just wondering - what is “Number of latest connected devices to store” used for?

Is there a way to see devices only connected to a specific hub?

when you say ‘hub’ do you mean node (access point)?

The entity you need to use to monitor connected devices is sensor.xxx_connected_devices.

All of the connected devices are included in the attribute called Devices - see below.

Each device is an object in the devices attribute. You will also see for each device info such as IP address and node. The node is the aimesh node (AP) that the client is connected to.

Hope this helps you a bit.

1 Like

@Vaskivskyi are you still maintaining this? As I not see any activity of you lately, regarding to updates and/or bugs :thinking:

@Vaskivskyi please look at the following bug

Hello, @sesame26,

I’m really sorry that lately there is only a little maintenance in regards to AsusRouter. I’m in any case not abandoning the integration, as well as the Python library for it.

There is a bit of a problem on my side with the amount of time available. I was already hoping to get some possibilities to get back to active development, but it didn’t work out yet.

P.S. Jokingly about free time. Several weeks ago 3 of my Zigbee light bulbs stopped responding to the rest of the Zigbee network. Part of the room is still not illuminated :face_with_head_bandage:


As per the issue, it was apparently connected to the HA update itself. The log entries were referring HA import of the integration, not the integration itself. Good, that it was solved by just reinstalling the HA. Unfortunately, I didn’t manage to reproduce it, so I can only hope it won’t repeat to other users

2 Likes

Here I have no issues after updating to latest HA.

I’m joining the AsusRouter Integration party a little late. Can anyone confirm the “device_tracker stuck home” bug was ever fixed? I’m having issues every couple days. It won’t update when one of our phones (android and apple) leave the house unless I do an integration reload, and then it works fine for a couple more days?!

1 Like

I don’t know if it’s being worked on, but it’s still not fixed.
Device tracking is currently unusable.

What are your settings, in update interval, and connected devices, and which Router are you referring to, ( and are you using “mesh”) ?
… or don’t you guys find this info relevant ?
EDIT: ok Mark, i saw your “Setup” in above previous post :wink: , as im not familiar with “mesh” yet, i can only guess ( i have no porblems with single AX68U)
Ok pepe, i haven’t looked at the bug-report, but like Mark, maybe it has to do with the “registration” in “mesh-node” also, which don’t get “released” , a device should only be “registered” 1 place(1 instance) and replicated, again i don’t have experience with “mesh-nodes” and how Asus-Routers handles this

PS: im not sure i understand what you mean by “update time 15s”, which “update” are you referring to ?
23.08.2023_23.19.11_REC
23.08.2023_23.20.25_REC