I would like to remote start and shutdown a server. The server motherboard is from Asrock and has an IPMI interface, which I was able to address via Postman. Now I wanted to translate the Postman command into a HA rest_command. This is the rest_command:
asrock_central_commandpure:
url: https://xxx.xxx.xxx.xxx/redfish/v1/Chassis/Self/Actions/Chassis.Reset
method: POST
username: **********
password: **********
payload: '{"ResetType":"{{command}}"}'
content_type: "application/json"
verify_ssl: false
The variable “command” is given via a template switch:
- platform: template
switches:
asrock_central:
friendly_name: "Asrock Server"
value_template: "{{ is_state('binary_sensor.myserver', 'on') }}"
turn_on:
action: rest_command.asrock_central_command
data:
command: On
turn_off:
action: rest_command.asrock_central_command
data:
command: GracefulShutdown
Here I get always an error with SSL, so it seems that the “verify_sll: false” is ignored. As I am using OPNsense with HAproxy, I tried to construct a workaround and setup a ssl-verified connection via HAproxy:
asrock_central_command:
url: https://asrock.mydomain.org/redfish/v1/Chassis/Self/Actions/Chassis.Reset
method: POST
username: **********
password: **********
payload: '{"ResetType":"{{command}}"}'
content_type: "application/json"
And using the SSL verified connection, the rest_command works flawless. As I don’t want to rely on the the HAproxy and prefer to work with the IP directly, it would be better to get it somehow working with verify_ssl: false.
Am I doing something wrong? I have other rest_command were “verify_ssl: false” is working.