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] Data mix between AIMesh Router and Node #690

Closed 5a5cha closed 10 months ago

5a5cha commented 1 year ago

The problem

Hi, looks like there is a bug since 0.23.x in the code regarding the data-points between Router and Node in an AIMesh configuration.

After recognising the issue i did a complete uninstall and reinstall and reconfigure with 0.23.6. After adding the Router and set all configs i activated the CPU temp sensor. It gets the following temperatures as shown in the first screenshot below. Router_Only_CPU_Temp Router_Only_CPU_Temp_Chart

After checking for a while i added the AIMesh Node and set the config to "AIMesh Node". Both are GT-AX11000 Router running latest MarlinWRT. After activating also the CPU Temp the Sensor of the Router get also the data from the Node CPU Temp. Router_Node_CPU_Temp Router_Node_CPU_Temp_Chart

Good to know: After adding the Node to the config by default the CPU Temp sensor is disabled. Before enable the sensor i did a check on the Router CPU Temp data and it looks correct. So the issue occurs after enable the CPU Temp sensor from Node.

After only deleting the Node from the config the Router Temp sensor goes back to normal temp. Router_Node_Add_Delete

Can't exactly tell the version the issue starts because I've only trigger on to high temps and not to low or equal... maybe for further falls checks ;-)

Your device model

GT-AX11000

Firmware type

Merlin

Firmware version

3004.388.4

Integration version with the issue

0.23.6

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

Core 2023.11.1

Is there anything useful in the logs?

No response

Diagnostics information

No response

Additional information

No response

5a5cha commented 1 year ago

Looks like the same behaviour as #683

Vaskivskyi commented 1 year ago

@5a5cha, Please, check version 0.23.7and let me know whether the issue persists

5a5cha commented 1 year ago

Looks good after reboot of HA, @Vaskivskyi Will do some config stuff today since i uninstalled AsusWRT and bet on your horse :-)

Set reminder for tomorrow and give some final feedback

5a5cha commented 1 year ago

@Vaskivskyi, oh boy. Looks more like an generic issue in the integration :-) After update from 0.23.6 to 0.23.7 i activated the RAM Sensor for the Node. And in the Screenshot below is the result of the Router RAM Sensor after enable RAM Sensor Node. image

RAM from Webinterface: image

Both show the same value with 0.23.7 image

Edit: Also checked the CPU Usage. Shows also the same data for Router and AP.

5a5cha commented 1 year ago

Ok, after activating the temperature sensors on router and ap the integration seems to be crashed... image

Restarting HA (real restart not fast restart) seems to bring the integration back

5a5cha commented 1 year ago

Here we go again... Also after enable the temp sensors for network the CPU Temp is getting wild again... image

DAVIZINH0 commented 1 year ago

hello. i update to version 23.7 and have this problem. The main router and the 3 mesh nodes, have the same temperature, ram and cpu. With the version of last weeks, this problem not exist.

Vaskivskyi commented 1 year ago

Hey, guys. Thanks for your replies and sorry that I cannot help faster. I am working on it and will try to fix it soon. But I don't have too much free time during the working week (and AsusRouter is just a hobby project)

DAVIZINH0 commented 1 year ago

dont worry man!!! your live is more important!!! tell us when you release a fix and i will test

5a5cha commented 1 year ago

+1 No problem man. It's done when it's done.

5a5cha commented 1 year ago

I did some tests and from my point there seems to be a big issue between 0.22.x and 0.23.x in the function of the backend. Especially if one is using more then one devices.

In 0.22. there was an option to define a name for the device. This name was also used from the integration to set the entity-ids for all the stuff like sensors and so on. In 0.23, this option is gone. Instead the backend generates the entity-ids by the device name. which is in my case two times "gt_ax11000".

An idea to solve the issue: instead of using the device name to generate the entiry-ids of HA use the host ip. this is 100% unique.

DAVIZINH0 commented 1 year ago

This is very interesting information but In my case i have: 1 ax89x as router 3 ax5400 as 3 mesh nodes

And the information of temperature, cpu and ram. its the same in the 4 routers. If the problem was the names, i will have the same in the 3 ax5400 but diferent in the ax89x. not?

5a5cha commented 1 year ago

You're right, sir.

@Vaskivskyi, with 0.24.0b3 the issue still exists

5a5cha commented 12 months ago

@Vaskivskyi, with 0.24.2 the issue still exists

Vaskivskyi commented 11 months ago

I am still working on this issue. I will let you know as soon as there is any update on this. Unfortunately, without having an actual 2-devices setup, it's rather hard for me to test this, so it might take some time

werbi64 commented 11 months ago

Hello, I have the same problem with an RT-AX92. When I integrate the Access Point and then the AiMesh node everything is fine. When I restart home assistant, the data from the Access Point and the AiMeish node becomes identical.

OS : 11.1 Supervised & core: 2023.11.3 Asus Router Integration Version: 0.25.0b0

before Capture d’écran du 2023-11-24 19-25-41

After Capture d’écran du 2023-11-24 19-28-52

Good night

Vaskivskyi commented 10 months ago

The issue with mixing data between instances is fixed in version 0.26.0. Please, check it out. In case you are still experiencing such troubles, reopen this issue or open a new one

DAVIZINH0 commented 10 months ago

problem is fixed.

Thanks for your work!