Changes for page 2 Script

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

From version 18.1
edited by Stone Wu
on 2022/07/25 11:32
Change comment: Renamed back-links.
To version 12.1
edited by Jim(Forgotten)
on 2022/07/09 17:02
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Stone
1 +XWiki.Jim
Content
... ... @@ -13,7 +13,7 @@
13 13  for example. addr_setshort(addr,num) Function: Write 16-bit signed decimal address
14 14  addr_getshort(addr) Function:Read 16-bit signed decimal address
15 15  addr_getword(string addr)Function: Read 16-bit unsigned decimal address
16 -More script function are in the second section of [[“V-BOX Script Interface Manual”>>doc:V-BOX.V-Net.04 Lua Script.01 Lua Functions.WebHome]]
16 +More script function are in the second section of [[“V-BOX Script Interface Manual”>>doc:V-BOX.V-Net.1\.User Manual.04 Lua Script.01 Lua Functions.WebHome]]
17 17  
18 18  == **1.2 Arithmetic** ==
19 19  
... ... @@ -277,7 +277,8 @@
277 277   FSE=addr_getbit("@B_25395#W2.04"),
278 278   AVVSVV=addr_getbit("@B_25395#W1.12"),
279 279   ICHT=addr_getbit("@B_25395#W3.06")
280 -\\ }
280 +
281 + }
281 281  \\ ~-~- ("@B_25395#CIO1.02")
282 282   mq.m:publish("mqtt-v-box-epsilon-fd300", json.encode(js) , 0, 0)
283 283   mq.m:publish("mqtt-v-box-epsilon-alarm-fd300", json.encode(jsAlarm) , 0, 0)
... ... @@ -754,67 +754,115 @@
754 754  }
755 755  {{/code}}
756 756  
757 -=== **Create things** ===
758 +1. **Create things**
758 758  
759 759  Click “Manage”~-~-->“Things”~-~-->“Create things”~-~-->“Create single thing”
760 760  
761 -[[image:image-20220709165402-6.png]]
762 762  
763 -[[image:image-20220709165402-7.png]]
763 +|
764 +| |[[image:image-20220709165402-6.png]]
764 764  
766 +|
767 +| |[[image:image-20220709165402-7.png]]
768 +
769 +|
770 +| |[[image:image-20220709165402-8.png]]
771 +
765 765  Name the thing~-~-->Click “Next”
766 766  
767 -[[image:image-20220709165402-8.png]]
768 768  
769 769  Select the way to create certificate
770 770  
771 -[[image:image-20220709165402-9.png]]
772 772  
778 +|
779 +| |[[image:image-20220709165402-9.png]]
780 +
773 773  Select policy
774 774  
775 -[[image:image-20220709165402-10.png]]
776 776  
777 -[[image:image-20220709165402-11.png]]
784 +|
785 +| |[[image:image-20220709165402-10.png]]
778 778  
779 779  
780 -=== **Test with MQTT.fx tool** ===
781 781  
789 +
790 +
791 +
792 +
793 +
794 +
795 +|
796 +| |[[image:image-20220709165402-11.png]]
797 +
798 +
799 +
800 +
801 +
802 +
803 +1. **Test with MQTT.fx tool**
804 +
782 782  Click “View Setting” to get the “Broker Adress”
783 783  
784 -[[image:image-20220709165402-13.png]]
785 785  
786 -[[image:image-20220709165402-12.png]]
808 +|
809 +| |[[image:image-20220709165402-12.png]]
787 787  
788 -Create one connection in MQTT.fx tool, set broker port as 8883.
811 +|
812 +| |[[image:image-20220709165402-13.png]]
789 789  
790 -[[image:image-20220709165402-14.png]]
791 791  
815 +
816 +
817 +
818 +
819 +
820 +
821 +|
822 +| |[[image:image-20220709165402-14.png]]
823 +
824 +Create one connection in MQTT.fx tool, set broker port as 8883.
825 +
792 792  Upload the CA File, Client Certificate File, Client Key File
793 793  
794 -[[image:image-20220709165402-15.png]]
795 795  
829 +|
830 +| |[[image:image-20220709165402-15.png]]
831 +
832 +
796 796  Publish message to topic “TEST”
797 797  
798 -[[image:image-20220709165402-17.png]]
799 799  
800 -Click”Test”~-~-->”MQTT test client”~-~-->”Subscrible to a topic”, to get message publish from MQTT.fx tool.
836 +|
837 +| |[[image:image-20220709165402-16.png]]
801 801  
802 -[[image:image-20220709173500-1.png]]
839 +|
840 +| |[[image:image-20220709165402-17.png]]
803 803  
842 +Click”Test”~-~-->”MQTT test client”~-~-->”Subscrible to a topic”, to get message publish from MQTT.fx tool.
843 +
804 804  And we can also send message form AWS platform to MQTT.fx tool.
805 805  
806 -[[image:image-20220709165402-18.png]]
807 807  
808 -=== **Configurate in CloudTool** ===
847 +|
848 +| |[[image:image-20220709165402-18.png]]
809 809  
850 +
851 +1. **Configurate in CloudTool**
852 +
810 810  Copy the same setting in MQTT.fx to MQTT configuration
811 811  
812 -[[image:image-20220709165402-19.png]]
813 813  
856 +|
857 +| |[[image:image-20220709165402-19.png]]
858 +
814 814   Add a lua script and copy the lua demo into it.
815 815  
816 -[[image:image-20220709165402-20.png]]
817 817  
862 +|
863 +| |[[image:image-20220709165402-20.png]]
864 +
865 +
866 +
818 818  sprint = print
819 819  
820 820  ~-~-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)
... ... @@ -995,6 +995,10 @@
995 995  
996 996  end
997 997  
1047 +
1048 +
998 998  Get message in AWS
999 999  
1000 -[[image:image-20220709165402-21.png]]
1051 +
1052 +|
1053 +| |[[image:image-20220709165402-21.png]]
image-20220709173500-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Jim
Size
... ... @@ -1,1 +1,0 @@
1 -1.5 MB
Content