Appearance
Power Control Interface (power)
The Power Control (power) interface is implemented by devices that provide power management. This can include out-of-band management solutions like Intel AMT, smart plugs such as Shelly, or other devices capable of turning on, off, or restarting a system remotely.
The power interface is supported by the reboot interface which reboots a device. The power and reboot interfaces may be used together or separately depending on a devices power control capabilities.
PowerControlInterface
power
Get/set the Power State for the device:
Get
json
{
"msg": "io.upswell.xagent.ControlRequest",
"device": "<device alias>",
"method": "power",
"mid": "123abc"
}Accepts: None / Returns: PowerState
Set
json
{
"msg": "io.upswell.xagent.ControlRequest",
"device": "<device alias>",
"method": "power",
"data": {
"type": "ValueSetBoolean",
"value": true | false,
},
"mid": "123abc"
}Returns: ValueSetBoolean or PowerState depending on the device.
RebootInterface
reboot
Reboot the device:
json
{
"msg": "io.upswell.xagent.ControlRequest",
"device": "<device alias>",
"method": "reboot",
"mid": "123abc"
}Accepts: None / Returns: Ack or nothing if device reboots before sending an acknowledgement.
