Bootloader info

Role

Read the power info from a device.

Prototype

URL : /device/{$id}/power-info

Method : GET

URL Params : {$id} : the DeviceId of the device. Use GET /devices to enumerate the connected devices.

Request data : None

Success Response

Code : 200 OK

Content : a POWER-INFO object, as specified below.

BOOTLOADER-INFO object definition

Field name Type Status Description
HasBattery boolean always Does the device have a battery?
HasPowerByNetwork boolean always Does the device support network phantom power (POE/PODL)?
HasPowerByUSB boolean always Does the device support being powered by USB?
HasExternalSupply boolean always Does the device have an external power input (jack or header)?
IsOnBattery boolean option Is the device currently running on its battery?
IsOnNetwork boolean option Is the device currently running over network phantom power?
IsOnExternalSupply boolean option Is the device currently running over the external power input?
UsbConnectedTo string option What is the USB power provider?
Possible values are unknown, host, charger, fastcharger,
BatteryStatus string option Is the battery charging or discharging?
Possible values are unknown, charging,discharging and full
BatteryLevel integer option Battery level (0-100 percent)
BatteryVoltage integer option Battery voltage in mV
BatteryCurrent integer option Battery current in mA
(value is > 0 if the battery is charging, < 0 if the battery is discharging)
BatteryTemperature integer option Battery temperature in °C
BatteryAccumulator integer option For diagnostics

Example

{
	"HasBattery": true,
	"HasPowerByNetwork": false,
	"HasPowerByUSB": true,
	"HasExternalSupply": false,
	"IsOnBattery": false,
	"IsOnNetwork": false,
	"IsOnUSB": true,
	"IsOnExternalSupply": false,
	"BatteryDirection": "Charging",
	"UsbConnectedTo": "Host",
	"BatteryDataValid": true,
	"BatteryLevel": 17,
	"BatteryVoltage": 3730,
	"BatteryCurrent": 30,
	"BatteryTemperature": 26,
	"BatteryAccumulator": 3649
}

Error Response

See Error Responses.