Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 1.75 KB

device_tracker.ubus.markdown

File metadata and controls

72 lines (57 loc) · 1.75 KB
layout title description date sidebar comments sharing footer logo ha_category ha_release
page
OpenWRT (ubus)
Instructions how to integrate OpenWRT routers into Home Assistant.
2015-03-23 19:59
true
false
true
true
openwrt.png
Presence Detection
0.7.6

This is one of the two ways we support OpenWRT. If you encounter problems, try luci.

This is a presence detection scanner for OpenWRT using ubus.

Before this scanner can be used you have to install the ubus RPC package on OpenWRT:

opkg install rpcd-mod-file

And create a read-only user to be used by setting up the ACL file /usr/share/rpcd/acl.d/user.json.

{
  "user": {
    "description": "Read only user access role",
    "read": {
      "ubus": {
        "*": [ "*" ]
      },
      "uci": [ "*" ]
    },
    "write": {}
  }
}

Restart the services.

# /etc/init.d/rpcd restart && /etc/init.d/uhttpd restart

Check if the file namespaces is registered with the RPC server.

# ubus list | grep file
file

After this is done, add the following to your configuration.yaml file:

# Example configuration.yaml entry
device_tracker:
  platform: ubus
  host: ROUTER_IP_ADDRESS
  username: YOUR_ADMIN_USERNAME
  password: YOUR_ADMIN_PASSWORD

Configuration variables:

  • host (Required): The IP address of your router, eg. 192.168.1.1.
  • username (Required): The username of an user with administrative privileges, usually root.
  • password (Required): The password for your given account.

See the device tracker component page for instructions how to configure the people to be tracked.