Skip to content

stuartmaxwell/ha-custom_components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

ha-custom_components

Repository for my custom components

MyAsusWRT

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.

Instructions

  • Download the myasuswrt.py file into a directory called device_tracker in the custom_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 use platform: myasuswrt instead.

Routers known to work with this code:

  • 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.

Documentation for the old asuswrt device tracker:

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.

Configuration

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.

About

My Hacky Home Assistant Custom Components

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages