diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index 49d8edf..0d45389 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -260,6 +260,22 @@ shell_command: pc_suspend: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@192.168.50.21 sudo /usr/sbin/pm-suspend' rest_command: + pikvm_login: + url: "http://192.168.1.5/logon.cgi" + method: POST + content_type: "application/x-www-form-urlencoded" +# payload: "username=admin&password=YOUR_PASSWORD_HERE&cpassword=&logon=Login" + payload: !secret switch_login_payload + pikvm_power_on: + url: "http://192.168.1.5/poe_port_config.cgi" + method: POST + content_type: "application/x-www-form-urlencoded" + payload: "name_pstate=2&name_ppriority=2&name_ppowerlimit=1&name_ppowerlimit2=&sel_6=1&applay=Apply" + pikvm_power_off: + url: "http://192.168.1.5/poe_port_config.cgi" + method: POST + content_type: "application/x-www-form-urlencoded" + payload: "name_pstate=1&name_ppriority=2&name_ppowerlimit=1&name_ppowerlimit2=&sel_6=1&applay=Apply" octoprint_connect: url: 'http://192.168.50.6:5000/api/connection' method: post @@ -462,6 +478,15 @@ switch: name: 'Thor WoL' mac: '5c:1b:f4:e4:52:11' broadcast_address: 192.168.50.254 + - platform: template + switches: + pikvm_poe: + turn_on: + - service: rest_command.pikvm_login + - service: rest_command.pikvm_power_on + turn_off: + - service: rest_command.pikvm_login + - service: rest_command.pikvm_power_off cover: - platform: group