Home Assistant release with the issue:
0.100.2
Last working Home Assistant release (if known):
N/K
Operating environment (Hass.io/Docker/Windows/etc.):
Hassio
Integration:
AsusWRT
Description of problem:
Integration crashes and cause problems with device tracking.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
asuswrt:
host: !secret asuswrt_host
username: !secret asuswrt_username
ssh_key: '/config/custom_components/asuswrt_ssh/asuswrt_ssh_key'
# password: !secret asuswrt_password
sensors:
- upload
- download
- upload_speed
- download_speed
Traceback (if applicable):
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 164, in async_device_tracker_scan
found_devices = await scanner.async_scan_devices()
File "/usr/src/homeassistant/homeassistant/components/asuswrt/device_tracker.py", line 36, in async_scan_devices
await self.async_update_info()
File "/usr/src/homeassistant/homeassistant/components/asuswrt/device_tracker.py", line 52, in async_update_info
self.last_results = await self.connection.async_get_connected_devices()
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 168, in async_get_connected_devices
dev = await self.async_get_arp()
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 148, in async_get_arp
lines = await self.connection.async_run_command(_ARP_CMD)
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/connection.py", line 37, in async_run_command
result = await asyncio.wait_for(self._client.run(
AttributeError: 'SshConnection' object has no attribute '_client'
Additional information:
Hey there @kennedyshead, mind taking a look at this issue as its been labeled with a integration (asuswrt
) you are listed as a codeowner for? Thanks!
Hi All, I started having the same error last night for presence and sensors.
Update for sensor.asuswrt_upload_speed fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 268, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/asuswrt/sensor.py", line 91, in async_update
await super().async_update()
File "/usr/src/homeassistant/homeassistant/components/asuswrt/sensor.py", line 56, in async_update
self._rates = await self._api.async_get_bytes_total()
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 189, in async_get_bytes_total
rx = await self.async_get_rx()
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 195, in async_get_rx
data = await self.connection.async_run_command(_RX_COMMAND)
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/connection.py", line 37, in async_run_command
result = await asyncio.wait_for(self._client.run(
AttributeError: 'SshConnection' object has no attribute '_client'
Here is my config, I am not using SSH key.
asuswrt:
host: 192.168.1.1
username: !secret asus_user
password: !secret asus_password
sensors:
- upload
- download
- upload_speed
- download_speed
device_tracker:
- platform: asuswrt
host: 192.168.1.1
username: !secret asus_user
password: !secret asus_password
interval_seconds: 12
consider_home: 30
new_device_defaults:
track_new_devices: true
hide_if_away: false
Running 0.100.2 but I updated a few days ago and only just now started having problem.
Cheers
Tried rolling back to 0.99.3 and still has same problem. I have also tried SSH into router with same credentials and am able to get access. I also tried removing the setup from the Config file restarting, adding config back in. This helped as the status has been updating sometimes but therefore the status is not accurate and presence detection keeps flicking between away and home every 7 minutes or so and then eventually stops responding.
I just noticed this myself, working on a fix.
I'm surprised no one else has commented saying they have the same problem. I thought this was a popular implementation, have others not suffered the same problem? is there some other work around?
I have tried using SSH key and this produces the same error. I have also tried using telnet and this doesn't have the same error but the error is a connection time out but I am able to telnet into the router using the same settings.
Host timeout.
5:24 PM components/asuswrt/sensor.py (ERROR)
@Tekno-man , do you use the Merlin version 384.13_1?
@ticapix I have stock firmware Current Version : 3.0.0.4.384_45149-g467037b. Not sure what Merlin is.
SshConnection' object has no attribute '_client' BINGO!! Have the same issue .. latest 101.3 Hassio intel nuc ubuntu docker install I got this error after adding the sensor !
sensors:
- upload
- download
- upload_speed
- download_speed
This might be related to the sensor in asuwrt component
On top of this i get device_tracker issues. Suddenly the device tracker stops working ... my system turns on my alarmsystem.. lights off and stuff :P .. not really funny. if someone opens a door or window .. bingo!!! alarm siren fired nicely .. I have the feeling the device tracker has a bug since 101.x
@tiagofreire-pt I use 384.13_0 on asus RTac68U
@kennedyshead, do you have news about the route cause of this issue?
I'm having same problem from some versions ago (not sure which one). It works after HA restart during few days, but suddenly it fails with exactly same error as mentioned in this topic. I could not identify a trigger...
I'm not using ssh.
Thanks !
after having disabled the Asus: integration for a long time, today thought it might be a good time to re-enable on 102.2/3.
no such luck, this error is still there unfortunately. Is anyone aware of any dev / code-owner taking this at heart?
I am having the same issue for several days/weeks... I also just moved to using aimesh yesterday. I will see if I am able to assist with tracking down the issue. Fingers crossed!
So at first glance, there is no issue with the router or the code. It is failing to connect on my production server, yet it is working on my development server. I am wondering if something else in the background is causing the problem... like another component, a python module of a different version, etc.
UPDATE: I've added some debug logs, we will see if it sheds any light on the problem. Currently it is now working again on my production server.
Any news on this one? I'm on 0.104.3 and the issue is still present :/
Same problem here in 0.105.3!
It's strange because in 0.104.3 the issue appeared very rarely.
In 0.105.3 it is present several thousand times per day (log file is 70 MB after 1 day ;) )
I can confirm there are literally thousands of log entries with 0.105.3.
And that's what appears at my router's syslog right before each series of these errors in the HA log:
Feb 13 01:00:17 dropbear[12018]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:41372
Feb 13 01:00:28 dropbear[12025]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:41476
Feb 13 01:00:38 dropbear[12033]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:41576
Feb 13 01:00:57 dropbear[12082]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:42552
Feb 13 01:01:12 dropbear[12092]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:43384
Feb 13 01:01:13 dropbear[12091]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:43380
Feb 13 01:01:15 dropbear[12093]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:43386
Feb 13 01:01:15 dropbear[12094]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:43388
Feb 13 01:02:56 dropbear[12304]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:46938
Feb 13 01:03:35 dropbear[12369]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:48252
Feb 13 01:04:10 dropbear[12434]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:49204
Feb 13 01:05:03 dropbear[12571]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:51512
Feb 13 01:05:19 dropbear[12582]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:52126
Feb 13 01:05:20 dropbear[12580]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:52124
Feb 13 01:05:22 dropbear[12579]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:52122
Feb 13 01:05:22 dropbear[12586]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:52136
Feb 13 01:05:23 dropbear[12583]: Pubkey auth succeeded for 'โโโโโ' with key sha1!! [DATA EXPUNGED] from 192.168.1.โโโ:52128
Then I can see a lot of dropbear spawns with established connections on port 22 at router side while HA side still has only one open connection as if all these connections were not properly closed.
In the worst case I had dozens of these spawns and router's CPU was utilized at 100% with 90+% at sirq. Turned off the integration, rebooted the router โ problem's gone.
Also not sure if this is related but if I restart HA these errors usually start occurring again near 00:00 or 01:00.
I have not seen this since 100.x in my system... thought I fixed it. Sorry :/ There might be a problem if there is a temporary "glitch" in connection
Same issue. 0.105.3
same issue 0.107.7
Same issue. 0.107.7
Edit: Also with 0.108.5.
Also with 0.108.5.
Also with 0.108.4
Stupid of me, I just found the bug! I'll prepare a new release of aioasuswrt
Still in 0.108.9
Still in 0.108.9
It should be in 0.109.
Let's hope this fixes the issue for once and for all :)
Sorry, I thought the fix was in an earlier release. Thanks!
Still getting errors in 0.109
Logger: homeassistant.core
Source: components/asuswrt/device_tracker.py:52
First occurred: 30 april 2020 22:42:33 (1617 occurrences)
Last logged: 8:32:50
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 161, in async_device_tracker_scan
found_devices = await scanner.async_scan_devices()
File "/usr/src/homeassistant/homeassistant/components/asuswrt/device_tracker.py", line 36, in async_scan_devices
await self.async_update_info()
File "/usr/src/homeassistant/homeassistant/components/asuswrt/device_tracker.py", line 52, in async_update_info
self.last_results = await self.connection.async_get_connected_devices()
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 312, in async_get_connected_devices
dev = await self.async_get_arp()
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 287, in async_get_arp
lines = await self.connection.async_run_command(_ARP_CMD)
File "/usr/local/lib/python3.7/site-packages/aioasuswrt/connection.py", line 39, in async_run_command
result = await asyncio.wait_for(self._client.run(
AttributeError: 'NoneType' object has no attribute 'run'
Same here. 0.109.6
I am pretty sure in earlier version maybe 0.8x ,no such issue.
Will this ever be fixed? Still not working in Home Assistant 0.114.4
Stop digging up old unrelated issues, the last stacktrace is a completely new one and would have got sorted if there was a new issue with all info provided.
Wow.
I am not "digging up old issues", I'm responding to ONE thread I already was part of.
My HA installation will still not update statuses of devices, so for me it is still not working
And yes this issue is closed, but for me not resolved.
No need to react like that.
Im not doing more than to say that the reason for missing this is that its unrelated to this issue. I'm not flaming and am not irritated or anything like <3
/Mknutas
@djiest which asus router do you have? I'm running ac5300 with 384.18, soon to be 384.19. Try other firmware versions if you haven't tried already. It could also be an issue specific to your router model.
That's all I have to offer
@djiest I'm 100% sure that your hass can't access the router. Why that is I have no clue.
Firewall? Wrong ip (silly thing but could be). Du you have ssh turned on?
I'm using my router (previous AC66U, now RT-AX92U) for presence detection. That worked perfectly up to HA 0.108, after that I never got it working again. That's why I state that my issue isn't fixed. I've seen some threads about multirouter systems on the HA Forum so I will dive into that.
The actual error is "Error [[Errno 111] Connect call failed ('192.168.x.x', 22)] connecting asuswrt to 192.168.x.x. Will retry in 60 seconds...
As far as I'm concerned, new insights will I be posting in new issues.
๐
Most helpful comment
Same issue. 0.105.3