Add switch for turning power in PiKVM
This commit is contained in:
parent
567955f0e0
commit
a2c248bef6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user