Changes for page 2 Script

Last modified by Devin Chen on 2025/06/06 14:03

From version 15.1
edited by Leo Wei
on 2022/07/09 17:44
Change comment: There is no comment for this version
To version 13.1
edited by Leo Wei
on 2022/07/09 17:41
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -46,18 +46,18 @@
46 46  local tag = addr_getbit("@Tag")
47 47  ------lasting time------
48 48  if temp1 > 5 and temp2 > 10 and temp3 < 20 then
49 - timer = timer + 1
50 - addr_setword("@Timer",timer)
49 +    timer = timer + 1
50 +    addr_setword("@Timer",timer)
51 51  else
52 - timer = 0
53 - addr_setword("@Timer",timer)
52 +    timer = 0
53 +    addr_setword("@Timer",timer)
54 54  end
55 55  ------send sms & output Y0------
56 56  if timer > 5 then
57 - if tag == 0 then
58 - send_sms_ira("19859254700","alarm trigger")
59 - addr_setbit("@Tag",1)
60 - end
57 +    if tag == 0 then
58 +        send_sms_ira("19859254700","alarm trigger")
59 +        addr_setbit("@Tag",1)
60 +    end
61 61  elseif tag == 1 then
62 62  send_sms_ira("19859254700","alarm release")
63 63  addr_setbit("@Tag",0)
... ... @@ -797,11 +797,15 @@
797 797  
798 798  
799 799  
800 +
801 +
800 800  |
801 801  | |[[image:image-20220709165402-11.png]]
802 802  
803 803  
804 804  
807 +
808 +
805 805  1. **Test with MQTT.fx tool**
806 806  
807 807  Click “View Setting” to get the “Broker Adress”
... ... @@ -817,6 +817,8 @@
817 817  
818 818  
819 819  
824 +
825 +
820 820  |
821 821  | |[[image:image-20220709165402-14.png]]
822 822  
... ... @@ -859,6 +859,7 @@
859 859  |
860 860  | |[[image:image-20220709165402-20.png]]
861 861  
868 +
862 862  sprint = print
863 863  
864 864  ~-~-Cloud mode interface to obtain the MQTT information configured by the cloud platform: (5 returns, namely the server address, client ID, connection table, last word table, certificate table)