getDeviceInfo(params: Object)
Requires:
DeviceKit≥1.2.6@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
Description
Get device information
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | deviceId device ID Supports fetching other devices’ information across panels; the current panel can pass the current device’s ID to retrieve it |
| No | dps | ||
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | DeviceKit Since |
|---|---|---|---|
roomName | string | Room name where the device is located | v3.6.0 |
| Contains product info, schema, and function definitions | v3.3.0 | ||
| dps Device DP states; use the corresponding dpid to get specific state values for business logic | v3.3.0 | ||
attribute | number | attribute Product attribute definition. The corresponding configuration can be found on the backend-ng platform; managed via bitwise operations. | v3.3.0 |
baseAttribute | number | baseAttribute Basic product attribute definitions | v3.5.0 |
capability | number | capability Product capability value. On the backend-ng platform you can query the corresponding selections; overall business logic is partitioned based on this data. Device types can also be adjusted based on this attribute; managed using bitwise operations. | v3.3.0 |
| dpName Custom name of the dp, typically used in the panel | v3.3.0 | ||
ability | number | ability Seldom used; distinguishes special device types | v3.3.0 |
icon | string | icon Device icon URL | v3.3.0 |
devId | string | devId Device unique ID | v3.3.0 |
verSw | string | verSw Device firmware version | v3.3.0 |
isShare | boolean | isShare Whether the device is shared; true means shared | v3.3.0 |
bv | string | bv Device baseline version | v3.3.0 |
uuid | string | uuid Unique firmware identifier | v3.3.0 |
| panelConfig Configuration items in the product panel; usually viewable on the IoT platform | v3.3.0 | ||
activeTime | number | activeTime Device activation time, timestamp | v3.3.0 |
devAttribute | number | devAttribute Business capability extensions represented with bitwise flags | v3.3.0 |
pcc | string | pcc Classification identifier for Thing in-house Bluetooth mesh products | v3.3.0 |
nodeId | string | nodeId Short address of the sub-device | v3.3.0 |
parentId | string | parentId Parent node ID; typically present for sub-devices or Bluetooth Mesh devices, used internally to locate the related gateway or upstream model for processing | v3.3.0 |
category | string | category Product category | v3.3.0 |
| standSchemaModel Standard product function set definition model | v3.3.0 | ||
productId | string | productId Product ID of the device | v3.3.0 |
productVer | string | productVer Product version of the device | v4.3.6 |
bizAttribute | number | bizAttribute Business attribute capability | v3.3.0 |
meshId | string | meshId Bluetooth Mesh ID for the device | v3.3.0 |
sigmeshId | string | [Deprecated] sigmeshId Bluetooth Mesh ID corresponding to the device's industry attribute | v3.3.0 |
| meta Custom configuration meta attributes of the device, used to store business data | v3.3.0 | ||
isLocalOnline | boolean | isLocalOnline Whether the device is online on the local LAN | v3.3.0 |
isCloudOnline | boolean | Device cloud online status | v3.3.0 |
isOnline | boolean | isOnline Overall online status; if any state is online, the device is considered online (composite online status) | v3.3.0 |
name | string | name Device name | v3.3.0 |
groupId | string | groupId Group ID the device belongs to; empty string when not in a group | v3.3.0 |
| dpCodes Standard function set code | v3.3.0 | ||
devTimezoneId | string | Time zone information | v3.3.0 |
| Execution time of the device's DP | v3.3.0 | ||
latitude | string | Device latitude | v3.3.0 |
longitude | string | Device longitude | v3.3.0 |
ip | string | Device IP address | v3.3.0 |
isVirtualDevice | boolean | Whether it is a virtual device | v3.3.0 |
isZigbeeInstallCode | boolean | Whether this is a Zigbee Install Code gateway | v3.3.0 |
protocolAttribute | number | Sub-device activation capability flag bit | v3.3.0 |
connectionStatus | number | Connection status, Nearby status | v3.3.0 |
mac | string | Some devices require a MAC for unique identification, e.g., Mesh | v3.3.0 |
bluetoothCapability | string | Bluetooth device capability value, reported by the device | v3.3.0 |
isTripartiteMatter | boolean | Whether it is a third-party Matter device | v3.6.0 |
isGW | boolean | Whether it is a gateway device | v3.6.0 |
isSupportGroup | boolean | Whether groups are supported | v3.6.0 |
isZigBeeSubDev | boolean | Whether it is a Zigbee sub-device | v3.6.0 |
cadv | string | cadv version number | v3.6.0 |
isSupportOTA | boolean | Whether the device supports OTA | v3.6.0 |
iconUrl | string | Device icon | v3.6.0 |
hasWifi | boolean | Whether the device has a Wi‑Fi module | v3.6.0 |
switchDp | number | Quick control dp | v3.7.0 |
switchDps | number[] | Quick control dp | v3.7.0 |
wifiEnableState | number | Status of the device's Wi-Fi module: 1 = Unavailable, 2 = Available | v4.0.0 |
| Device product configuration | v4.0.0 | ||
isMatter | boolean | Whether it is a Matter device | v4.0.0 |
isSupportLink | boolean | Whether the device supports dual control | v4.0.0 |
isSupportAppleHomeKit | boolean | Whether the device supports being added to Apple Home | v4.0.0 |
attributeString | string | attribute formatted binary string Product attribute definition. The corresponding configuration can be found on the backend-ng platform; managed via bitwise operations. | v4.0.0 |
extModuleType | number | Type of the device's expansion module 0: No expansion module 1: An expansion module exists (device is BLE+X) 2: Expansion module is a Wi-Fi module (device is BLE+Wi-Fi) | v4.3.4 |
isRelayOpen | boolean | Whether the mesh device's relay function is enabled | v4.6.1 |
isProxyOpen | boolean | Whether the mesh device's proxy function is enabled | v4.6.1 |
isSupportProxyAndRelay | boolean | Whether the mesh device supports proxy and relay | v4.6.1 |
yuNetState | number | Device Dayu channel user enable status: 0 = disabled, 1 = enabled | v4.11.0 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None