Core: ASUSWRT doesn't support ipv6

Created on 14 Aug 2016  Â·  2Comments  Â·  Source: home-assistant/core

Home Assistant release (hass --version):
0.26.0

Python release (python3 --version):
Python 3.4.2

Component/platform:
ASUSWRT

Description of problem:
ASUSWRT component fails to decode ipv6 rows from the ip neigh command, and generates lots of warnings.

Expected:
ipv6 rows should be parsed if possible.

Problem-relevant configuration.yaml entries and steps to reproduce:

- platform: asuswrt
  host: 192.168.1.1
  protocol: ssh
  username: xxx
  password: xxx


    1. 2.
  1. 3.

Traceback (if applicable):

16-08-13 18:29:02 homeassistant.components.device_tracker.asuswrt: Could not parse neighbor row: b'fe80::f6f5:e8ff:fe8d:7bc1 dev vlan2 lladdr f4:f5:e8:8d:7b:c1 router STALE\r'

Additional info:

As far as I can tell, https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/device_tracker/asuswrt.py#L49-L54 expects ipv4-only ips. I'm assuming the regex just needs updated to support ipv6. It might be possible to use something like https://docs.python.org/3/library/ipaddress.html instead of regex to validate the IP vs long regex patterns that can get messy.

Here's what part of my ip neigh looks like with one ipv6 local and the rest ipv4.

fe80::f6f5:e8ff:fe8d:7bc1 dev vlan2 lladdr f4:f5:e8:8d:7b:c1 router STALE
192.168.1.29 dev br0  FAILED
192.168.1.2 dev br0 lladdr 00:23:54:a1:ae:4a REACHABLE

Note: this doesn't break anything, it just generates several warnings per minute.

Most helpful comment

In the meantime, you can also adjust the log level for the asuswrt platform and leave IPv6 enabled on your Asus router:

# Example configuration.yaml entry
logger:
  default: warn #I believe this is the default setting anyways?
  logs:
    homeassistant.components.device_tracker.asuswrt: error

All 2 comments

When you get a fix, a PR is welcome

On Sat, Aug 13, 2016, 16:41 Justyn Shull [email protected] wrote:

_Home Assistant release (hass --version):_
0.26.0

_Python release (python3 --version):_
Python 3.4.2

_Component/platform:_
ASUSWRT

_Description of problem:_
ASUSWRT component fails to decode ipv6 rows from the ip neigh command,
and generates lots of warnings.

_Expected:_
ipv6 rows should be parsed if possible.

_Problem-relevant configuration.yaml entries and steps to reproduce:_

  • platform: asuswrt
    host: 192.168.1.1
    protocol: ssh
    username: xxx
    password: xxx

1.
2.
3.

_Traceback (if applicable):_

16-08-13 18:29:02 homeassistant.components.device_tracker.asuswrt: Could not parse neighbor row: b'fe80::f6f5:e8ff:fe8d:7bc1 dev vlan2 lladdr f4:f5:e8:8d:7b:c1 router STALEr'

_Additional info:_

As far as I can tell,
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/device_tracker/asuswrt.py#L49-L54
expects ipv4-only ips. I'm assuming the regex just needs updated to support
ipv6. It might be possible to use something like
https://docs.python.org/3/library/ipaddress.html instead of regex to
validate the IP vs long regex patterns that can get messy.

Here's what part of my ip neigh looks like with one ipv6 local and the
rest ipv4.

fe80::f6f5:e8ff:fe8d:7bc1 dev vlan2 lladdr f4:f5:e8:8d:7b:c1 router STALE
192.168.1.29 dev br0 FAILED
192.168.1.2 dev br0 lladdr 00:23:54:a1:ae:4a REACHABLE

Note: this doesn't break anything, it just generates several warnings per
minute.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/2814, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABYJ2tqo1cJOu8v3cOX0ASRMEGaXdOdOks5qflYagaJpZM4JjyQq
.

In the meantime, you can also adjust the log level for the asuswrt platform and leave IPv6 enabled on your Asus router:

# Example configuration.yaml entry
logger:
  default: warn #I believe this is the default setting anyways?
  logs:
    homeassistant.components.device_tracker.asuswrt: error
Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdraco picture bdraco  Â·  3Comments

TheZoker picture TheZoker  Â·  3Comments

arangates picture arangates  Â·  3Comments

moskovskiy82 picture moskovskiy82  Â·  3Comments

MartinHjelmare picture MartinHjelmare  Â·  3Comments