home-assistant.io/source/_components/device_tracker.snmp.markdown
2019-02-23 22:08:06 +01:00

3.9 KiB

layout title description date sidebar comments sharing footer logo ha_category ha_release
page SNMP Instructions on how to integrate SNMP into Home Assistant. 2015-10-08 12:00 true false true true network-snmp.png Presence Detection 0.7.5

A lot of WiFi access points and WiFi routers support the Simple Network Management Protocol (SNMP). This is a standardized method for monitoring/manageing network connected devices. SNMP uses a tree-like hierarchy where each node is an object. Many of these objects contain (live) lists of instances and metrics, like network interfaces, disks, and WiFi registrations.

This device tracker needs SNMP to be enabled on the router. It could be that you need to install the SNMP support manually.

The following OID examples pull the current MAC Address table from a router. This reflects all recent devices seen on the network. However, since devices are not removed until they time out, this is less effective for device tracker component page than desirable. It is recommended to use Ping or Nmap instead.

Brand Device/Firmware OID
Aerohive AP230 1.3.6.1.4.1.26928.1.1.1.2.1.2.1.1
Apple Airport Express (2nd gen.) 7.6.9 1.3.6.1.2.1.3.1.1.2 or 1.3.6.1.2.1.4.22.1.2
Aruba IAP325 on AOS 6.5.4.8 1.3.6.1.4.1.14823.2.3.3.1.2.4.1.1
BiPAC 7800DXL Firmware 2.32e 1.3.6.1.2.1.17.7.1.2.2.1.1
DD-WRT unknown version/model 1.3.6.1.2.1.4.22.1.2
Mikrotik unknown RouterOS version/model 1.3.6.1.4.1.14988.1.1.1.2.1.1
Mikrotik RouterOS 6.x on RB2011 1.3.6.1.2.1.4.22.1.2
OpenWrt Chaos Calmer 15.05 1.3.6.1.2.1.4.22.1.2
OPNSense 19.1 1.3.6.1.2.1.4.22.1.2
pfSense 2.2.4 1.3.6.1.2.1.4.22.1.2
Ruckus ZoneDirector 9.13.3 1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1.6
TP-Link Archer VR2600v 1.3.6.1.2.1.3.1.1.2.19.1
TP-Link Archer VR600 1.3.6.1.2.1.3.1.1.2
Ubiquiti Edgerouter Lite v1.9.0 1.3.6.1.2.1.4.22.1.2

To use the SNMP version 1 or 2c platform in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry for SNMP version 1 or 2c
device_tracker:
  - platform: snmp
    host: 192.168.1.1
    community: public
    baseoid: 1.3.6.1.4.1.14988.1.1.1.2.1.1

If you want to use encryption, you must enable SNMP version 3 by adding authkey and privkey variables and enabling SNMP version 3 on your router. Currently only SHA1 is supported for authentication and AES for encryption. Example of SNMPv3 configuration:

# Example configuration.yaml entry for SNMP version 3
device_tracker:
  - platform: snmp
    host: 192.168.1.1
    community: USERNAME
    authkey: AUTHPASS
    privkey: PRIVPASS
    baseoid: 1.3.6.1.4.1.14988.1.1.1.2.1.1

{% configuration %} host: description: The IP address of the router, e.g., 192.168.1.1. required: true type: string community: description: The SNMP community which is set for the device. Most devices have a default community set to public with read-only permission (which is sufficient). required: true type: string baseoid: description: The OID prefix where wireless client registrations can be found, usually vendor specific. It's advised to use the numerical notation. To find this base OID, check vendor documentation or check the MIB file for your device. required: true type: string authkey: description: Authentication key for SNMPv3. Variable privkey must also be set. required: inclusive type: string privkey: description: Privacy key SNMPv3. Variable authkey must also be set. required: inclusive type: string {% endconfiguration %}

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