Hey folks,
I’ve got Home Assistant installed on Proxmox with the qcow2 image.
I’ve read a few threads like this:
And I am still stuck trying to get my switch to work.
My snmp sensor works:
sensor:
- platform: snmp
name: POM PDU 8
accept_errors: true
host: 192.168.88.143
baseoid: 1.3.6.1.4.1.17420.1.2.9.8.13.0
value_template: "
{%if value == '1,-1,-1,-1,-1,-1,-1,-1'%}
On
{% else %}
Off
{% endif %}
"
This works:
But when I try to use this:
switch:
- platform: command_line
switches:
pom_pdu_8:
friendly_name: POM PDU 8
command_on: snmpset -c public -v 1 192.168.88.143 .1.3.6.1.4.1.17420.1.2.9.8.13.0 string "1,-1,-1,-1,-1,-1,-1,-1"
command_off: snmpset -c public -v 1 192.168.88.143 .1.3.6.1.4.1.17420.1.2.9.8.13.0 string "0,-1,-1,-1,-1,-1,-1,-1"
I get this:
2022-09-29 21:43:39.648 ERROR (SyncWorker_3) [homeassistant.components.command_line] Command failed (with return code 127): snmpset -c public -v 1 192.168.88.143 .1.3.6.1.4.1.17420.1.2.9.8.13.0 string "0,-1,-1,-1,-1,-1,-1,-1"
2022-09-29 21:43:39.651 ERROR (SyncWorker_3) [homeassistant.components.command_line.switch] Command failed: snmpset -c public -v 1 192.168.88.143 .1.3.6.1.4.1.17420.1.2.9.8.13.0 string "0,-1,-1,-1,-1,-1,-1,-1"
Any help much appreciated.