-
-
Notifications
You must be signed in to change notification settings - Fork 17
-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not work on RT-AX88U #16
Comments
Hi @leonidfeldman1977 , First of all, thank you for your feedback! 👍🏻 Seems like this is a problem with parsing data by the AsusRouter library which is used in this integration. I've opened an issue there Vaskivskyi/asusrouter#20 to keep track of the bugfix. It could take some time, but the problem will be fixed. Meanwhile, can you try running this python snippet to see what kind of data your device is sending as "wlConnectTime"? You would need to run it from the environment with the AsusRouter library being installed (e.g. from Home Assistant venv, since there it was already installed by the integration) """Small test for available data from your AsusRouter"""
from asusrouter import AsusRouter
import asyncio
async def gather_data(host, username, password, use_ssl):
"""Method to gether all the known data"""
# Initialize
router = AsusRouter(host = host, username = username, password = password, use_ssl = use_ssl)
# Connect
await router.connection.async_connect()
# Get wlConnectTime data in raw
data = await router.async_hook("get_clientlist()")
for device in data["get_clientlist"]:
try:
info = data["get_clientlist"][device]
print(info["wlConnectTime"])
except Exception as ex:
break
# Disconnect
await router.connection.async_disconnect()
loop = asyncio.get_event_loop()
# Please, put your values in here
_host = "IP_or_hostname_here"
_username = "admin"
_password = "password"
_use_ssl = True
loop.run_until_complete(gather_data(_host, _username, _password, _use_ssl))
loop.close() Just put the code to some local The output will look like this:
|
I'm not sure I understand what do you need can you explain step by step |
Hey, @leonidfeldman1977 , Do you mind checking if the new version 0.2.0 of the integration does work for you? |
Hey @leonidfeldman1977 , It seems that some of the devices do not report WAN traffic at all. I am currently looking into this problem. There is a new issue about it #30, collecting all the known data, models and firmware versions to find out what exactly is the reason. As for the Connected Devices sensor, I am not yet sure what could be a reason for such behaviour. It could be related to how the AiMesh works or something else. I am currently expecting to get access to one RT-AX88U (hopefully, this week). As soon as I get the device, I'll be able to check what could cause such a difference between the web panel number of clients and the sensor in the integration |
I've got an RT-AX88U, that does not have any problems with the WAN data - it just reports as usual and as I had on the much older router. So still don't have any idea, why that could happen with some of the routers. Maybe it could be somehow connected to the AiMesh? Unfortunately, this is something I cannot try since the older device does not support this feature. As for the discrepancy in the number of devices, I didn't notice it yet. But that was only after a couple of hours with the router. I'll let you know if I will find a fix for any of these two issues. |
i assume this is the same issue i mentioned in the other thread that i'm having. so, on my AX XT8 - i'm getting the following: 34:09:28 34:09:21 12:34:18 34:08:53 27:35:30 34:09:22 34:09:21 34:03:47 00:00:37 i don't think it makes a difference but btw - the script ends with an error for me: Traceback (most recent call last): |
Yes, it crashed on the last element in the array, since that is not a real device, but some other thing. I've edited the code, so it won't crash if someone tries it again. In any case, did you get the same
in your log? This method was fixed earlier and there is no such line in the code of the current version. For any other exceptions or errors, other data should be checked. |
yea sorry - shouldn't have assumed it was the same issue. i'll respond to your other comment - but i actually just got it working. i'm up and running now. |
Hey, @leonidfeldman1977 , Can you check if with the new version 0.2.4 sensor |
That is something I am trying to figure out. Other devices were my mistake in the code of the integration. But this seems to be connected to the AiMesh (you have 2 nodes, as far as it was shown in out of comments (#16 (comment)). That would explain the +2 in the I will continue digging |
It took quite a long, but I can now finally confirm, that the |
Log file:
Logger: homeassistant.config_entries
Source: custom_components/asusrouter/bridge.py:201
Integration: ASUS Router (documentation, issues)
First occurred: 19:15:18 (1 occurrences)
Last logged: 19:15:18
Error setting up entry 10.10.20.2 for asusrouter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/asusrouter/init.py", line 17, in async_setup_entry
await router.setup()
File "/config/custom_components/asusrouter/router.py", line 264, in setup
self._mac = await self._api.get_mac()
File "/config/custom_components/asusrouter/bridge.py", line 234, in get_mac
await self._async_get_device_info()
File "/config/custom_components/asusrouter/bridge.py", line 201, in _async_get_device_info
await self._api.async_initialize()
File "/usr/local/lib/python3.9/site-packages/asusrouter/asusrouter.py", line 600, in async_initialize
await self.async_monitor_devices()
File "/usr/local/lib/python3.9/site-packages/asusrouter/asusrouter.py", line 503, in async_monitor_devices
value = await helpers.async_transform_connection_time(data[mac]["wlConnectTime"])
File "/usr/local/lib/python3.9/site-packages/asusrouter/helpers.py", line 121, in async_transform_connection_time
delta = timedelta(hours = int(part[0]), minutes = int(part[1]), seconds = int(part[2]))
ValueError: invalid literal for int() with base 10: ''
The text was updated successfully, but these errors were encountered: