core: ASUSWRT device tracking is not working

The problem

I have an issue with ASUSWRT integration. I’ve setup asuswrt component and device_tracker component as shared below. The connection works because sensor are visible. But device tracking don’t work. Devices sensor always report 3 or 4 devices connected while looking at asus webui there are almost 15 device using this ap (i use the componenti in AP mode. I’ve added and removed mode: ap without any changes.

Environment

arch x86_64
chassis vm
dev false
docker true
docker_version 19.03.8
hassio true
host_os HassOS 4.11
installation_type Home Assistant OS
os_name Linux
os_version 5.4.50
python_version 3.7.7
supervisor 228
timezone Europe/Rome
version 0.112.4
virtualenv false
  • Home Assistant Core release with the issue: 0.112.4
  • Last working Home Assistant Core release (if known): NA
  • Operating environment (OS/Container/Supervised/Core): OS
  • Integration causing this issue: ASUSWRT
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/asuswrt/

Problem-relevant configuration.yaml


asuswrt:
    host: 192.168.2.253
    username: admin
    ssh_key: /config/ssh/asus
    protocol: ssh
    mode: ap
    sensors:
      - devices
      - download_speed
      - upload_speed
    
device_tracker:
  - platform: asuswrt
    interval_seconds: 10
    consider_home: 180
    track_new_devices: yes

Traceback/Error logs

NA

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Error logs if that helps

2020-07-11 22:15:08 ERROR (MainThread) [homeassistant.setup] Error during setup of component asuswrt
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 193, in _async_setup_component
    result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/asuswrt/__init__.py", line 85, in async_setup
    await api.connection.async_connect()
  File "/usr/local/lib/python3.7/site-packages/aioasuswrt/connection.py", line 75, in async_connect
    self._client = await asyncssh.connect(self._host, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/asyncssh/connection.py", line 5696, in connect
    conn_factory, 'Opening SSH connection to')
  File "/usr/local/lib/python3.7/site-packages/asyncssh/connection.py", line 175, in _connect
    await conn.wait_established()
  File "/usr/local/lib/python3.7/site-packages/asyncssh/connection.py", line 1927, in wait_established
    await self._waiter
asyncssh.misc.ConnectionLost: Connection lost

Bumping the aioasuswrt to the latest version 1.2.7 seems to fix the problem

2020-07-14 09:53:29 INFO (SyncWorker_19) [homeassistant.util.package] Attempting install of aioasuswrt==1.2.7
2020-07-14 09:54:08 INFO (MainThread) [homeassistant.setup] Setting up asuswrt
2020-07-14 09:54:11 INFO (MainThread) [homeassistant.setup] Setup of domain asuswrt took 3.2 seconds.
2020-07-14 09:54:15 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.asuswrt

I have exactly the same problem