core: AttributeError: 'SshConnection' object has no attribute '_client'

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:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 38 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Same issue. 0.105.3

I just noticed this myself, working on a fix.

Stupid of me, I just found the bug! I’ll prepare a new release of aioasuswrt

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?

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.