Skip to content

Commit 506526f

Browse files
kirichkovfabaff
authored andcommitted
Adds documentation for SNMP switch (home-assistant#3598)
* Adds documentation for SNMP switch * Grammar fixes * Update 'ha_release'
1 parent cc591fc commit 506526f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: page
3+
title: "SNMP Switch"
4+
description: "Instructions on how to integrate SNMP switches into Home Assistant."
5+
date: 2017-10-12 08:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: network-snmp.png
11+
ha_category: Switch
12+
ha_iot_class: "Local Polling"
13+
ha_release: 0.57
14+
---
15+
16+
The `snmp` switch platform allows you to control SNMP-enabled equipment.
17+
18+
Currently, only SNMP OIDs that accept integer values are supported. SNMP v1 and v2c are supported. SNMP v3 is **not** supported.
19+
20+
To use an SNMP switch in your installation:
21+
22+
```yaml
23+
# Example configuration.yaml entry:
24+
switch:
25+
- platform: snmp
26+
host: 192.168.0.2
27+
baseoid: 1.3.6.1.4.1.19865.1.2.1.4.0
28+
```
29+
30+
Configuration variables:
31+
32+
- **baseoid** (*Required*): The SNMP BaseOID which to poll for the state of the switch and which to set in order to turn the switch on and off.
33+
- **host** (*Optional*): The IP/host which to control. Defaults to `localhost`.
34+
- **port** (*Optional*): The port on which to communicate. Defaults to `161`.
35+
- **community** (*Optional*): community string to use for authentication. Defaults to `private`.
36+
- **version** (*Optional*): SNMP version to use - either `1` or `2c`. Defaults to `1`.
37+
- **payload_on** (*Optional*): What return value represents an `On` state for the switch. The same value is used in writes to turn on the switch. Defaults to `1`.
38+
- **payload_off** (*Optional*): What return value represents an `Off` state for the switch. The same value is used in writes to turn off the switch. Defaults to `0`.
39+
40+
You should check with your device's vendor to find out the correct BaseOID and what values turn the switch on and off.
41+
42+
A complete example:
43+
44+
```yaml
45+
switch:
46+
- platform: snmp
47+
name: SNMP switch
48+
host: 192.168.0.2
49+
community: private
50+
baseoid: 1.3.6.1.4.1.19865.1.2.1.4.0
51+
payload_on: 1
52+
payload_off: 0
53+
```

0 commit comments

Comments
 (0)