* Get the list of wireless interfaces from nvram so tri-band routers
work
* ARP checks don't work reliably for ap mode so remove it, associated
list seems pretty solid
* Match on 'mac' instead of 'ip' since we can't use it for ap mode
* The `client_info_tmp` nvram reference, Asus removed it some time ago
* Update AsusWrtResult
* Make ssh and telnet connections continuous in asuswrt
* Refactored SSH and Telnet connections into respective classes.
* Fixed several copy-paste typos and errors.
* More typos fixed.
* Small changes to arguments, to pass automated tests.
* Removed unsupported named arguments.
* Fixed a couple of mistakes in Telnet, and other lint errors.
* Added Telnet tests, and added lint exceptions.
* Removed comments from tests, as they irritated the hound.
* Added support for alternate SSH ports in AsusWRT (#4832)
* Always set the SSH port in SSH arguments
* Removed whitespace
* Adding port=22 to the mock calls
* Changed config.get(CONF_PORT) to config[CONF_PORT] per feedback from @pvizeli
* 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
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
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.
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
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.