Get Battery Information

Menu: getBatteryInfo

Flutter Example:

/// Get battery information event number
getBatteryInfo(
  evtBase: _VBusEvtBase.base_app_get,
  evtType: _VBusEvtType.app_get_batt_info),

/// Get battery information
libManager.send(evt: CmdEvtType.getBatteryInfo, json: jsonEncode(json));

JSON Fields Received by the App:

Field Name Field Type Field Description
type int Battery type: 0: Rechargeable lithium battery, 1: Button battery
voltage int Voltage
status int Battery status
0: Normal
1: Charging
2: Charging complete
3: Low battery
level int Level
last_charging_year int Last charging time, year
last_charging_month int Last charging time, month
last_charging_day int Last charging time, day
last_charging_hour int Last charging time, hour
last_charging_minute int Last charging time, minute
last_charging_second int Last charging time, second
mode int 0: Invalid
1: Normal mode (non-power saving mode)
2: Power saving mode

Example:

{
  "last_charging_day" : 0,
  "last_charging_hour" : 158,
  "last_charging_minute" : 66,
  "last_charging_month" : 0,
  "last_charging_second" : 0,
  "last_charging_year" : 0,
  "level" : 100,
  "mode" : 0,
  "status" : 0,
  "type" : 0,
  "voltage" : 4317
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2025-04-30 09:32:44

results matching ""

    No results matching ""