Commit Graph

32 Commits (e4f0b0a57f8b2e01493a53668d84ba76bc3e9346)

Author SHA1 Message Date
Oleksii Serdiuk ca1dc202f9 ASUSWRT: Add IPv6 support when parsing neighbors (#5536)
* ASUSWRT: Add IPv6 support when parsing neighbors

The regex for IPv6 should cover most cases, but it doesn't validate
whether IP is correct. It also might fail for some edge cases.

Also, ignore 'duid xx:xx:xx:xx:xx:xx:xx:xx:xx:xx' line in leases.

Closes #2814 - ASUSWRT doesn't support ipv6

* Update asuswrt.py
2017-01-25 00:02:39 -08:00
Pascal Vizeli b2371c6614 Update device_traker for async platforms (#5102)
Async DeviceScanner object, migrate to async, cleanups
2017-01-02 21:50:42 +02:00
Albert Lee bc646070c8 Match uppercase MAC addresses in asuswrt 'arp -n' output (#4742) (#4764) 2016-12-05 22:20:21 -08:00
Paulus Schoutsen d2bbc6ef70 Upgrade linter (#4461) 2016-11-18 21:47:59 -08:00
Jeffrey Lin cd1b0ac67d Added NVRAM-based MAC to IP mapping as backup to ARP tables (#4189) 2016-11-10 22:46:58 -08:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Johann Kellerman 91a3522100 Improve voluptuous and login errors for Asus device tracker (#3170) 2016-09-03 17:32:43 -06:00
Daniel 62bbda1f82 Bug fix for asuswrt device_tracker. Issue #3015 2016-08-29 08:23:20 +02:00
Daniel Høyer Iversen 821b3d7fac Bug fix for asuswrt device_tracker. Issue #3015 (#3016)
🐬
2016-08-28 17:34:01 -06:00
Johann Kellerman 6f1c97b9d3 Voluptuous for AsusWRT (#2998)
* Voluptuous for AsusWRT
2016-08-27 22:30:06 +02:00
Dale Higgs ab63fbff3f Fix AsusWRT to prevent SSH key confusion (#2467)
Changed "pub_key" to "ssh_key" while maintaining backwards compatibility. Quotes were also updated to match across the file.
2016-07-08 08:58:31 -07:00
Matthew Treinish aa3d0e1047 Fix incorrect check on presence of password and pub_key (#2355)
This commit fixes an issue with the use of None in default values
for the config get() calls in __init__() of AsusWrtDeviceScanner.
These values are cast as strings and when a NoneType is cast it
returns the string "None" this broke the check for the existence
of these fields. This commit fixes the issue by changing the default
value to be an empty string '' which will conform with the behavior
expected by the ssh login code.

Closes #2343
2016-06-22 17:01:39 -07:00
Per Sandström 38030fcfca ASUSWRT Autodetect protocol (#2300) 2016-06-14 22:17:32 -07:00
Matthew Treinish 1381984b77 Add ssh public key support to the asuswrt component (#2287)
The pexpect.pxssh module has support for using public key
authentication. [1] This commit adds support for leveraging that and
establishing a ssh connection with a public key instead of a password.

[1] http://pexpect.readthedocs.io/en/stable/api/pxssh.html#pexpect.pxssh.pxssh.login
2016-06-12 21:27:41 -07:00
Paulus Schoutsen b60806583c Update asuswrt.py 2016-06-10 21:14:11 -07:00
Jeffrey Lin 30f5727b40 Added support for AP mode in asuswrt (#2263)
* Added support for AP mode in asuswrt

* Corrected number of return values in asuswrt
2016-06-09 21:30:47 -07:00
froz 8d34b76d51 Restored telnet as an option. Activate with config option 'protocol: telnet'. Default is ssh (#2096) 2016-05-17 15:55:12 -07:00
froz 49acdaa8fd Device Tracker - ASUSWRT: Replaced telnet with ssh (#2079) 2016-05-15 12:20:17 -07:00
Fabian Affolter cc7a4d545e Fix PEP257 issues 2016-03-07 21:18:53 +01:00
Fabian Affolter 7ff9aecd4e Update docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen e6846e7eb9 Convert asuswrt user/pass to strings 2016-01-12 22:28:53 -08:00
Paulus Schoutsen 16904452b8 Merge pull request #614 from persandstrom/asuswrt_not_loading
ASUSWRT more logging and more robust
2015-11-12 11:43:49 -08:00
Per Sandström 158d9e27ff more robust and more logging 2015-11-12 20:10:25 +01:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Guillaume SABBE a1e5bea3ab When IPv6 is enabled, dnsmasq has a configuration line with the DUID.
This looks like this
61072 b8:27:eb:e1:4e:4d 192.168.0.4 domotycoon *
61072 b8:27:eb:b8:10:6b 192.168.0.5 pimonitor *
duid 00:03:00:01:ac:22:0b:e9:98:50
When using match.group() without testing if match != None, you get a traceback.
2015-10-11 15:21:53 +02:00
Jeff Schroeder 7c7b6ca05c Fix the asuswrt device tracker for dhcp leases with no hostname
Sometimes, hosts request dhcp leases without sending the hostname
they want to the dhcp server. This results in the entity_id being
`device_tracker.` as the dev_id is empty and things go downhill
from there.

The dhcp lease file looks like:
    admin@RT-AC66R:/tmp/home/root# cat /var/lib/misc/dnsmasq.leases
    86400 5c:c5:d4:79:4c:ad 192.168.1.226 chit-jsl3 *
    85242 8c:77:12:ad:d9:23 192.168.1.126 android-2c94abebaab16255 01:8c:77:12:ad:d9:23
    61985 b8:e9:37:73:47:f0 192.168.1.204 * 01:b8:e9:37:73:47:f0
    61982 b8:e9:37:ec:0d:7e 192.168.1.132 * 01:b8:e9:37:ec:0d:7e
    84584 00:20:6b:ca:31:c1 192.168.1.182 MC4650-CA31C1 01:00:20:6b:ca:31:c1
    86306 fc:e9:98:d6:4b:90 192.168.1.173 iLol 01:fc:e9:98:d6:4b:90
    74343 20:3a:07:f3:7e:ae 192.168.1.246 gatekeeper 01:20:3a:07:f3:7e:ae
    72374 b8:e9:37:5f:3d:06 192.168.1.34 SonosZP 01:b8:e9:37:5f:3d:06
    64697 00:0e:58:6f:59:d2 192.168.1.171 SonosZB 01:00:0e:58:6f:59:d2

Confirmed working on an Asus RT-AC66R with fw version: 3.0.0.4.376_3861
2015-09-14 20:33:14 -05:00
Fabian Affolter 514b8eddb9 Update docstring (config file) and attempt to honor PEP0257 2015-09-07 19:19:11 +02:00
Fabian Affolter f84b3a509d update header 2015-08-06 22:24:23 +02:00
Per Sandstrom 65cc0954c8 Exception when client not in leases
Client can be dropped from leases list from where the status is
retreived before it is dropped from the ip neigh list.
The client needs a default status.
2015-08-06 09:19:23 +02:00
Per Sandstrom 52ec4ac1d8 flake8 and pylint 2015-08-05 10:22:03 +02:00
Per Sandstrom ed0164843a Added support for ASUSWRT based routers 2015-07-30 11:30:31 +02:00