Device Information

Last Updated on : 2024-06-05 03:14:36download

This topic describes the method that is used to get device information.

Name

TYSdk.devInfo

Description

Get device information.

Return parameter

Parameter Data type Description
DevInfo DevInfo The returned device information.

The following list describes common fields that indicate device information. For more information, see DefinitelyTyped.

  • name: the device name.
  • productId: the product ID.
  • uiId: the panel ID of the current product.
  • bv: the hardware baseline version.
  • devId: the device ID.
  • gwId: the gateway ID. For a single device, the value of devId is the value of gwId.
  • appOnline: indicate whether the app is online.
  • deviceOnline: indicate whether the device is online.
  • isLocalOnline: indicate whether the device is online on the local area network (LAN).
  • isShare: indicate whether to share the device.
  • groupId: the group device ID, used to check whether the device is a group device.
  • networkType: the network type of the device.
  • schema: the data point (DP) definition of the product to which the device belongs. For more information, see Function Definition.
  • state: the state of the DP.
  • capability: the capability type of the device. The value indicates the capabilities of the device, such as Zigbee, infrared, and Bluetooth.
Type Wi-Fi Cable GPRS NB-IoT Bluetooth LE Bluetooth LE mesh Zigbee Infrared 433 Bluetooth mesh
Number of binary digits 0 1 2 3 10 11 12 13 14 15
Capability value 1 2 4 8 1024 2048 4096 8192 16384 32768

Sample request

console.log('TYSdk.devInfo: ', TYSdk.devInfo);