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 tracker states not updating #269

Closed
jazzyisj opened this issue Oct 21, 2022 · 13 comments
Closed

[Bug] Device tracker states not updating #269

jazzyisj opened this issue Oct 21, 2022 · 13 comments
Assignees
Labels
bug Something isn't working clients [Feature] Clients

Comments

@jazzyisj
Copy link

The problem

Device tracker states don't seem to be updating. These are the device trackers for the phones in the home. Both of these phones have left the house several times the last couple of days but they never update to not_home.

Rebooting the router causes the device trackers to update to the correct state, but they do not update again after this. Other sensors (cpu temp, memory etc) are all updating normally.

image

Your device model

RT-AX58U

Firmware type

Stock

Firmware version

3.0.0.4.386-49674

Integration version with the issue

v0.9.3

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

Core 2022.10.5

Is there anything useful in the logs?

2022-10-21 10:18:18.001 DEBUG (MainThread) [asusrouter.connection] Started command 
2022-10-21 10:18:18.003 DEBUG (MainThread) [asusrouter.connection] Started command hook=cpu_usage(appobj);memory_usage(appobj);netdev(appobj);wanlink_state(appobj);
2022-10-21 10:18:18.005 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching misc data in 0.000 seconds (success: True)
2022-10-21 10:18:18.073 DEBUG (MainThread) [asusrouter.asusrouter] Page ajax_ethernet_ports.asp was loaded successfully
2022-10-21 10:18:18.073 DEBUG (MainThread) [asusrouter.connection] Started command 
2022-10-21 10:18:18.106 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching temperature data in 0.101 seconds (success: True)
2022-10-21 10:18:18.106 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching network_stat data in 0.101 seconds (success: True)
2022-10-21 10:18:18.108 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching ram data in 0.103 seconds (success: True)
2022-10-21 10:18:18.108 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching wan data in 0.103 seconds (success: True)
2022-10-21 10:18:18.109 DEBUG (MainThread) [asusrouter.asusrouter] Hook was sent successfully: cpu_usage(appobj);memory_usage(appobj);netdev(appobj);wanlink_state(appobj);
2022-10-21 10:18:18.110 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching cpu data in 0.107 seconds (success: True)
2022-10-21 10:18:18.195 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching ports data in 0.189 seconds (success: True)
2022-10-21 10:18:18.207 DEBUG (MainThread) [asusrouter.asusrouter] Page ajax_coretmp.asp was loaded successfully
2022-10-21 10:18:18.208 DEBUG (MainThread) [asusrouter.connection] Started command 
2022-10-21 10:18:18.266 DEBUG (MainThread) [asusrouter.asusrouter] Page ajax_status.xml was loaded successfully
2022-10-21 10:18:18.268 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching vpn data in 0.266 seconds (success: True)
2022-10-21 10:18:18.620 DEBUG (MainThread) [custom_components.asusrouter.router] Device tracking is enabled
2022-10-21 10:18:18.621 DEBUG (MainThread) [custom_components.asusrouter.router] Updating AsusRouter device list for '192.168.1.1'
2022-10-21 10:18:18.621 DEBUG (MainThread) [asusrouter.connection] Started command hook=get_clientlist()
2022-10-21 10:18:18.732 DEBUG (MainThread) [asusrouter.asusrouter] Hook was sent successfully: get_clientlist()
2022-10-21 10:18:19.001 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching light data in 0.000 seconds (success: True)
2022-10-21 10:18:19.002 DEBUG (MainThread) [asusrouter.connection] Started command hook=nvram_get(wl0_auth_mode_x);nvram_get(wl0_bw);nvram_get(wl0_channel);nvram_get(wl0_chanspec);nvram_get(wl0_closed);nvram_get(wl0_country_code);nvram_get(wl0_crypto);nvram_get(wl0_gmode_check);nvram_get(wl0_maclist_x);nvram_get(wl0_macmode);nvram_get(wl0_mbo_enable);nvram_get(wl0_mfp);nvram_get(wl0_nmode_x);nvram_get(wl0_optimizexbox_ckb);nvram_get(wl0_radio);nvram_get(wl0_radius_ipaddr);nvram_get(wl0_radius_key);nvram_get(wl0_radius_port);nvram_get(wl0_ssid);nvram_get(wl0_wpa_gtk_rekey);nvram_get(wl0_wpa_psk);nvram_get(wl1_auth_mode_x);nvram_get(wl1_bw);nvram_get(wl1_channel);nvram_get(wl1_chanspec);nvram_get(wl1_closed);nvram_get(wl1_country_code);nvram_get(wl1_crypto);nvram_get(wl1_gmode_check);nvram_get(wl1_maclist_x);nvram_get(wl1_macmode);nvram_get(wl1_mbo_enable);nvram_get(wl1_mfp);nvram_get(wl1_nmode_x);nvram_get(wl1_optimizexbox_ckb);nvram_get(wl1_radio);nvram_get(wl1_radius_ipaddr);nvram_get(wl1_radius_key);nvram_get(wl1_radius_port);nvram_get(wl1_ssid);nvram_get(wl1_wpa_gtk_rekey);nvram_get(wl1_wpa_psk);
2022-10-21 10:18:19.079 DEBUG (MainThread) [asusrouter.asusrouter] Hook was sent successfully: nvram_get(wl0_auth_mode_x);nvram_get(wl0_bw);nvram_get(wl0_channel);nvram_get(wl0_chanspec);nvram_get(wl0_closed);nvram_get(wl0_country_code);nvram_get(wl0_crypto);nvram_get(wl0_gmode_check);nvram_get(wl0_maclist_x);nvram_get(wl0_macmode);nvram_get(wl0_mbo_enable);nvram_get(wl0_mfp);nvram_get(wl0_nmode_x);nvram_get(wl0_optimizexbox_ckb);nvram_get(wl0_radio);nvram_get(wl0_radius_ipaddr);nvram_get(wl0_radius_key);nvram_get(wl0_radius_port);nvram_get(wl0_ssid);nvram_get(wl0_wpa_gtk_rekey);nvram_get(wl0_wpa_psk);nvram_get(wl1_auth_mode_x);nvram_get(wl1_bw);nvram_get(wl1_channel);nvram_get(wl1_chanspec);nvram_get(wl1_closed);nvram_get(wl1_country_code);nvram_get(wl1_crypto);nvram_get(wl1_gmode_check);nvram_get(wl1_maclist_x);nvram_get(wl1_macmode);nvram_get(wl1_mbo_enable);nvram_get(wl1_mfp);nvram_get(wl1_nmode_x);nvram_get(wl1_optimizexbox_ckb);nvram_get(wl1_radio);nvram_get(wl1_radius_ipaddr);nvram_get(wl1_radius_key);nvram_get(wl1_radius_port);nvram_get(wl1_ssid);nvram_get(wl1_wpa_gtk_rekey);nvram_get(wl1_wpa_psk);
2022-10-21 10:18:19.079 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching wlan data in 0.078 seconds (success: True)
2022-10-21 10:19:18.001 DEBUG (MainThread) [asusrouter.connection] Started command hook=cpu_usage(appobj);memory_usage(appobj);netdev(appobj);wanlink_state(appobj);
2022-10-21 10:19:18.003 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching misc data in 0.000 seconds (success: True)
2022-10-21 10:19:18.004 DEBUG (MainThread) [asusrouter.connection] Started command 
2022-10-21 10:19:18.055 DEBUG (MainThread) [asusrouter.asusrouter] Hook was sent successfully: cpu_usage(appobj);memory_usage(appobj);netdev(appobj);wanlink_state(appobj);
2022-10-21 10:19:18.056 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching wan data in 0.055 seconds (success: True)
2022-10-21 10:19:18.106 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching network_stat data in 0.103 seconds (success: True)
2022-10-21 10:19:18.153 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching cpu data in 0.149 seconds (success: True)
2022-10-21 10:19:18.272 DEBUG (MainThread) [asusrouter.asusrouter] Page ajax_ethernet_ports.asp was loaded successfully
2022-10-21 10:19:18.273 DEBUG (MainThread) [asusrouter.connection] Started command 
2022-10-21 10:19:18.282 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching vpn data in 0.277 seconds (success: True)
2022-10-21 10:19:18.283 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching ram data in 0.278 seconds (success: True)
2022-10-21 10:19:18.284 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching ports data in 0.279 seconds (success: True)
2022-10-21 10:19:18.341 DEBUG (MainThread) [asusrouter.asusrouter] Page ajax_coretmp.asp was loaded successfully
2022-10-21 10:19:18.341 DEBUG (MainThread) [asusrouter.connection] Started command 
2022-10-21 10:19:18.382 DEBUG (MainThread) [asusrouter.asusrouter] Page ajax_status.xml was loaded successfully
2022-10-21 10:19:18.384 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching temperature data in 0.380 seconds (success: True)
2022-10-21 10:19:18.620 DEBUG (MainThread) [custom_components.asusrouter.router] Device tracking is enabled
2022-10-21 10:19:18.620 DEBUG (MainThread) [custom_components.asusrouter.router] Updating AsusRouter device list for '192.168.1.1'
2022-10-21 10:19:18.621 DEBUG (MainThread) [asusrouter.connection] Started command hook=get_clientlist()
2022-10-21 10:19:18.708 DEBUG (MainThread) [asusrouter.asusrouter] Hook was sent successfully: get_clientlist()
2022-10-21 10:19:19.001 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching light data in 0.000 seconds (success: True)
2022-10-21 10:19:19.002 DEBUG (MainThread) [asusrouter.connection] Started command hook=nvram_get(wl0_auth_mode_x);nvram_get(wl0_bw);nvram_get(wl0_channel);nvram_get(wl0_chanspec);nvram_get(wl0_closed);nvram_get(wl0_country_code);nvram_get(wl0_crypto);nvram_get(wl0_gmode_check);nvram_get(wl0_maclist_x);nvram_get(wl0_macmode);nvram_get(wl0_mbo_enable);nvram_get(wl0_mfp);nvram_get(wl0_nmode_x);nvram_get(wl0_optimizexbox_ckb);nvram_get(wl0_radio);nvram_get(wl0_radius_ipaddr);nvram_get(wl0_radius_key);nvram_get(wl0_radius_port);nvram_get(wl0_ssid);nvram_get(wl0_wpa_gtk_rekey);nvram_get(wl0_wpa_psk);nvram_get(wl1_auth_mode_x);nvram_get(wl1_bw);nvram_get(wl1_channel);nvram_get(wl1_chanspec);nvram_get(wl1_closed);nvram_get(wl1_country_code);nvram_get(wl1_crypto);nvram_get(wl1_gmode_check);nvram_get(wl1_maclist_x);nvram_get(wl1_macmode);nvram_get(wl1_mbo_enable);nvram_get(wl1_mfp);nvram_get(wl1_nmode_x);nvram_get(wl1_optimizexbox_ckb);nvram_get(wl1_radio);nvram_get(wl1_radius_ipaddr);nvram_get(wl1_radius_key);nvram_get(wl1_radius_port);nvram_get(wl1_ssid);nvram_get(wl1_wpa_gtk_rekey);nvram_get(wl1_wpa_psk);
2022-10-21 10:19:19.061 DEBUG (MainThread) [asusrouter.asusrouter] Hook was sent successfully: nvram_get(wl0_auth_mode_x);nvram_get(wl0_bw);nvram_get(wl0_channel);nvram_get(wl0_chanspec);nvram_get(wl0_closed);nvram_get(wl0_country_code);nvram_get(wl0_crypto);nvram_get(wl0_gmode_check);nvram_get(wl0_maclist_x);nvram_get(wl0_macmode);nvram_get(wl0_mbo_enable);nvram_get(wl0_mfp);nvram_get(wl0_nmode_x);nvram_get(wl0_optimizexbox_ckb);nvram_get(wl0_radio);nvram_get(wl0_radius_ipaddr);nvram_get(wl0_radius_key);nvram_get(wl0_radius_port);nvram_get(wl0_ssid);nvram_get(wl0_wpa_gtk_rekey);nvram_get(wl0_wpa_psk);nvram_get(wl1_auth_mode_x);nvram_get(wl1_bw);nvram_get(wl1_channel);nvram_get(wl1_chanspec);nvram_get(wl1_closed);nvram_get(wl1_country_code);nvram_get(wl1_crypto);nvram_get(wl1_gmode_check);nvram_get(wl1_maclist_x);nvram_get(wl1_macmode);nvram_get(wl1_mbo_enable);nvram_get(wl1_mfp);nvram_get(wl1_nmode_x);nvram_get(wl1_optimizexbox_ckb);nvram_get(wl1_radio);nvram_get(wl1_radius_ipaddr);nvram_get(wl1_radius_key);nvram_get(wl1_radius_port);nvram_get(wl1_ssid);nvram_get(wl1_wpa_gtk_rekey);nvram_get(wl1_wpa_psk);
2022-10-21 10:19:19.062 DEBUG (MainThread) [custom_components.asusrouter.router] Finished fetching wlan data in 0.060 seconds (success: True)

Diagnostics information

config_entry-asusrouter-d7f26af8a2f7da0d8ec212eca5a59111.json.txt

Additional information

No response

@jazzyisj jazzyisj added the bug Something isn't working label Oct 21, 2022
@Vaskivskyi
Copy link
Owner

Hello, @jazzyisj,

Thanks for your feedback! 👍 And sorry, that something is not working well for you.

Can you please check the following:

  • Does rebooting of integration also update device trackers or should all the HA be restarted for this?
  • Do they stuck only in the home state? For e.g. after reboot do all the sensors update once and get stuck or do not home sensors also update to a home state once?
  • What does the connected devices sensor say? Is the number (or list in the devices attribute correct? Does it change, go up, go down?

Thanks!

@jazzyisj
Copy link
Author

Hang tight. I've updated the firmware on my AP's and I've since gotten at least one device cycling between home / not_home properly. I'm going to watch it for a day or two and I'll update with results.

@Vaskivskyi
Copy link
Owner

Could you please check whether the issue is still happening with the new version 0.11.0? There was a force update implemented for the device list. It should help some devices which do not update the list by themself.

@jazzyisj
Copy link
Author

jazzyisj commented Oct 31, 2022

Sorry for delay, needed a moment to test again.

Yes the issue is still occuring with 0.11.0. Aagin, rebooting the ROUTER updates the entities to the correct state, but once they have a state of home again, they never return to not_home. Sometimes after rebooting the router they work for one home/not_home cycle but then get stuck on home again.

Just curious, I don't use the router WIFI, I connect everything through Unify WIFI AP's. Could the problem be there? Maybe I can try disabling the AP and setting the SSID in the router to the AP values to see if the problem persists without the AP's. I haven't tried this yet because the devices actually do show offline or disconnected in the router, but still show home in HA so I assumed that couldn't be the issue.

FWIW, everything used to work perfectly, I can't really pinpoint when it started this behaviour though.

@sfortis
Copy link

sfortis commented Nov 25, 2022

I've the same issue on AC86U with merlin 386.7_2 firmware. Im tracking my PS5 and once the device switched to home it will stay permanently, so im using a ping based tracker at the moment, which is fine.

@scetu
Copy link

scetu commented Dec 11, 2022

Having same thing as well with RT-AX58U, my Connected Devices are not updating after while, and device trackers are always Home. Version Merlin 388.1
image
1 Hour ago I've reloaded the integration.

@scetu
Copy link

scetu commented Dec 11, 2022

Ok, in my case, I had many issues with Merlin Firmware, now I am back on stock (386), and seems that it is working more reliable. Including Device Trackers...

@sfortis
Copy link

sfortis commented Dec 12, 2022

its probably a bug with merlin then... I've made ping based HA device trackers since this issue was never resolved.

@Vaskivskyi
Copy link
Owner

Unfortunately, this problem happens with some devices only on both stock and Merlin FW.

I am trying to reproduce this behaviour but did not succeed with it yet.

@scetu
Copy link

scetu commented Dec 20, 2022

I am no longer having problems with Original firmware (3.0.0.4.386_49674-ge182230), but had multiple problems with Merlin on my RT-AX58U.

@Vaskivskyi
Copy link
Owner

Please, check the new version 0.17.0 of the integration. Improvement of device trackers has been implemented

@Vaskivskyi Vaskivskyi added the clients [Feature] Clients label Jan 14, 2023
@jazzyisj
Copy link
Author

Sorry I've been MIA last couple of months. Life got in the way...
Anyway, as far as I can see, this issue does now seem to be resolved for me. Thank you for your efforts!

@Vaskivskyi
Copy link
Owner

Please, refer to issue #570, in which we are trying to collect as much data as possible to find the reason for the problem with device trackers for some of the users

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working clients [Feature] Clients
Projects
None yet
Development

No branches or pull requests

4 participants