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
        • Using capabilities
        • device.capability.list (List capabilities)
        • device.property.get (Read properties)
        • device.property.set (Write properties)
        • Invoke a service
      • Detection and alarms
      • Image
      • PTZ
      • Light
      • Recording
      • Audio
      • Media
      • Network
      • Power
      • 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
Invocation modes (discovery / v2 / legacy OpenAPI)
Run once
1. Check whether this device supports motion detection
2. Read the current switch
3. Turn the switch on

Device capabilities

Device capabilities

Once a device is bound, toggling settings, moving the PTZ, and receiving alarms all go through POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/{methodName}. The outer request body is id, system, and params. The id in examples on each page is the same sample request ID for side-by-side comparison; it is not a business field. For sign, see Development guide.

To see what a device supports, read or write configuration, or run an action, use the first four pages under Using capabilities:

GoalMethod namePage
List capabilities for this device or product modeldevice.capability.listList capabilities
Read multiple properties in one calldevice.property.getRead properties
Write multiple properties in one calldevice.property.setWrite properties
PTZ move, snapshot, and similar one-shot actionsdevice.service.invokeInvoke a service

Detection, PTZ, lighting, and other domains are in the sidebar. Capability events: Device messages, Receive device messages, and Receive alarm messages; legacy msgType values are in Event message types. Restart, Wi-Fi, time sync, upgrade, and related tasks are in Device maintenance. Device binding is in Device management.

Use an administrator, sub-user, or sub-account accessToken. Sub-account tokens: Get sub-account token; grants: Add sub-account permissions. Call limits: Limits and rates. Callback URLs: Push configuration. Sub-account and shared-device permissions apply per capability. On failure, check result.code in Global return codes.

Invocation modes (discovery / v2 / legacy OpenAPI)

  • Discovery: On a bound device, call device.capability.list with deviceId. To preview by model (e.g. before bind), use productId from device details (deviceId or productId required). Only propertyId / serviceId returned in the list should be used with v2 get/set/invoke.
  • Discovery-only leaves: pages marked discovery-only have no property/service examples—do not call get/set/invoke on them.
  • Public v2: “Run once” below and most capability subpages. For get/set/invoke, same as list: pass deviceId when bound; productId is optional (mismatch → DV2009).
  • Legacy OpenAPI: see Device capability integration and Legacy APIs.

Run once

Turn on motion detection on a bound device. You need an administrator, sub-user, or sub-account accessToken and the device serial number.

Channel-level calls must include channelId (often "0" on IPCs); omitting it returns DV2007. An administrator needs no extra permission on a device they bound. A shared device needs basic configuration permission. A bound sub-user does not. A sub-account needs Config. Other capabilities follow their own pages.

1. Check whether this device supports motion detection

POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.capability.list

{
 "id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
 "system": {
 "ver": "1.0",
 "appId": "lcdxxxxxxxxx",
 "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
 "time": 1706511734,
 "nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
 },
 "params": {
 "token": "<yourAccessToken>",
 "deviceId": "TESTIPC000012345",
 "channelId": "0"
 }
}

In result.data.capabilities, find the block with capabilityId detection.motion, confirm detection.motion.enabled is listed, and check that accessMode includes w.

2. Read the current switch

POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.get

Full request: Get motion detection enabled.

{
 "id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
 "system": {
 "ver": "1.0",
 "appId": "lcdxxxxxxxxx",
 "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
 "time": 1706511734,
 "nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
 },
 "params": {
 "token": "<yourAccessToken>",
 "deviceId": "TESTIPC000012345",
 "channelId": "0",
 "properties": ["detection.motion.enabled"]
 }
}

On success, result.code is "0" and data.properties["detection.motion.enabled"] is 0 or 1.

3. Turn the switch on

POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.set

Full request: Set motion detection enabled.

{
 "id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
 "system": {
 "ver": "1.0",
 "appId": "lcdxxxxxxxxx",
 "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
 "time": 1706511734,
 "nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
 },
 "params": {
 "token": "<yourAccessToken>",
 "deviceId": "TESTIPC000012345",
 "channelId": "0",
 "properties": {
 "detection.motion.enabled": 1
 }
 }
}

On success, result.code is "0" and data is {}. Read again to confirm the value is 1.

To receive motion alarms, subscribe to capabilityEvent in callbackFlag; see Receive device messages. Sensitivity, region, and schedule are on the motion detection pages (sidebar Detection and alarms → Motion). PTZ is under PTZ in the sidebar. On failure, check result.code: DV2007—add channelId; DV2004—check the value. If detection.motion.enabled is absent, list does not return that item. See Global return codes.