Home Assistant release with the issue: 0.82.1
Last working Home Assistant release (if known): 0.81.6
Operating environment (Hass.io/Docker/Windows/etc.): Docker
Component/platform: Asuswrt device tracker
Description of problem: All device tracker entities show not_home
whether they are connected or not. Reviewing debug logs shows several commands fail with error code 127 (command not found) although running these commands in an ssh terminal succeeds and provides expected output.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
- platform: asuswrt
host: 10.0.0.1
protocol: ssh
username: !secret router_user
password: !secret router_pass
track_new_devices: false
consider_home: 180
Traceback (if applicable):
2018-11-15 13:42:51 INFO (MainThread) [homeassistant.components.device_tracker.asuswrt] Checking Devices
2018-11-15 13:42:51 DEBUG (MainThread) [asyncssh] [conn=0, chan=16] Set write buffer limits: low-water=16384, high-water=65536
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=16] Requesting new SSH session
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=16] Command: for dev in `nvram get wl_ifnames`; do wl -i $dev assoclist; done
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=16] Received exit status 0
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=16] Received channel close
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=16] Channel closed
2018-11-15 13:42:51 DEBUG (MainThread) [asyncssh] [conn=0, chan=17] Set write buffer limits: low-water=16384, high-water=65536
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=17] Requesting new SSH session
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=17] Command: arp -n
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=17] Received exit status 127
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=17] Received channel close
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=17] Channel closed
2018-11-15 13:42:51 DEBUG (MainThread) [asyncssh] [conn=0, chan=18] Set write buffer limits: low-water=16384, high-water=65536
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=18] Requesting new SSH session
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=18] Command: ip neigh
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=18] Received exit status 127
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=18] Received channel close
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=18] Channel closed
2018-11-15 13:42:51 DEBUG (MainThread) [asyncssh] [conn=0, chan=19] Set write buffer limits: low-water=16384, high-water=65536
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=19] Requesting new SSH session
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=19] Command: cat /var/lib/misc/dnsmasq.leases
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=19] Received exit status 0
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=19] Received channel close
2018-11-15 13:42:51 INFO (MainThread) [asyncssh] [conn=0, chan=19] Channel closed
Additional information:
My current Asus setup is an RT-AC88U as my main router with an RT-AC68U connected over ethernet backhaul using AiMesh.
Also having this issue. RT-AC3200
Logs:
2018-11-15 20:55:39 INFO (MainThread) [homeassistant.components.device_tracker.asuswrt] Checking Devices
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=196] Requesting new SSH session
2018-11-15 20:55:39 INFO (MainThread) [homeassistant.components.device_tracker.asuswrt] Checking Devices
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=196] Requesting new SSH session
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=196] Command: for dev in `nvram get wl_ifnames`; do wl -i $dev assoclist; done
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=196] Received exit status 0
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=196] Received channel close
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=196] Channel closed
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=197] Requesting new SSH session
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=197] Command: arp -n
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=197] Received exit status 127
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=197] Received channel close
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=197] Channel closed
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=198] Requesting new SSH session
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=198] Command: ip neigh
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=198] Received exit status 127
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=198] Received channel close
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=198] Channel closed
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=199] Requesting new SSH session
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=199] Command: cat /var/lib/misc/dnsmasq.leases
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=199] Received exit status 0
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=199] Received channel close
2018-11-15 20:55:39 INFO (MainThread) [asyncssh] [conn=0, chan=199] Channel closed
I also have the same problem when I update to homeassistant 0.82.1 (RT-AC68U)
(homeassistant) jun0813@droidbox:~/homeassistant$ pip list | grep "homeassistant\|aioasuswrt"
aioasuswrt 1.1.6
homeassistant 0.82.1
2018-11-16 08:27:37 INFO (MainThread) [homeassistant.components.device_tracker.asuswrt] Checking Devices
2018-11-16 08:27:37 DEBUG (MainThread) [asyncssh] [conn=0, chan=12] Set write buffer limits: low-water=16384, high-water=65536
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=12] Requesting new SSH session
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=12] Command: for dev in nvram get wl_ifnames
; do wl -i $dev assoclist; done
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=12] Received exit status 0
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=12] Received channel close
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=12] Channel closed
2018-11-16 08:27:37 DEBUG (MainThread) [asyncssh] [conn=0, chan=13] Set write buffer limits: low-water=16384, high-water=65536
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=13] Requesting new SSH session
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=13] Command: arp -n
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=13] Received exit status 127
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=13] Received channel close
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=13] Channel closed
2018-11-16 08:27:37 DEBUG (MainThread) [asyncssh] [conn=0, chan=14] Set write buffer limits: low-water=16384, high-water=65536
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=14] Requesting new SSH session
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=14] Command: ip neigh
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=14] Received exit status 127
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=14] Received channel close
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=14] Channel closed
2018-11-16 08:27:37 DEBUG (MainThread) [asyncssh] [conn=0, chan=15] Set write buffer limits: low-water=16384, high-water=65536
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=15] Requesting new SSH session
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=15] Command: cat /var/lib/misc/dnsmasq.leases
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=15] Received exit status 0
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=15] Received channel close
2018-11-16 08:27:37 INFO (MainThread) [asyncssh] [conn=0, chan=15] Channel closed
Duplicate of #18281
@zetaphoenix Sorry. Opened this issue because#18281 was closed after the last PR.
fixed 0.83
@Bahnburner
Completely reasonable. I just wanted to link the two issues as the appeared to be the same root cause and a majority of the testing and discussion was on the other issue.
any way to fix it sooner? by replacing files or something? thank You.
Revert back to 0.81.6: sudo pip3 install homeassistant==0.81.6
I tried restore 0.81.6 backup but it didn't work. How to use command you have provided pls?
I'm running Hassos.
Thank you.
I also need to revert until this is fixed but there aren't any instructions for reverting Hass.io. @hulkhaugen does that work on hass.io?
Sorry, I'm not sure but I don't think so. I use virtualenv.
@adas4190 @captainnapalm To revert hassio, ssh into your system and use the command:
hassio ha update -o version=0.81.6
Thank you I'll give it a go.
It worked like a charm! Thank You!
@adas4190 @captainnapalm To revert hassio, ssh into your system and use the command:
hassio ha update -o version=0.81.6
Had the same issue. The above solution worked for me.
@adas4190 @captainnapalm To revert hassio, ssh into your system and use the command:
hassio ha update -o version=0.81.6Had the same issue. The above solution worked for me.
I've just downgraded the version and at first, the solution has worked for me too. But after that, the presence has come crazy, all the time 'Home' / 'Not_Home' without any reason apparently. And I've had switch off the automation. After some test, I've realized that I had the "consider_home" very low; I've changed this and now the automation work fine.
I was banging my head against a brick wall over this...
I could ssh to the router and the commands were working. I put the file permissions at 777. The logs showed HA was connecting to the router. Nothing seemed to work. :sob:
So very glad to finally find this issue. Looking forward to 0.83!
Have you tested this in 0.83?
I just tried the latest pre-release 0.83.0b1 and asuswrt setup completely fails now.
2018-11-27 10:59:57 ERROR (MainThread) [homeassistant.setup] Error during setup of component asuswrt
Traceback (most recent call last):
File "/usr/src/app/homeassistant/setup.py", line 145, in _async_setup_component
hass, processed_config)
File "/usr/src/app/homeassistant/components/asuswrt.py", line 48, in async_setup
conf = config[DOMAIN]
KeyError: 'asuswrt'
I get the same error and traceback as above in 0.83.0b3
Its no longer a platform, its a component
Boom! that works nicely. Thanks @kennedyshead
For others, you can see the docs here:
https://github.com/home-assistant/home-assistant.io/blob/next/source/_components/asuswrt.markdown
Ah thanks. It seems I now have to provide a port (23) when using telnet, as it defaults to 22. I'm also experiencing issue #18735 but it looks like that should be resolved in an upcoming release.
Hello everyone! How does the track_new_devices
works now? I really don't want all new devices to be tracked automatically. Thanks.
try putting track_new_devices
under device_tracker:
That is base device_tracker behavior that the asuswrt component doesn't need to care about.
try putting track_new_devices under device_tracker: That is base device_tracker behavior that the asuswrt component doesn't need to care about.
But isn't that set per platform? And since asuswrt is a component now, I don't have a platform anymore. I was thinking that I didn't need the device_tracker:
at all so I removed it. Was that wrong and do we need asuswrt:
and device_tracker:
(with platform: asuswrt
again)?
Most helpful comment
Hello everyone! How does the
track_new_devices
works now? I really don't want all new devices to be tracked automatically. Thanks.