Repository for my custom components
I kept having issues with the asuswrt device tracker, so I hacked away at the code until it worked. Sharing this here in case others want to try it too. The old asuswrt.py script used several different ways to check the devices, and I found that if I remove all but one of them (the "ip neigh" command) then it would continue to work perfectly.
- Download the myasuswrt.py file into a directory called
device_tracker
in thecustom_components
directory in your config directory. You should have a path that looks like this:<your config directory>\custom_components\device_tracker\myasuswrt.py
- Follow the documentation below except where it says
platform: asuswrt
useplatform: myasuswrt
instead.
- RT-AC86U
- RT-N65U
- (I assume that all others will work with this too, but have not yet definite confirmation yet - please let me know if you use this and it works for you.
The asuswrt
platform offers presence detection by looking at connected devices to a ASUSWRT based router.
This platform is NOT available for Microsoft Windows installations.
To use an ASUSWRT router in your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
device_tracker:
- platform: asuswrt
host: YOUR_ROUTER_IP
username: YOUR_ADMIN_USERNAME
host:
description: "The IP address of your router, eg. `192.168.1.1`."
required: true
type: string
username:
description: "The username of an user with administrative privileges, usually `admin`."
required: true
type: string
password:
description: "The password for your given admin account (use this if no SSH key is given)."
required: false
type: string
protocol:
description: "The protocol (`ssh` or `telnet`) to use."
required: false
type: string
default: ssh
port:
description: SSH port to use.
required: false
type: integer
default: 22
mode:
description: "The operating mode of the router (`router` or `ap`)."
required: false
type: string
default: router
ssh_key:
description: The path to your SSH private key file associated with your given admin account (instead of password).
required: false
type: string
require_ip:
description: If the router is in access point mode.
required: false
type: boolean
default: true
You need to enable telnet on your router if you choose to use protocol: telnet
.
See the device tracker component page for instructions how to configure the people to be tracked.