I’ve tried this iDrac intergration
But it’s not fully compatible with iDrac 9, I don’t get power state of the server.
Instead, I’d like to make a simple on/off switch with status monitor. I’ve successfully test below:
//power consumption
root@amd:~# curl -s https://192.168.66.119/redfish/v1/Chassis/System.Embedded.1/Power -u root:passowrd --insecure | python3 -mjson.tool | grep "PowerInputWatts"
"PowerInputWatts": 8.828125,
"PowerInputWatts": 0.0,
//power state
root@amd:~# curl -s https://192.168.66.119/redfish/v1/Systems/System.Embedded.1 -u root:passowrd --insecure | python3 -mjson.tool | grep "PowerState"
"PowerState": "Off",
//power on
root@amd:~# curl -H "Content-Type: application/json" -X POST --data '{"Action": "Reset", "ResetType": "On"}' https://192.168.66.119/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset/ -u root:passowrd --insecure
//power off
root@amd:~# curl -H "Content-Type: application/json" -X POST --data '{"Action": "Reset", "ResetType": "GracefulShutdown"}' https://192.168.66.119/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset/ -u root:passowrd --insecure
Thanks in advance
1 post - 1 participant