Skip to content

48: Power Info ​

See how much power is or has been used by the device, as well as current power usage and if the device is charging. Field availability depends on hardware, firmware and charging state. The conditional fields below describe firmware build 2644; do not assume that every device sends every field. Numeric values are little-endian. Integer fields may omit high zero bytes; float32 fields retain their four-byte IEEE 754 representation.

FieldNameDescriptionType
5MethodRequest a service to be perform an action
Possible values:
  • 1: SET— Set one or more values that are provided in the message payload.
  • 2: GET— Get values for the associated message type.
  • 3: SUBSCRIBE— Subscribe to values for the associated message type. Can be used in conjunction with other header fields to define the subscription parameters, such as Interval, Duration, Timeout, Storage Level and Message Level. If no interval is provided, messages will be sent as and when new data is available. Some data, such as GPS position, may require a set interval to be provided.
  • 5: UNSUBSCRIBE— Unsubscribe from a previous subscription.
uint8
This is an extract of header fields that are relevant to this message type, you can find them all documented in the Headers section.

Payload ​

FieldNameDescriptionTypeUnit
3Total power since profileAccumulated charge usage in mAh. In build 2644, starting a power-profile subscription
resets the shared accumulator; GET returns that same accumulator. Before any such reset
it covers usage since startup. Present only when current monitoring is available.
float32mAh
4CurrentInstantaneous Current power usagefloat32mA
5ChargingIs the device currently chargingbool
6External VoltageMeasured external voltage; omitted when the cached voltage is zero.float32V
7Total power since last TXCharge used since the last transmission; present only when the build has a current monitor and its current-usage object is available.float32mAh
8Charge CurrentFirmware-labelled cached charge-current value; present only while charging and when nonzero. Physical interpretation depends on the charger driver.float32mA
9Input CurrentFirmware-labelled cached input-current value; present only while charging and when nonzero.
On BQ2589x-based devices (including Viper 6 build 2644), this comes from REG13 IDPM_LIM:
the input-current limit in effect, not measured input current. Do not interpret it as
actual device consumption. Physical interpretation on other hardware depends on its charger driver.
float32mA
10Average CurrentAverage current in mA, rounded to the nearest integer and clamped to 0..65535.
In build 2644 this is always included, and is zero before current samples are available.
Uses the accumulated current-sampling window when nonempty, otherwise the previous
completed window (nominally 3 seconds). Encoded in one or two little-endian bytes.
uint16mA

Examples ​

Get request
Get response
Subscription Request
Subscription ACK
Subscription update, while on charge

Code ​

For convenience, the following constants can be used to reference this message type.