Changes for page 2 Script
Last modified by Devin Chen on 2025/12/10 10:32
From version 2.1
edited by Devin Chen
on 2025/09/05 11:50
on 2025/09/05 11:50
Change comment:
There is no comment for this version
To version 5.1
edited by Devin Chen
on 2025/09/09 11:17
on 2025/09/09 11:17
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,6 +4,3 @@ 1 -= = 2 - 3 - 4 4 = **1 General Script Demo** = 5 5 6 6 == **1.1 Address Operation** == ... ... @@ -32,8 +32,13 @@ 32 32 33 33 The following demo shows that when the alarm condition is reached: temp1 > 5 & temp2 >10 & temp3 < 20(lasts more than 5 seconds) , then send an "alarm trigger" sms. 34 34 35 -When the alarm condition is released,then send an "alarm release" sms. Script is as below:32 +When the alarm condition is released,then send an "alarm release" sms. 36 36 34 +Registers setting 35 +\\[[image:1757387490907-390.png]] 36 + 37 +Script is as below: 38 + 37 37 {{code language="lua"}} 38 38 function sms.main() 39 39 ------send condition------ ... ... @@ -53,11 +53,16 @@ 53 53 ------send sms & output Y0------ 54 54 if timer > 5 then 55 55 if tag == 0 then 56 - send_sms_ira("19859254700","alarm trigger") 58 + --send SMS to 2 recipients 59 + send_sms_ira("198****4700","alarm trigger") 60 + local id = send_sms_ira("187****3130","alarm trigger") 61 + --get the SMS state from ID 62 + local state = sms_get_state(id) 63 + addr_setword("@state",state) 57 57 addr_setbit("@Tag",1) 58 58 end 59 59 elseif tag == 1 then 60 -send_sms_ira("198 59254700","alarm release")67 +send_sms_ira("198****4700","alarm release") 61 61 addr_setbit("@Tag",0) 62 62 end 63 63 end ... ... @@ -563,7 +563,7 @@ 563 563 end 564 564 {{/code}} 565 565 566 -= **1.12 Get UTC timestamp and local timezone timestamp** = 573 +== **1.12 Get UTC timestamp and local timezone timestamp** == 567 567 568 568 This demo shows how to obtain UTC standard time from the V-Box and get the local time based on the device's time zone. 569 569
- 1757387490907-390.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.DevinChen - Size
-
... ... @@ -1,0 +1,1 @@ 1 +47.9 KB - Content