Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
    • Browse by device type
    • Device capabilities
      • Common methods
      • Detection and alarms
      • Image
      • PTZ
      • Light
      • Recording
      • Audio
      • Media
      • Network
      • Power
        • Battery
        • Power saving / supply mode
          • power.mode.mode (Get power mode property)
          • power.mode.mode (Set power mode property)
          • power.mode.autoConstant (Get auto always-on property)
          • power.mode.autoConstant (Set auto always-on property)
          • power.mode.autoSave (Get auto power-saving property)
          • power.mode.autoSave (Set auto power-saving property)
          • power.mode.enterThreshold (Get enter power-mode threshold property)
          • power.mode.enterThreshold (Set enter power-mode threshold property)
          • power.mode.saveThreshold (Get power-saving level threshold property)
          • power.mode.saveThreshold (Set power-saving level threshold property)
          • power.mode.supplyState (Get device supply state property)
          • power.mode.state (Get power state property)
          • power.mode.vlog (Get VLog recording property)
          • power.mode.vlog (Set VLog recording property)
          • power.mode.switch (Supply state switch)
          • power.mode.changed (Power mode changed)
        • Sleep and wake
        • Outlet metering
      • Privacy
      • Call
      • Storage
      • System
      • Algorithm
      • Maintenance
      • Control
    • Events overview
    • Permission codes
    • Capability error codes
    • Alarm and capability messages
    • Capability FAQ
    • Legacy ability and push types
  • API reference
  • SDK and tools
  • Solutions
  • Platform and support
On this page
What it does
Reported fields
Example
Minimum permission

power.mode.changed (Power mode changed)

power.mode.changed: Power mode changed

power.mode.changed · device scope · message query permission Alarm

What it does

Reported when the power mode changes. msgType is power.mode.changed (compose event: multiple idents map to this leaf). After subscribing to capabilityEvent, push and pull use the same structure. See Receive device messages, setMessageCallback, Event catalog, and Overview and common payload.

Reported fields

outputData fields vary by model ident and may be {} (for example only electric, or empty); the table below is the common e_powerModeChange shape.

NameDescriptionTypeRequiredValues
modeMode (after switch).enumno0 auto; 1 power saving mode; 2 ultra power saving mode; 3 normal; 4 performance; 5 high performance; 6 custom; 7 standard; 8 continuous recording; 9 vlog recording; 10 long endurance
batteryBattery level. Range 0–100, step 1, unit %.intno0–100, step 1, unit %
electricBattery level. Range 0–100, step 1, unit %.intno0–100, step 1, unit %

Example

{
 "msgType": "power.mode.changed",
 "deviceId": "TESTIPC000012345",
 "productId": "56WGTET2",
 "outputData": {
 "mode": "1",
 "battery": 72
 },
 "time": 1673406989,
 "localTime": "20230111T111629",
 "alarmId": "116257862023505xxxx"
}

Minimum permission

The administrator does not need an extra permission on a device they bound. A shared device needs the alarm message permission. A bound sub-user does not. A sub-account needs Alarm. list / search filters out events you are not allowed to see. Power saving / supply mode.

power.mode.switch (Supply state switch)
power.sleep.status (Get sleep status property)