Wiki source code of How to set threshold alarm and get Email notification
Last modified by Alec Chen on 2025/12/22 09:43
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
62.1 | 1 | = This tutorial aims to guide **ONLY tenant-level users **on how to configure alarm rules and set up email notifications for each device without writing code or modifying the rule chain. = |
| |
1.2 | 2 | |
| |
62.1 | 3 | |
| 4 | |||
| |
3.1 | 5 | {{toc/}} |
| |
1.2 | 6 | |
| |
45.1 | 7 | = 1. Import dashboard = |
| |
1.2 | 8 | |
| |
9.1 | 9 | The Dashboard shown below displays all devices by default. [[attach:set_alarm.json||target="_blank"]] |
| |
1.2 | 10 | |
| |
34.3 | 11 | [[image:https://wiki.thingseye.io/xwiki/bin/download/Downlink%20Command%20Guide/WebHome/1762933458042-294.png?width=645&height=565&rev=1.1||alt="1762933458042-294.png" height="898" width="1025"]] |
| |
1.2 | 12 | |
| |
8.1 | 13 | [[image:1763627459220-746.png]] |
| |
5.1 | 14 | |
| |
35.2 | 15 | |
| |
34.2 | 16 | Each device's threshold are managed separately. Clicking on a device in the device list on the left will display the current device status and preset thresholds/email addresses on the right. |
| |
5.1 | 17 | |
| |
44.1 | 18 | [[image:1763713260857-974.png||height="792" width="1029"]] |
| |
34.2 | 19 | |
| 20 | |||
| |
9.1 | 21 | ---- |
| 22 | |||
| |
45.1 | 23 | = (% id="cke_bm_9685S" style="display:none" %) (%%)2. Configure profile rules = |
| |
1.2 | 24 | |
| |
45.1 | 25 | == 2.1 Create a condition to trigger an alarm when a threshold is reached. == |
| |
1.2 | 26 | |
| |
34.3 | 27 | (% class="wikigeneratedid" id="H70B951FB7F168F9156FE68078FDB51657F168F916A215F0F5E7665B05EFA62A58B6689C45219" %) |
| |
45.1 | 28 | Click the edit icon to enter edit mode and create a new alarm rule. |
| |
1.2 | 29 | |
| |
34.3 | 30 | (% class="wikigeneratedid" id="H-1" %) |
| 31 | [[image:1763630110726-980.png||height="720" width="1014"]] | ||
| |
12.1 | 32 | |
| |
34.3 | 33 | [[image:1763630224004-924.png||height="720" width="1014"]] |
| |
1.2 | 34 | |
| |
34.3 | 35 | [[image:1763630671736-678.png||height="721" width="1015"]] |
| |
11.1 | 36 | |
| |
34.3 | 37 | [[image:1763630710302-584.png||height="721" width="1015"]] |
| |
12.1 | 38 | |
| |
34.3 | 39 | [[image:1763630805148-569.png||height="721" width="1015"]] |
| |
11.1 | 40 | |
| |
34.3 | 41 | [[image:1763630987781-241.png||height="721" width="1015"]] |
| |
11.1 | 42 | |
| |
37.1 | 43 | [[image:1763714060349-779.png||height="782" width="1016"]] |
| |
11.1 | 44 | |
| |
12.1 | 45 | |
| |
34.3 | 46 | [[image:1763631366289-693.png||height="720" width="1014"]] |
| |
12.1 | 47 | |
| |
34.3 | 48 | [[image:1763709709956-185.png||height="722" width="1015"]] |
| |
12.1 | 49 | |
| |
34.3 | 50 | |
| 51 | |||
| |
12.1 | 52 | ---- |
| 53 | |||
| |
45.1 | 54 | == 2.2 Set a clear condition to clear the alarm when the data returns to normal. == |
| |
12.1 | 55 | |
| |
45.1 | 56 | The steps are similar to Create alarm, only the values are set in reverse. |
| |
12.1 | 57 | |
| |
34.3 | 58 | [[image:1763632387865-386.png||height="720" width="1014"]] |
| |
12.1 | 59 | |
| |
34.3 | 60 | [[image:1763693498016-737.png||height="720" width="1014"]] |
| |
12.1 | 61 | |
| |
34.3 | 62 | [[image:1763693573052-369.png||height="723" width="1018"]] |
| |
12.1 | 63 | |
| |
34.3 | 64 | [[image:1763708672557-593.png||height="723" width="1017"]] |
| |
13.1 | 65 | |
| |
14.1 | 66 | |
| |
45.1 | 67 | **Save after set** |
| 68 | |||
| |
34.3 | 69 | [[image:1763708628399-171.png||height="723" width="1017"]] |
| |
29.1 | 70 | |
| |
34.3 | 71 | [[image:1763694048124-392.png||height="722" width="1017"]] |
| |
14.1 | 72 | |
| |
34.3 | 73 | [[image:1763694065009-504.png||height="722" width="1017"]] |
| |
1.2 | 74 | |
| 75 | |||
| |
34.3 | 76 | ---- |
| |
17.1 | 77 | |
| |
45.1 | 78 | = 3. Configure the threshold input box = |
| |
1.2 | 79 | |
| |
45.1 | 80 | == 3.1 Select the Realtime data key to display == |
| |
14.1 | 81 | |
| |
45.1 | 82 | Return to the dashboard and click on the device you want to edit. |
| |
36.1 | 83 | |
| 84 | [[image:1763714842488-945.png||height="784" width="1018"]] | ||
| 85 | |||
| 86 | [[image:1763715443568-173.png||height="784" width="1019"]] | ||
| 87 | |||
| |
15.2 | 88 | |
| |
45.1 | 89 | **Click "Edit mode" to enter edit mode.** |
| 90 | |||
| |
36.1 | 91 | [[image:1763715522992-941.png||height="785" width="1020"]] |
| |
15.2 | 92 | |
| |
36.1 | 93 | [[image:1763715545212-375.png||height="786" width="1021"]] |
| |
15.2 | 94 | |
| 95 | |||
| |
45.1 | 96 | **Delete the default key and select the key you want to display.** |
| |
17.4 | 97 | |
| |
42.2 | 98 | [[image:1763717628344-632.png||height="789" width="1024"]] |
| |
15.2 | 99 | |
| |
36.1 | 100 | |
| |
45.1 | 101 | **Save after confirmation.** |
| 102 | |||
| |
42.2 | 103 | [[image:1763717656075-762.png||height="790" width="1026"]] |
| |
36.1 | 104 | |
| |
42.2 | 105 | [[image:1763717678221-857.png||height="792" width="1029"]] |
| |
19.1 | 106 | |
| |
31.1 | 107 | |
| |
17.3 | 108 | ---- |
| 109 | |||
| |
45.1 | 110 | == 3.2 Create Threshold KEY == |
| |
15.2 | 111 | |
| |
45.1 | 112 | Enter edit mode and select the Threshold Setting component. |
| |
15.2 | 113 | |
| |
42.2 | 114 | [[image:1763717776928-677.png||height="794" width="1031"]] |
| |
15.2 | 115 | |
| |
42.2 | 116 | [[image:1763717871745-156.png||height="794" width="1031"]] |
| |
15.2 | 117 | |
| 118 | |||
| |
45.1 | 119 | **Save after add.** |
| 120 | |||
| |
42.2 | 121 | [[image:1763718016288-797.png||height="795" width="1033"]] |
| |
17.1 | 122 | |
| |
42.2 | 123 | [[image:1763718040563-785.png||height="797" width="1035"]] |
| |
40.1 | 124 | |
| |
34.3 | 125 | ---- |
| |
1.2 | 126 | |
| |
45.1 | 127 | == **3.3 Example** == |
| |
18.2 | 128 | |
| |
42.2 | 129 | [[image:1763718234145-302.png||height="799" width="1037"]] |
| |
18.2 | 130 | |
| |
34.3 | 131 | |
| |
45.1 | 132 | (% id="cke_bm_30710S" style="display:none" %) (%%)**Example of an alert email received:** |
| 133 | |||
| |
34.3 | 134 | [[image:1763707708365-348.png]] |
| 135 | |||
| 136 | |||
| 137 | |||
| |
17.3 | 138 | ---- |
| 139 | |||
| |
45.1 | 140 | = 4. Configure Notification (only required for initial use) = |
| |
1.2 | 141 | |
| |
45.1 | 142 | If this is the first time configuring the email sending function, you also need to configure the Notification to specify the recipient/template/sending rules. |
| |
34.1 | 143 | |
| |
45.1 | 144 | == 4.1 Configure Recipients == |
| |
2.1 | 145 | |
| |
21.1 | 146 | (% class="wikigeneratedid" id="H" %) |
| |
22.1 | 147 | [[image:1763695480359-924.png||height="721" width="1015"]] |
| |
2.1 | 148 | |
| |
21.1 | 149 | (% class="wikigeneratedid" id="H-1" %) |
| |
22.1 | 150 | [[image:1763696273020-168.png||height="721" width="1015"]] |
| |
2.1 | 151 | |
| |
21.1 | 152 | (% class="wikigeneratedid" id="H-2" %) |
| |
22.1 | 153 | [[image:1763696322001-489.png||height="721" width="1015"]] |
| |
2.1 | 154 | |
| |
21.1 | 155 | (% class="wikigeneratedid" %) |
| |
22.1 | 156 | [[image:1763696373932-724.png||height="722" width="1015"]] |
| |
2.1 | 157 | |
| 158 | |||
| |
22.1 | 159 | ---- |
| |
21.1 | 160 | |
| |
45.1 | 161 | == 4.2 Configuring Templates == |
| |
2.1 | 162 | |
| |
24.1 | 163 | [[image:1763704822528-793.png||height="721" width="1014"]] |
| |
2.1 | 164 | |
| |
45.1 | 165 | **Set Compose** |
| |
2.1 | 166 | |
| |
24.1 | 167 | (% class="box" %) |
| 168 | ((( | ||
| |
25.1 | 169 | **Web** |
| 170 | |||
| 171 | **Subjtct:**${alarmOriginatorName} ${alarmType} | ||
| 172 | |||
| 173 | **Message:**${alarmOriginatorName} alarmed ${alarmType} | ||
| 174 | |||
| 175 | **Email** | ||
| 176 | |||
| 177 | **Subjtct:**${alarmOriginatorName} ${alarmType} | ||
| 178 | |||
| 179 | |||
| 180 | **Message:**Hi ${recipientFirstName:capitalize} ${recipientLastName:lowerCase} | ||
| 181 | |||
| 182 | The ${alarmOriginatorName} alarmed ${alarmType} ,PLZ check | ||
| |
24.1 | 183 | ))) |
| |
2.1 | 184 | |
| |
25.1 | 185 | [[image:1763705354353-222.png||height="719" width="1012"]] |
| |
21.1 | 186 | |
| |
25.1 | 187 | [[image:1763705373057-540.png||height="719" width="1012"]] |
| |
21.1 | 188 | |
| 189 | |||
| |
25.1 | 190 | ---- |
| |
21.1 | 191 | |
| |
45.1 | 192 | == 4.3 Configure Notification Rules == |
| |
3.1 | 193 | |
| |
25.2 | 194 | [[image:1763705587312-647.png||height="719" width="1012"]] |
| |
3.1 | 195 | |
| |
25.2 | 196 | [[image:1763706113413-196.png||height="721" width="1015"]] |
| |
3.1 | 197 | |
| |
25.2 | 198 | [[image:1763706072650-624.png||height="722" width="1016"]] |
| |
3.1 | 199 | |
| |
25.2 | 200 | [[image:1763706241273-512.png||height="722" width="1016"]] |
| |
3.1 | 201 | |
| |
27.1 | 202 | [[image:1763707736962-945.png||height="723" width="1017"]] |
| |
3.1 | 203 | |
| 204 | |||
| |
51.1 | 205 | ---- |
| |
3.1 | 206 | |
| |
51.1 | 207 | = Extended content: = |
| |
27.1 | 208 | |
| |
45.1 | 209 | = 5. What if I want to send an email to a specific recipient? = |
| |
4.1 | 210 | |
| |
49.2 | 211 | Currently, it supports three recipient types: Platform users, Slack, and Microsoft Teams. You can create a user using the email address you want to receive emails from, and then select the recipient in Platform users -> UserList. |
| |
4.1 | 212 | |
| |
49.1 | 213 | [[image:1763970065522-362.png||height="550" width="1017"]] |
| |
4.1 | 214 | |
| |
49.1 | 215 | [[image:1763970125819-288.png||height="550" width="1017"]] |
| |
4.1 | 216 | |
| |
49.1 | 217 | [[image:1763970168381-554.png||height="551" width="1019"]] |
| |
4.1 | 218 | |
| |
49.1 | 219 | [[image:1763970202306-593.png||height="552" width="1021"]] |
| 220 | |||
| 221 | |||
| 222 | ---- | ||
| 223 | |||
| |
45.1 | 224 | = 6. How to set up a separate page for each device for easier management? = |
| |
4.1 | 225 | |
| |
61.1 | 226 | Suppose we have a batch of AQI sensors and a batch of Tank sensors. How do we display them on two different pages or put them into an existing dashboard? |
| |
33.1 | 227 | |
| |
56.3 | 228 | [[image:1764036365000-820.png||height="478" width="1022"]] |
| |
51.1 | 229 | |
| |
56.3 | 230 | |
| |
61.1 | 231 | Here, we will create a blank dashboard for demonstration purposes, and create two States (Pages) to distinguish and display two different types of devices. |
| |
56.3 | 232 | |
| 233 | [[image:1764036526739-442.png||height="413" width="1024"]] | ||
| 234 | |||
| 235 | [[image:1764036704323-344.png||height="790" width="1027"]] | ||
| 236 | |||
| 237 | [[image:1764036761564-457.png||height="791" width="1028"]] | ||
| 238 | |||
| 239 | [[image:1764036789723-542.png||height="792" width="1030"]] | ||
| 240 | |||
| 241 | |||
| |
61.1 | 242 | Add a button to the default page to navigate to different Stata instances. |
| |
56.3 | 243 | |
| |
56.4 | 244 | [[image:1764038418645-404.png||height="495" width="1032"]] |
| |
56.3 | 245 | |
| |
56.4 | 246 | [[image:1764038440153-893.png||height="506" width="1032"]] |
| |
56.3 | 247 | |
| |
56.4 | 248 | [[image:1764038459795-265.png||height="446" width="1032"]] |
| |
56.3 | 249 | |
| |
56.4 | 250 | [[image:1764038595799-636.png||height="795" width="1033"]] |
| |
56.3 | 251 | |
| |
59.1 | 252 | [[image:1764041017702-761.png||height="847" width="1034"]] |
| |
56.3 | 253 | |
| |
59.1 | 254 | [[image:1764041058281-147.png||height="848" width="1035"]] |
| 255 | |||
| |
56.4 | 256 | [[image:1764038663915-300.png||height="288" width="1036"]] |
| |
56.3 | 257 | |
| 258 | |||
| |
61.1 | 259 | Similarly, create an AQI alarm button. |
| |
56.3 | 260 | |
| |
56.4 | 261 | [[image:1764038720507-522.png||height="308" width="1035"]] |
| |
56.3 | 262 | |
| 263 | |||
| |
61.1 | 264 | Switch to Tank state |
| |
56.3 | 265 | |
| |
57.2 | 266 | [[image:1764038993771-632.png||height="361" width="1040"]] |
| |
56.3 | 267 | |
| 268 | |||
| |
61.1 | 269 | Open the Set Alarm dashboard in the new page and copy all the components there. |
| |
56.4 | 270 | |
| |
57.2 | 271 | [[image:1763627459220-746.png]] |
| |
56.4 | 272 | |
| |
57.2 | 273 | [[image:1764039091299-607.png||height="528" width="1028"]] |
| |
56.4 | 274 | |
| 275 | |||
| |
61.1 | 276 | Enter the component editing page and switch the device group to be displayed. |
| |
56.4 | 277 | |
| |
58.1 | 278 | [[image:1764039434202-995.png||height="496" width="1026"]] |
| |
56.4 | 279 | |
| |
58.1 | 280 | [[image:1764039490910-964.png||height="497" width="1028"]] |
| |
56.4 | 281 | |
| 282 | |||
| |
61.1 | 283 | Add a button to return to the initial page. |
| |
56.4 | 284 | |
| |
60.1 | 285 | [[image:1764041404181-108.png||height="839" width="1025"]] |
| |
57.2 | 286 | |
| |
60.1 | 287 | [[image:1764041446883-114.png||height="840" width="1026"]] |
| |
57.2 | 288 | |
| |
60.1 | 289 | [[image:1764041476537-950.png||height="682" width="1028"]] |
| 290 | |||
| 291 | [[image:1764041567433-493.png||height="842" width="1028"]] | ||
| 292 | |||
| 293 | |||
| |
61.1 | 294 | This completes the creation of a State page that only displays Tank-class devices. The AQI State configuration can be referenced from the Tank page. |
| |
60.1 | 295 | |
| 296 | [[image:1764041604908-185.png||height="843" width="1029"]] | ||
| 297 | |||
| 298 | |||
| |
59.1 | 299 |