Configure device alerting
The console provides a visualization feature for device alerting. You can specify the alert name, content, trigger rule, alert level, and push scope. When a device meets the specified conditions, an alert is triggered and pushed to your app or management backend. Device alerting is an optional configuration item that you can configure as needed.
Configure device alerting for a proprietary brand project
- Log on to the IoT Platform console.
- Go to the Human-Machine Interface page of the product.
- In the navigation pane on the left, click Device Alerting.
- Click Create Alert Rule.
- Configure the alert parameters in Chinese and click OK.
Parameter Name Description Alert name The name of the alert. Alert content Push alert content using a combination of text and parameter variables. Do not enter special characters, such as #, $, (, or ), in the text. In the parameter variables, n is an integer, and identifier must be an attribute identifier defined in the product features. Only the
${var}(attribute identifier) and${value.var}(attribute parameter identifier in an event) formats are supported. The var can contain only digits, letters, and underscores.Note- identifier is supported only for alert rules of the Property type. It is not supported for alert rules of the Device Status or Event type.
- After you configure the identifier parameter, the device must report the corresponding property. Otherwise, the property value is not displayed in the alert content even if the identifier is configured.
You can also insert the following macros in alerts.
#STRING_HEAD($identifier, n)Outputs the first n characters of $identifier.
#STRING_TAIL($identifier, n)Outputs the last n characters of $identifier.
#TSL_REPLACE($identifier1, $identifier2)Finds the related property and event definitions in the device's Thing Specification Language (TSL) model based on the value of identifier1. If the property is of the ENUM or BOOL type, the defined content is returned. To specify an event, set identifier2 to the event method name.
For example, in
#TSL_REPLACE($value.LockType, $value.DoorOpenNotification), LockType is the property name in the TSL model or the property value in a TSL event. The corresponding value is obtained based on the configured parameter. DoorOpenNotification is the specified event method name.#LOCK_USERNAME($identifier, $identifier, text)A macro specific to smart locks that is used to replace the lock user's nickname.
For example, in
#LOCK_USERNAME($value.KeyID, $value.LockType, 'User'), value is a static field. KeyID and LockType are the values of the TSL device properties that are called. If no value is obtained, the default value 'User' is returned.#DEVICE_NICKNAME()Configured as the device nickName. If nickName is empty, it is configured as the ProductName value.
#TIME_UTIL($alarmStartTime,'yyyy-MM-dd HH:mm:ss')The time when the alert message is triggered. yyyy-MM-dd HH:mm:ss is a customizable date format. The platform backend validates the format.
Alert rule Supports simple rules for properties and events, and event triggers for when devices go online or offline. - Event
- Property
- Device Status
Alert level - Reminder notification
- Minor issue
- Critical alert
Redirect URL The URL to which users are redirected when they receive a pushed alert message in the app. You can develop and set a custom redirect URL. When a user taps the pushed alert message, they are redirected to the alert details page.
Note Currently, only proprietary apps support custom redirect URLs for pushed alert messages. This feature is not supported by the Cloud Intelligence App.Currently, receiving extended fields for Android offline pushes requires an app SDK upgrade.
For more information about proprietary app development and SDK upgrades, see Configure custom redirection for message alerts.
Permission scope - Notify users:
- Message Center (Pushed to the Message Center. Can be received by querying in the app.)
- Application push (Pushed only to the phone's notification bar. Cannot be queried in the app.)
- Strong reminder (After the phone receives the notification, a strong vibration and sound reminder are triggered. This is used for more critical alerts. Users can enable or disable this feature.)
This option is displayed when Alert level is set to Critical alert. If you select Strong reminder and the consumer enables the strong reminder switch, the app receives a strong reminder with a pop-up window, an alert tone, and phone vibration when a critical message is pushed.
Note Currently, the strong reminder feature is supported only by the Cloud Intelligence App. It is not supported by proprietary apps.
- Notify backend: Manufacturers can view alerts in the .
Note For Link Visual products, in addition to the device alert rules, you must also configure video alert rules. For more information, see Develop Link Visual products. - (Optional) Select another language tab and configure the names for that language. The configuration method is the same as that for Chinese.
IoT Platform currently supports 24 languages, including Chinese (zh-CN), English (en-US), French (fr-FR), German (de-DE), Japanese (ja-JP), Korean (ko-KR), Spanish (es-ES), Russian (ru-RU), Italian (it-IT), Hindi (hi-IN), Portuguese (pt-PT), Polish (pl-PL), Dutch (nl-NL), Danish (da-dk), Czech (cs-CZ), Slovak (sk-SK), Swedish (sv-SE), Traditional Chinese (zh-Hant), Turkish (tr-TR), Hungarian (hu-HU), Vietnamese (vi-VN), Indonesian (in-ID), Arabic (ar-SA), and Thai (th-TH).
Note- If your device will be sold internationally, you must configure multiple languages, such as English. Otherwise, when the app language is switched, the app may display text in Chinese or show other inaccuracies.
- IoT Platform provides default multi-language configurations for some product categories under private brand projects, such as lights, sockets, and switches. You can use these configurations directly.
- To configure multiple languages for a private app, see the developer document Customize multiple languages for a private app.
Configure device alerting for a Tmall Genie ecosystem project
The IoT Platform provides preset device alerts for product categories in Tmall Genie ecosystem projects. By default, all device alerts are disabled. Follow these steps to enable alerts or set alert rules by modifying the alert parameters.
- Log on to the IoT Platform console.
- Go to the Human-Machine Interface page of the product.
- In the navigation pane on the left, click Device Alerting.
- Click the status switch of an alert or click the Edit button.
- In the Edit dialog box that appears, modify the alert parameters and click OK.
The parameters that you can modify depend on the alert rule. Follow the on-screen instructions. If all alert parameters are grayed out, they cannot be modified. In this case, click OK to enable the alert.