ha-asusrouter: [Bug] Integration going inresponsive after some time

The problem

I have been using integration for few weeks, and noticed that it becomes unresponsive after some time (days) and Reloading integration from HA leads to errors in error log ValueError: Config entry was never loaded! I’ve spotted this mainly because device_tracker entities has not been updated. I’ve tried to increase scan interval to 30 seconds from default 10 seconds, but it happened again.

Your device model

RT-AX58U

Firmware type

Merlin

Firmware version

386.7_2

Integration version with the issue

0.8.2

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

2022.10.3

Is there anything useful in the logs?

Logger: homeassistant.config_entries
Source: helpers/entity_component.py:175
First occurred: 4:28:58 PM (15 occurrences)
Last logged: 5:05:31 PM

Error unloading entry 192.168.1.1 for binary_sensor
Error unloading entry 192.168.1.1 for device_tracker
Error unloading entry 192.168.1.1 for light
Error unloading entry 192.168.1.1 for sensor
Error unloading entry 192.168.1.1 for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 498, in async_unload
    result = await component.async_unload_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 175, in async_unload_entry
    return await component.async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 175, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

Diagnostics information

config_entry-asusrouter-ce972f8c6868c630754e4532848895c1.json.txt

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

Hi! I’m not gonna add any additional detail but I have the exact same issue and logs. Just to let you know it’s not an isolated problem. Thank you for your hard work!

Home Assistant 2022.10.4 Supervisor 2022.10.0 Operating System 9.2

Thanks for the new logs!

Unfortunately, this seems to be a part of a larger problem - somewhy sensors stop updating states, even though the corresponding coordinators recover with the next polling of data.

The error [Errno 104] Connection reset by peer you see in the log is not the problem itself - this is an exception, raised by the library behind the integration. Even though I can just change this behaviour of the library, this will not solve the issue described above - as soon as some other error occurs in the data - sensors will stuck instead of updating on the next attempt.

So there is a need for a core issue fix. Unfortunately, it is not too easy to reproduce with my device. So some time Is required for testing.

For the second part with ValueError: Config entry was never loaded! - this is still a result of the entities being stuck, so firstly I need to fix the first issue.

I’ll keep you informed on the progress.

Hi, running for almost week without issues. Thank you

I was losing the sensors quite quickly, 4-6h. So far after a day it seems stable! I can remove the integrated asus integration and use yours instead! Great job!

Hey @scetu,

Thanks for the update on the issue! 👍 It’s great, the problem is fixed now.

Yes, it does not prevent your device from answering with an error (and in this case, your sensor(s) won’t update until the correct data is received), but now neither of the sensors should be stuck.

Since the issue seems to be resolved, I will close it. If you will experience any other problems with the integration, please, feel free to open a new issue.

Hey,

Seems, I have localized the problem. It should be fixed soon.

Hi @Vaskivskyi,

I’ve just updated to version 0.9.0, let’s see.

Thank you!