getDeviceStatus()
Requires:
@ray-js/lock-sdk≥1.0.0
Description
Read the device's overall status (online/sleep, etc.).
Parameters
None
Return Value
Type: DeviceStatus
Device status object
DeviceStatus
| Property | Type | Description |
|---|---|---|
type | "offline" | "online" | "sleep" | Overall status: Online / Offline / Sleep |
connectEnable | boolean | Whether users are allowed to initiate a connection manually (e.g., BLE) |
onlineTypes | "local" | "cloud" | "ble" | "localMatter" | "yuChannel" | "unknown"[] | Online channel list (bit semantics expanded by the platform into an array) local Local network online cloud Cloud online ble Bluetooth online localMatter Matter local network online yuChannel Cloud bridge online unknown Unknown |
| Sleep window (sleep only) | ||
isWifiActive | boolean | Whether the Wi-Fi module is powered on and running |
isWifiMatter | boolean | Whether Wi-Fi supports the Matter solution |
isActiveThread | boolean | Whether the Thread channel is activated |
isShareThread | boolean | Whether it is a shared Thread device |
Valid Values
return.type
| Value | Description | Since |
|---|---|---|
offline | - | - |
online | - | - |
sleep | - | - |
return.onlineTypes
| Value | Description | Since |
|---|---|---|
local | - | - |
cloud | - | - |
ble | - | - |
localMatter | - | - |
yuChannel | - | - |
unknown | - | - |