Vaskivskyi / ha-asusrouter

Monitor and control your AsusWRT-powered router from Home Assistant
https://asusrouter.vaskivskyi.com
Apache License 2.0
188 stars 17 forks source link

[Bug] connected_devices entity showing incorrect information for node and connection type for clients on wired node #800

Open jata1 opened 9 months ago

jata1 commented 9 months ago

The problem

Recently changed a node from wireless to wired backhaul and now the connected devices entity sometimes displays totally incorrect information for wifi clients that are connected to the wired node.

wireless clients report they are wired and connected to the main router.

asus gui has correct information so this issue impacts the integration.

Your device model

RT-AX86S

Firmware type

Merlin

Firmware version

388.6

Integration version with the issue

0.29

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

2024.2.1

Is there anything useful in the logs?

No response

Diagnostics information

No response

Additional information

here is what my connected devices is showing. all of the marked clients are incorrect and are actually connected to the node.

They are all wireless devices so not possible to be wired.

image

yuejon commented 8 months ago

I have a similar issue with 0.28.0 where my nodes were showing up as using 2.4Ghz instead of my 5Ghz backhaul despite the Asus web UI confiming the 5Ghz backhaul. Reverted back to 0.22.0 as that has been the most stable version for me.

Vaskivskyi commented 8 months ago

Please, allow me some time to get access to an AiMesh node and test this

giejay commented 3 months ago

Im facing the same issue. My device tracker reporting a wired connection and more troublesome, the wrong Node (Im trying to use the integration for room tracking with almost every important room containing an AiMesh node). Using v0.32

jata1 commented 3 months ago

What I have ended up doing (for a number of reasons) is to stop using Aimesh nodes and setup each additional 'node' as an access point (AP) instead. For this you need to have all of the APs wired and not connected wireless. This is not always easy - I had to crawl around under my house with about 30cm space above (and lots of bugs - in live in Australia). Also your nodes wired will work sooo much better than mesh/wifi.

Overall, my opinion of aimesh is that it is not very clever and mainly marketing. The only real advantage is that you can see all of the connected clients in one view - but even this does not work particularly well as you have seen.

My dashboard looks like this now in HA and works perfectly all of the time. image

and with each AP expanded to show clients... image

giejay commented 3 months ago

Nice that you found a working solution! I will keeping using AiMesh, I like the "binding" feature of devices which are a bit stubborn sometimes. But I also found a workaround, I'm merely interested in room tracking and I noticed that the information was constantly flipping between 2/5ghz and wired. Thats why Im just ignoring the wired updates:

template: 
  - sensor:
    - name: gj_connected_router
      state: >
        {% if 'ghz' in state_attr('device_tracker.gj_asus_wifi', 'connection_type') %}
          {% set node = state_attr('device_tracker.gj_asus_wifi', 'node') | upper if state_attr('device_tracker.gj_asus_wifi', 'node') != null else 'Away' %}
          {% set mapping =  states('sensor.routermapping') | from_json %}
          {{ mapping[node] if node in mapping else 'Away' }}
        {% else %}
          {{ this.state }}
        {% endif %}
image

Now it's perfect again:)

Edit: Can you share the code for the table you have created? If this issue ever gets resolved, would be very nice to have, possibly including the signal strength.