SmartGroupModel.onDeviceOnlineStatusUpdate(listener: Function)
Requires:
@ray-js/panel-sdk≥1.5.0
Description
Listen for smart group online status changes
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
listener | (data: OnlineStatusChanged) => number | Yes | Event callback that receives parameters containing device online status and related information |
Return Value
Type: number
Listener ID, used to cancel via offDeviceOnlineStatusUpdate
Referenced Types
type
OnlineStatusChangedDevice online/offline status change event callback parameters| Property | Type | Required | Description |
|---|---|---|---|
online | boolean | Yes | Online status |
deviceId | string | Yes | Device ID |
onlineType | number | Yes | Device online type (reserved for future use) Wi-Fi online 1 << 0 Local online 1 << 1 Bluetooth LE online 1 << 2 Bluetooth LE mesh online 1 << 3 |