FAQ
FAQ
Listed in device.capability.list but set fails
| Symptom | Cause | Fix |
|---|---|---|
DV2011 | Sub-account missing code, or administrator on shared device without share permission | Permission codes |
DV2005 | Read-only item | Use the get page instead |
DV2007 | Missing channelId on channel scope, or sent on device scope | IPC channel scope still uses "0"; omit for device scope |
DV2004 | Value out of range or bool sent for switch | Switches: 0 / 1; see property page |
DV2003 | Device does not declare this item | Trust this device.capability.list response |
DV2014 | Object missing required members | Fill per list required |
DV2103 / DV2104 | Offline or timeout on v2 capability read/write/invoke | Wait online; low-power sleep: invoke power.sleep.wake first |
DV1007 | Offline or timeout on legacy OpenAPI paths (not v2 capability APIs) | Prefer v2 capability pages; if you still call legacy openapi, treat like device unreachable |
| Setting an action like a property | Actions have no persistent state | Use Invoke a service |
Switches use 0 / 1
Switches (numeric 0 / 1 in samples) take integers—not true/false or "0"/"1". Bool values return DV2004.
Exception: Named maintenance APIs such as device.wifi.current / device.wifi.control (m16–m18) use Boolean fields like linkEnable—follow each page’s samples; do not mix with property 0/1.
If samples show "0" / "1" as strings, they are enums—keep strings as on that page.
Reboot / Wi-Fi not in list
Reboot, time sync, Wi-Fi scan/connect, and upgrade have dedicated method names under Other capability APIs (including Wi-Fi Boolean fields). Detail, online state, and binding: Device management. The network.wifi domain is mostly signal/connection properties, not the m16–m18 paths.
List by model works; set on real device fails
List by model shows platform-supported items. Call device.capability.list again with deviceId on the device. Mismatched deviceId + productId returns DV2009.
Push msgType does not match
Capability event push requires capabilityEvent via setMessageCallback; then msgType is an eventId (e.g. detection.motion.detected). See the Event index and Receive alarm messages. Legacy alarm / deviceStatus string msgType values are in Event message types (legacy table); payload formats are in Event message format (legacy copy).
Message time query returns nothing
beginTime / endTime are device-local yyyyMMddTHHmmss, not Unix seconds from system.time. See Query alarm history.
Configure sleeping device fails
Invoke device.service.invoke with serviceId power.sleep.wake (inputData {}), then configure. Permission Config. See Sleep and wake.
One set mixes device-level and channel-level
Returns DV2008. Split into two requests.
