SmartGroupModel.getDevInfo

Requires:
@ray-js/panel-sdk≥1.5.0

Method signature
SmartGroupModel.getDevInfo()

Description

Get the first device information under the smart group and the data merged with the group

Parameters

None

Return Value

Type: DevInfo
Merged device information object, including group info and the first sub-device info

Referenced Types

typeDevInfoDevice information
PropertyTypeDescription
idCodesRecord<string, string>Mapping of dp id to dp code
codeIdsRecord<string, string>Mapping of dp code to dp id
capabilityCapabilityProduct communication capability bit flags, determined via bitwise operations, such as Wi‑Fi, Bluetooth, ZigBee, SigMesh, etc.

- Wi‑Fi (bit 0, decimal value: 1): Wi‑Fi
- Cable (bit 1, decimal value: 2): Wired
- GPRS (bit 2, decimal value: 4): similar to 2G networks
- NB‑IoT (bit 3, decimal value: 6): IoT SIM network
- Bluetooth (bit 10, decimal value: 1024): Bluetooth point‑to‑point
- BLEMesh (bit 11, decimal value: 2048): proprietary Bluetooth mesh
- ZigBee (bit 12, decimal value: 4096): 2.4 GHz band
- Infrared (bit 13, decimal value: 8192): Infrared
- 433 (subpieces) (bit 14, decimal value: 16384): 433 MHz
- SigMesh (bit 15, decimal value: 32768): Bluetooth standard mesh
- MCU (bit 16, decimal value: 65536): MCU
- SMesh (bit 17, decimal value: 131072): similar to ZigBee
- Cat1 (bit 20, decimal value: 1048576): usually uses 3G networks
- Beacon (bit 21, decimal value: 2097152): Bluetooth Beacon
- Thread (bit 25, decimal value: 33554432): Thread capability
devAttributeDevAttributeDevice capability bit flags, reported by firmware
Bit meanings:
- Bit 0: Whether the device supports zero‑config networking
- Bit 1: Device supports dp query protocol 31
- Bit 2: Whether the device has local automation capability
- Bit 3: Whether the device supports Wi‑Fi scanning
- Bit 4: Whether the device supports Google Local Home
- Bit 5: Whether the device supports fast provisioning
- Bit 6: Whether the device supports Bluetooth control
- Bit 7: Whether the device supports security capability
- Bit 8: Whether the device is a shared device
- Bit 9: Whether the device supports sunrise/sunset scheduling
- Bit 10: Whether the device supports fault replacement capability
- Bit 11: Whether the device supports OTA
- Bit 12: Whether the device supports Wi‑Fi backup switchover
- Bit 14: Device supports the Tuya standard protocol
- Bit 15: Device supports custom passthrough
- Bit 16: Whether the device supports industry capabilities
[]Product information, including schema and function definitions
Panel cloud configuration
typeCapability
export type Capability = number;
typeDevAttribute
export type DevAttribute = number;

Valid Values

DevInfo.schema.mode
ValueDescriptionSince
rw--
ro--
wr--
DevInfo.schema.property.type
ValueDescriptionSince
string--
bool--
value--
enum--
bitmap--
raw--
DevInfo.schema.type
ValueDescriptionSince
raw--
obj--
FunConfig.tyabirysr4_app
ValueDescriptionSince
follow--
--app-B1--
FunConfig.tyabis5d9w_app
ValueDescriptionSince
follow--
--app-M1--

Examples

Example

const devInfo = group.getDevInfo();
console.log(devInfo.name);  // Group name