snmp switch platform allows you to control SNMP-enabled equipment.
Currently, only SNMP OIDs that accept integer values are supported. SNMP v1 and v2c are supported. SNMP v3 is not supported.
To use an SNMP switch in your installation:
# Example configuration.yaml entry: switch: - platform: snmp host: 192.168.0.2 baseoid: 188.8.131.52.4.1.198184.108.40.206.4.0
- baseoid (Required): The SNMP BaseOID which to poll for the state of the switch.
command_oid (Optional): The SNMP OID which to set in order to turn the switch on and off, if different from
host (Optional): The IP/host which to control. Defaults to
port (Optional): The port on which to communicate. Defaults to
community (Optional): community string to use for authentication. Defaults to
version (Optional): SNMP version to use - either
2c. Defaults to
payload_on (Optional): What return value represents an
Onstate for the switch. The same value is used in writes to turn on the switch if
command_payload_onis not set. Defaults to
payload_off (Optional): What return value represents an
Offstate for the switch. The same value is used in writes to turn off the switch if
command_payload_offis not set. Defaults to
command_payload_on (Optional): The value to write to turn on the switch, if different from
command_payload_off (Optional): The value to write to turn off the switch, if different from
You should check with your device’s vendor to find out the correct BaseOID and what values turn the switch on and off.
A complete example:
switch: - platform: snmp name: SNMP switch host: 192.168.0.2 community: private baseoid: 220.127.116.11.4.1.19818.104.22.168.4.0 payload_on: 1 payload_off: 0