Hi All
I’ve recently bought an ASUS DSL-AC56U Modem and using it via NBN direct to the house on the WAN PPTP connection (so not using a DSL connection). I bought the ASUS modem as i noticed that ASUSWRT is supported by Home Assistant.
I am running the current firmware from ASUS, ASUSWRT Version 1.1.2.2_36 (28/3/2017). I also have both SSH and Telnet enabled in ASUSWRT. I can successfully telnet and SSH onto the router using putty, so I know my settings in ASUSWRT should support Home Assistant for both SSH and Telnet.
Initially i tried connecting from Home Assistant using a SSH connection:
device_tracker (Configuration.yaml):
- platform: asuswrt
host: 192.168.1.1
username: ‘admin’
password: ‘secretpassword’
protocol: ssh
port: 22
mode: router
track_new_devices: yes
interval_seconds: 10
consider_home: 180
But i noticed that SSH was having issues getting a connection issue in the home-assistant.log:
“17-04-02 19:57:39 ERROR (Thread-10) [homeassistant.components.device_tracker.asuswrt] Unable to connect via SSH: could not set shell prompt (received: b” unset PROMPT_COMMAND\r\n# PS1=’[PEXPECT]\$ ‘\r\n[PEXPECT]\$ set prompt=’[PEXPECT]\$ '\r\n[PEXPECT]\$ “, expected: '\[PEXPECT\][\$\#] ').”
After reading through the forum i noticed quite a few other users noted that SSH connections didnt work, and instead switched to Telnet connections with success.
So I switched to Telnet, configuration.yaml below:
device_tracker:
- platform: asuswrt
host: 192.168.1.1
username: ‘admin’
password: ‘secretpassword’
protocol: telnet
mode: router
track_new_devices: yes
interval_seconds: 10
consider_home: 180
However I got a new error when viewing the home-assistant.log relating to a missing dnsmasq.leases file:
17-04-02 20:02:26 WARNING (Thread-8) [homeassistant.components.device_tracker.asuswrt] Could not parse lease row: b’cat: /var/lib/misc/dnsmasq.leases: No such file or directory\r’
After telneting onto the router i discovered that /var/lib folder didnt even exist, let alone /var/lib/misc/dnsmasq.leases? I also found that dnsmasq isnt even on the router, it seems that the new ASUS routers are running ‘udhcpd’ for DNS stuff. When I looked in /usr/sbin/, there was no reference to dnsmasq at all, but there was udhcpd which was running.
I did find a few files which contain DHCP leases in ‘/etc/udhcpd.leases’ & ‘/etc/udhcp_lease’, which appear to contain similar information to the ‘dnsmasq.leases’ file.
So I’m curious if anyone else has stumbled across this issue with ASUS running udhcp instead of dnsmasq, and if there are any work arounds?
I’m also very keen to know what the process is for raising this up to the folks who are maintaining the ASUSWRT component code, ideally to update the component to work with the current firmware and support for udhcp leases.
Failing that I might be taking my brand new ASUS modem router back and switching it over to a Netgear router and hope that has better compatibility with Home Assistant for Device Tracking.
Regards
Craig