Changes for page 2 Script

Last modified by Devin Chen on 2025/12/10 10:32

From version 4.1
edited by Devin Chen
on 2025/09/09 11:11
Change comment: There is no comment for this version
To version 2.1
edited by Devin Chen
on 2025/09/05 11:50
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,6 @@
1 += =
2 +
3 +
1 1  = **1 General Script Demo** =
2 2  
3 3  == **1.1 Address Operation** ==
... ... @@ -29,11 +29,8 @@
29 29  
30 30  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.
31 31  
32 -When the alarm condition is released,then send an  "alarm release" sms.
33 -\\[[image:1757387490907-390.png]]
35 +When the alarm condition is released,then send an  "alarm release" sms. Script is as below:
34 34  
35 -Script is as below:
36 -
37 37  {{code language="lua"}}
38 38  function sms.main()
39 39  ------send condition------
... ... @@ -53,16 +53,11 @@
53 53  ------send sms & output Y0------
54 54  if timer > 5 then
55 55   if tag == 0 then
56 - --send SMS to 2 recipients
57 - send_sms_ira("198****4700","alarm trigger")
58 - local id = send_sms_ira("187****3130","alarm trigger")
59 - --get the SMS state from ID
60 - local state = sms_get_state(id)
61 - addr_setword("@state",state)
56 + send_sms_ira("19859254700","alarm trigger")
62 62   addr_setbit("@Tag",1)
63 63   end
64 64  elseif tag == 1 then
65 -send_sms_ira("198****4700","alarm release")
60 +send_sms_ira("19859254700","alarm release")
66 66  addr_setbit("@Tag",0)
67 67  end
68 68  end
... ... @@ -568,7 +568,7 @@
568 568  end
569 569  {{/code}}
570 570  
571 -== **1.12 Get UTC timestamp and local timezone timestamp** ==
566 += **1.12 Get UTC timestamp and local timezone timestamp** =
572 572  
573 573  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.
574 574  
1757387490907-390.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.DevinChen
Size
... ... @@ -1,1 +1,0 @@
1 -47.9 KB
Content