Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] Device trackers are stuck #570

Closed
Vaskivskyi opened this issue Mar 5, 2023 · 163 comments
Closed

[Bug] Device trackers are stuck #570

Vaskivskyi opened this issue Mar 5, 2023 · 163 comments
Assignees
Labels
bug Something isn't working clients [Feature] Clients

Comments

@Vaskivskyi
Copy link
Owner

The problem

Some devices are experiencing problems with device trackers. The symptoms are the following:

  • Device trackers might switch to home, but never to away
  • Device trackers might be stuck in any state

If you are experiencing a similar problem, please add your device MODEL and FIRMWARE VERSION in the comments. Also, add AsusRouter version you are using

If you see any errors or warnings in the HA log from AsusRouter, please add them as well.

Please, don't post "the same error" without any details about your device. This does not help. In order to find and fix the issue, information is needed.

P.S. All other issues with the same problem will be closed. Please, report this problem here and only

Your device model

RT-AX88U

Firmware type

Merlin

Firmware version

3.0.0.4.388.1

Integration version with the issue

0.22.0

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

Core 2023.3.0

Is there anything useful in the logs?

No response

Diagnostics information

No response

Additional information

No response

@Vaskivskyi Vaskivskyi added the bug Something isn't working label Mar 5, 2023
@Vaskivskyi Vaskivskyi self-assigned this Mar 5, 2023
@Vaskivskyi Vaskivskyi added the clients [Feature] Clients label Mar 5, 2023
@Vaskivskyi
Copy link
Owner Author

So, this is the data collected from the other issues. I would kindly ask all the tagged users to check whether the issue with device trackers still persists with the latest version 0.22.0. And then we will try to solve it


From #562 (@pejannl):

  • RT-AC88U / 3.0.0.4.386_48260

From #550 (@alhemicar86):

  • TUF-AX5400 / 3.0.0.4.388_22525-gd35b8fe / 0.21.0

From #485 (@5a5cha):

  • GT-AX11000 / 3.0.0.4.388.1 / 0.17.4, 0.18.0

From #465 (@ejpenney):

  • RT-AC66U / 3.0.0.4.380.70 / 0.17.4

@pejannl
Copy link

pejannl commented Mar 5, 2023

What can I say to help you?
Running Asus rc-ac88u, Firmware Version:[3.0.0.4.386], standard firmware
Home Assistant core 2023.01.1
Asusrouter integration 0.22.0

I don’t use the wireless on the router, but use a home deco mesh system. I have ping to my iphone (in dhcp fixed ip) installed and also use the deco integration to detect presence of my iphone. I just switched my iphone to airplane mode. Within 2 minutes the ping and deco integrations report I am not home. I waited 15 minutes, but the Asusrouter integration never reports me away. I am aware there some sort of technical log in HA, but don’t know where to find it. If you need to know more then direct me where to look.

@alhemicar86
Copy link

Updated to 0.22.0, will keep an eye on extension.

@alhemicar86
Copy link

State updates still get stuck after several hours.

@alhemicar86
Copy link

alhemicar86 commented Mar 6, 2023

0.22.0 actually made it worse in a way that now trackers don't update even after integration is reloaded.

@khaffner
Copy link

khaffner commented Mar 6, 2023

Your device model
RT-AC3200

Firmware type
? Stock Asus firmware

Firmware version
3.0.0.4.382_52651-g22bb56a, is up to date

Integration version with the issue
I've used 0.21.0 and 0.22.0, same issue in both

Method of the integration installation
HACS

What version and type of Home Assistant installation do you use
Container 2023.3.1

Is there anything useful in the logs?
No, looked at the debug logs.

Diagnostics information
No response

Additional information
No response

@alhemicar86
Copy link

Somehow it decided at random to work now, and I made no changes to it. Will follow up tomorrow if it kept working after nightly router reboot.

@Vaskivskyi
Copy link
Owner Author

For now, I am trying to collect as much data as possible on the issue. The main problem is, that exactly the same device models with the same FW version work for one user, but not another.

This makes the bug quite hard to locate and troubleshoot

@alhemicar86
Copy link

If it is any help, my installation is HA OS, on https://www.gigabyte.com/Mini-PcBarebone/GB-BMPD-6005-rev-10#kf

@pejannl
Copy link

pejannl commented Mar 6, 2023

Ack. I am also running HA OS (on a Raspberry PI 4).

I was away from home 4 times today, 2 times more than 2 hours. Asusrouter did not report me ‘away’ at all.

@nickaggie
Copy link

Im seeing the same issue, trackers haven't updated for a while.

Your device model
RT-AX88U

Firmware type
Merlin

Firmware version
388.1

Integration version with the issue
0.22.0

Method of the integration installation
HACS

What version and type of Home Assistant installation do you use
Home Assistant 2023.3.1
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230302.0 - latest

@5a5cha
Copy link

5a5cha commented Mar 7, 2023

Looks like a really strange behave, so far.

While my S22 is tracked nice when turning of the wifi and change to mobile data the raspberry pi on the other hand is still online after poweroff and unplug from power cable.

The frontend (AiMesh overview) of the router shows the pi online when online and is not listed when offline.

On the other hand i have three 3D printers with mainsail OS running and all three of them are powerless but two of them are listet as online and only one is offline.

Tracking with laptop is still ongoing because of work :-)

Your device model
GT-AX11000

Firmware type
Merlin

Firmware version
388.1

Integration version with the issue
0.22.0

Method of the integration installation
HACS

What version and type of Home Assistant installation do you use
Home Assistant 2023.2.5
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0

Is there anything useful in the logs?
No response

Diagnostics information
No response

Additional information
No response

@alhemicar86
Copy link

Found this in logs today. It has also some reference to Python 3.10, preceding the error itself.

2023-03-07 09:06:41.385 ERROR (MainThread) [custom_components.asusrouter.router] Error connecting to '192.168.###.###' for device update: None

It was preceded by (I do have 2 esp32 boards unpowered and disconnected from network ar the moment, and 3 connected):

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 537, in send_message_await_response_complex
await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 536, in send_message_await_response_complex
async with async_timeout.timeout(timeout):
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 320, in _keep_alive_loop
await self._ping()
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 645, in _ping
await self.send_message_await_response(PingRequest(), PingResponse)
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 554, in send_message_await_response
res = await self.send_message_await_response_complex(
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 539, in send_message_await_response_complex
raise TimeoutAPIError(

@khaffner
Copy link

khaffner commented Mar 12, 2023

Knock on wood, but the device tracking seems to work fine for me the last 5 days

edit a week later: Jinxed it. Trackers get stuck

@ante-maric
Copy link

I didn't update the integration for a while and was using version 0.8.0. It all worked fine. Then I updated to 0.22.0 (not directly, but went through versions as described in documentation) and now it doesn't switch to away. I am tracking my two phones. I managed to figure out one thing. If I turn off my wifi on the phone, within 30s it will show away. But if I just go out of range it will never show as away.

Home Assistant 2023.3.4
Supervisor 2023.03.1
Operating System 9.5
Frontend 20230309.0 - latest

@contrasenda
Copy link

Same problem here.

RT-AX92U / Stock 3.0.0.4.388_22525
Two aimesh nodes: RT-AC68U / Stock 3.0.0.4.386_51255

Asusrouter 0.22, Home Assistant 2023.3.4

Device tracking works ok for some hours, and then stops updating. I checked the router network map and devices are not connected, but the state is not update in HA.
Reloading the integration makes it work again for some time. No errors in logs, except for unique ids one.

One strange thing I noticed that happens most of the times (but not always), is that the device is reported not home / home / not home withing minutes after leaving, and by that moment phone is quite far, it's impossible to be connected to home wifi.

image

@pepe59
Copy link
Contributor

pepe59 commented Mar 17, 2023

Same problem here, Router Asus RT-AC68U version fw
3.0.0.4.386_51255
AiMesh RT-AC66UB1

@marceloaf
Copy link

Same problem. GT-AX6000. Merlin 388.1

@run1fast
Copy link

Same issue. My status is always home, even when I leave and my phone is not connected.
Home Assistant 2023.3.5
Supervisor 2023.03.1
Operating System 9.5
Frontend 20230309.1 - latest

Asus Router: ZenWiFi_XT8.
Firmware Version:[3.0.0.4.388_22525]

@khaffner
Copy link

khaffner commented Mar 21, 2023

A reboot of the router seems to work for me. I have automatic reboot once a week, trackers work fine the first few days after. Will try to monitor this pattern.

@Vaskivskyi
Copy link
Owner Author

Version 0.26.0 might help some of you with the device tracking issue. It also fixes AiMesh nodes being reported as clients

@TeddyLafrite
Copy link

Hi @Vaskivskyi
Installing and tell you next days
Thanks and happy Christmas :)

@TeddyLafrite
Copy link

Dear @Vaskivskyi,
Tracker is broken since 0.26.0 version.
Smartphones stucks not_home

@Vaskivskyi
Copy link
Owner Author

@TeddyLafrite, do you have an AiMesh setup or a single device?

In both cases, please check whether the integration Connected devices sensor is showing the same number as the Web UI

image

@TeddyLafrite
Copy link

Only single device, no AiMesh setup

image

image

@Vaskivskyi
Copy link
Owner Author

Do you use Smart Connect? The feature to route clients automatically between 2.4 Ghz and 5 GHz. If so, you can try disabling it for some time and check

@TeddyLafrite
Copy link

Yes SmartConnect is active ; i'll disable it and will check

@TeddyLafrite
Copy link

Tested without SmartConnect : nothing change
Will check again tomorrow

@TeddyLafrite
Copy link

Confirm
Same problem without smartconnect
Devices are stuck for hours
Latest version was better

@ecto1a2003
Copy link

Hello all still seeing issue, latest and greatest for everything. Can provide more info if needed

@VincentClement1
Copy link

This error is appearing in my logs. If I Restart Wireless through the integration, device trackers are updated and correctly show their home/away status.

Logger: custom_components.asusrouter.router
Source: custom_components/asusrouter/router.py:420
Integration: AsusRouter (documentation, issues)
First occurred: 27 December 2023 at 2:20:49 pm (21 occurrences)
Last logged: 1:52:18 pm

Cannot get clients from '192.168.50.1': ('Cannot connect to 192.168.50.1. Failed in _send_request', None)
Cannot get clients from '192.168.50.1': ('No session available for this connection', None)

@ppmg77
Copy link

ppmg77 commented Dec 29, 2023

Your device model

RT-AX88U

Firmware type

Merlin

Firmware version

388.5

Integration version with the issue

0.26.0

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

Home Assistant Core v2023.12.4

Information of the logs

No related info I could find in the logs.
I did do a reboot of my router a couple of times, which I think resulted in the following messages:

2023-12-28 21:19:50.973 ERROR (MainThread) [custom_components.asusrouter.router] Cannot get clients from '192.168.XX.1': ('Cannot connect to 192.168.XX.1. Failed in _send_request', None)
2023-12-28 22:20:41.141 ERROR (MainThread) [custom_components.asusrouter.router] Cannot get clients from '192.168.XX.1': ('Cannot connect to 192.168.XX.1. Failed in _send_request', None)

Additional info

Also, in the state of the device tracker of my iPhone, I saw that the attribute "Node", does change within seconds of changing the connection state of the iPhone.
iPhone connected to WiFi: "Node: Mac-Address of Router"
iPhone disconnected from WiFi: "Node: Mac-Address of Router disappears"

I hope the above info helps a bit solving the issue. Let me know should more info be needed.

@5a5cha
Copy link

5a5cha commented Dec 30, 2023

Device tracker in 0.26.0 seems to be broken again.

Worked fine in 0.24.2.

Used the update feature within HASC to update from 0.24.2 directly to 0.26.0.
After first issues with device tracking I did a complete uninstall, reboot and fresh install of 0.26.0 with no luck.

Edit: could one of you guys also having issues with the device tracker please do me a favor and restart your router?
At the moment this solved the issue with devices stock online on my network.

Edit2: Restarting the Router seems to fix the issue only for the time of restart.
After playing arround more it looks like the device tracker in the asus firmware is broken.
With firmware 3004.388.5 all devices stuck at state in the moment of restart.
Downgrade to 3004.388.4 solves the issue and devices are shown online and offline.
Router, GT-AX11000: MerlinWRT 3004.388.4
AIMesh Node1 GT-AX11000: MerlinWRT 3004.388.4

Could someone other having issues with device tracker post firmware of router?

@Vaskivskyi
Copy link
Owner Author

Please, update to 0.27.0 which is already available through HACS

@TeddyLafrite
Copy link

Hi @Vaskivskyi
Installed this morning
Tracker seems to work properly

@Dejcman
Copy link

Dejcman commented Dec 31, 2023

Hi,
with the latest update tracker seems to work for me to.

@jata1
Copy link

jata1 commented Jan 2, 2024

@Vaskivskyi - as always thanks for the work you are doing. Latest release 0.27.1 seems a lot better but there is something weird with this integration and the actual router GUI / connected clients views.

In summary, when I have the integration installed. I see some clients in the Asus GUI that are not really connected to the network. I see others that are on the network but reporting as being on the wrong node.

So there is something strange happening and it doesn't surprise me that there ends up being strange behaviour for the connected_devices entity in HA.

I rebuilt my entire Asus network manually on merlin 388.5 and then upgraded to 388.6 alpha but I still have the same issue. the only solution for me has been to remove the integration from HA and reboot the router.

I have RT-AX86S with 2x RT-AX58U nodes all running merlin 388.6 alpha

@ppmg77
Copy link

ppmg77 commented Jan 2, 2024

@Vaskivskyi - Installed the latest update and all is working here at the moment. Haven't tested everything yet, but bugs found I'll let it know here.

@ppmg77
Copy link

ppmg77 commented Jan 3, 2024

@Vaskivskyi - as always thanks for the work you are doing. Latest release 0.27.1 seems a lot better but there is something weird with this integration and the actual router GUI / connected clients views.

In summary, when I have the integration installed. I see some clients in the Asus GUI that are not really connected to the network. I see others that are on the network but reporting as being on the wrong node.

So there is something strange happening and it doesn't surprise me that there ends up being strange behaviour for the connected_devices entity in HA.

I rebuilt my entire Asus network manually on merlin 388.5 and then upgraded to 388.6 alpha but I still have the same issue. the only solution for me has been to remove the integration from HA and reboot the router.

I have RT-AX86S with 2x RT-AX58U nodes all running merlin 388.6 alpha

Dear @jata1 ,
The "strange behavior" you're experiencing, does this affect devices connected to HA through zigbee2MQTT and MOSQUITTO?

@Vaskivskyi
After the upgrade, zigbee2MQTT is not able to connect to MOSQUITTO. I've checked again the configs of these 2 docker containers but everything seems to be in order.
See following link to Reddit where I've requested some advice/help with some info if it helps:
https://www.reddit.com/r/ZigBee/comments/18xim5p/zigbee2mqtt_not_connecting_to_mosquitto/

My router is an Asus RT-AX88u, running on Merlin 388.5.

@jata1
Copy link

jata1 commented Jan 3, 2024

@ppmg77 - I have used mqtt in the past for other integrations but not at the moment. I do have a mqtt/mosquitto container on my system but it is not running.

My issue / strange behaviour is with client trackers with the asusrouter integration. The problem is 2-way in that when I use the asusrouter integration then I see incorrect client data in the asus web gui and I get issues with tracked devices saying they are home when they are away and this is somewhat correlated with that I see in the asus gui.

At the moment, I have completely removed the asusrouter integration from HA and I am now monitoring how the asus gui behaves - so far it is working perfectly so I think the root issue is something to do with the HA asusrouter integration/api

@ppmg77
Copy link

ppmg77 commented Jan 3, 2024

@Vaskivskyi @jata1
I've solved my problem.

I'm running everything in docker containers. Yesterday afternoon zigbee2mqtt was updated from version 1.34.0 to version 1.35.0. This broke the connection between z2m and MQTT broker. I've reverted back to version 1.34.0 and all works smoothly again.

@Vaskivskyi
Copy link
Owner Author

@jata1,

In case AsusRouter is actually causing troubles with the clients updates in the GUI, try disabling the force clients update option and check again, so that we can try locating the issue. Also, please, check the router logs with and without the integration running. In case there are any errors or anything strange in the log, this might be important.

image

In any case, with any of your findings, let's move to a new issue. Interference with the device itself should not be hidden in 100 comments.


@ppmg77, good, that your issue was solved. AsusRouter cannot interfere with the network traffic of the device directly. And if so, it would not influence only one connection. MQTT is not any special and is sent via TCP/IP, so troubles in this from the router would also cause lots of other troubles for your network

@jata1
Copy link

jata1 commented Jan 4, 2024

@Vaskivskyi - Understood. I will start a new issue here on github. Maybe easier to discuss on a discord channel/thread

@TeddyLafrite
Copy link

TeddyLafrite commented Jan 8, 2024

Hi @Vaskivskyi
Device tracker with 0.28 is broken again
Works fine with 0.27

@Vaskivskyi
Copy link
Owner Author

Since the issue is not only router-related, but client-related, please refer to the issue #792 in case you are experiencing troubles after updating to 0.29.0.

Make sure you are providing all the info as mentioned in the first message of issue #792 - which includes not only router info, but also info on the connection method (including any switch and AP in-between) as well as client info. The first report there is a good example of what to provide.

Don't forget to refer to the section Total # of devices and connected clients in the issue description to make sure the issue is actually with the integration and not the "feature" of the FW for your device.

This issue will be closed.

@github-project-automation github-project-automation bot moved this from Info Needed to Done in AsusRouter/HA Feb 15, 2024
@Vaskivskyi Vaskivskyi moved this from Done to Finished in AsusRouter/HA Mar 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working clients [Feature] Clients
Projects
Status: Finished
Development

No branches or pull requests