Offline Device Alerts

Last Updated on : 2026-02-04 02:05:33download

A device might get offline unexpectedly or not respond over the network after being paired. In this case, you can enable offline alerts for the device. If the device goes offline, it will send a notification to a specified user. To enable this feature, you can subscribe to push notifications.

API description

Check support for offline alerts

API description

export class TSmartDevice {
	 public async getOfflineReminderSupportStatus(): Promise<Object>
}

Sample code

const support = await this.device?.getOfflineReminderSupportStatus()
console.log("Check support for offline alerts:" + support)

Query status of offline alerts

API description

export class TSmartDevice {
	 public async getOfflineReminderStatus(): Promise<Object>
}

Sample code

const getRes = await this.device?.getOfflineReminderStatus()
console.log("Get offline alert status:" + getRes)

Set status of offline alerts

API description

export class TSmartDevice {
	 public async setOfflineReminder(status: boolean): Promise<Object>
}

Sample code

const setRes = await this.device?.setOfflineReminder(false)
console.log("Set offline alert status:" + setRes)