Anyone else having problem with device_tracker?
Home assistant version 0.73.0
Config:
device_tracker:
- platform: asuswrt
host: 172.16.10.2
username: admin
ssh_key: /home/homeassistant/.ssh/id_rsa
Home assistant log:
Error setting up platform asuswrt
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/__init__.py", line 176, in async_setup_platform
platform.get_scanner, hass, {DOMAIN: p_config})
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/asuswrt.py", line 83, in get_scanner
scanner = AsusWrtDeviceScanner(config[DOMAIN])
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/asuswrt.py", line 132, in __init__
data = self.get_asuswrt_data()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/asuswrt.py", line 169, in get_asuswrt_data
devices.update(self._get_wl())
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/asuswrt.py", line 182, in _get_wl
lines = self.connection.run_command(_WL_CMD)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/asuswrt.py", line 278, in run_command
from pexpect import pxssh, exceptions
File "/srv/homeassistant/lib/python3.7/site-packages/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/srv/homeassistant/lib/python3.7/site-packages/pexpect/pty_spawn.py", line 15, in <module>
from .spawnbase import SpawnBase
File "/srv/homeassistant/lib/python3.7/site-packages/pexpect/spawnbase.py", line 218
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Manually trigger:
python3 /srv/homeassistant/lib/python3.7/site-packages/pexpect/spawnbase.py
File "/srv/homeassistant/lib/python3.7/site-packages/pexpect/spawnbase.py", line 218
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
Edit: Found this https://github.com/pexpect/pexpect/issues/453
Changing the REQUIREMENTS of the asuswrt plugin to a newer pexpect (4.6) did the trick for me…