Changes for page 2 Script

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

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

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Jim
1 +XWiki.Stone
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.1\.User Manual.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.04 Lua Script.01 Lua Functions.WebHome]]
17 17  
18 18  == **1.2 Arithmetic** ==
19 19  
... ... @@ -277,8 +277,7 @@
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 -
281 - }
280 +\\ }
282 282  \\ ~-~- ("@B_25395#CIO1.02")
283 283   mq.m:publish("mqtt-v-box-epsilon-fd300", json.encode(js) , 0, 0)
284 284   mq.m:publish("mqtt-v-box-epsilon-alarm-fd300", json.encode(jsAlarm) , 0, 0)
... ... @@ -755,115 +755,67 @@
755 755  }
756 756  {{/code}}
757 757  
758 -1. **Create things**
757 +=== **Create things** ===
759 759  
760 760  Click “Manage”~-~-->“Things”~-~-->“Create things”~-~-->“Create single thing”
761 761  
761 +[[image:image-20220709165402-6.png]]
762 762  
763 -|
764 -| |[[image:image-20220709165402-6.png]]
763 +[[image:image-20220709165402-7.png]]
765 765  
766 -|
767 -| |[[image:image-20220709165402-7.png]]
768 -
769 -|
770 -| |[[image:image-20220709165402-8.png]]
771 -
772 772  Name the thing~-~-->Click “Next”
773 773  
767 +[[image:image-20220709165402-8.png]]
774 774  
775 775  Select the way to create certificate
776 776  
771 +[[image:image-20220709165402-9.png]]
777 777  
778 -|
779 -| |[[image:image-20220709165402-9.png]]
780 -
781 781  Select policy
782 782  
775 +[[image:image-20220709165402-10.png]]
783 783  
784 -|
785 -| |[[image:image-20220709165402-10.png]]
777 +[[image:image-20220709165402-11.png]]
786 786  
787 787  
780 +=== **Test with MQTT.fx tool** ===
788 788  
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 -
805 805  Click “View Setting” to get the “Broker Adress”
806 806  
784 +[[image:image-20220709165402-13.png]]
807 807  
808 -|
809 -| |[[image:image-20220709165402-12.png]]
786 +[[image:image-20220709165402-12.png]]
810 810  
811 -|
812 -| |[[image:image-20220709165402-13.png]]
813 -
814 -
815 -
816 -
817 -
818 -
819 -
820 -
821 -|
822 -| |[[image:image-20220709165402-14.png]]
823 -
824 824  Create one connection in MQTT.fx tool, set broker port as 8883.
825 825  
790 +[[image:image-20220709165402-14.png]]
791 +
826 826  Upload the CA File, Client Certificate File, Client Key File
827 827  
794 +[[image:image-20220709165402-15.png]]
828 828  
829 -|
830 -| |[[image:image-20220709165402-15.png]]
831 -
832 -
833 833  Publish message to topic “TEST”
834 834  
798 +[[image:image-20220709165402-17.png]]
835 835  
836 -|
837 -| |[[image:image-20220709165402-16.png]]
838 -
839 -|
840 -| |[[image:image-20220709165402-17.png]]
841 -
842 842  Click”Test”~-~-->”MQTT test client”~-~-->”Subscrible to a topic”, to get message publish from MQTT.fx tool.
843 843  
802 +[[image:image-20220709173500-1.png]]
803 +
844 844  And we can also send message form AWS platform to MQTT.fx tool.
845 845  
806 +[[image:image-20220709165402-18.png]]
846 846  
847 -|
848 -| |[[image:image-20220709165402-18.png]]
808 +=== **Configurate in CloudTool** ===
849 849  
850 -
851 -1. **Configurate in CloudTool**
852 -
853 853  Copy the same setting in MQTT.fx to MQTT configuration
854 854  
812 +[[image:image-20220709165402-19.png]]
855 855  
856 -|
857 -| |[[image:image-20220709165402-19.png]]
858 -
859 859   Add a lua script and copy the lua demo into it.
860 860  
816 +[[image:image-20220709165402-20.png]]
861 861  
862 -|
863 -| |[[image:image-20220709165402-20.png]]
864 -
865 -
866 -
867 867  sprint = print
868 868  
869 869  ~-~-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)
... ... @@ -1044,10 +1044,6 @@
1044 1044  
1045 1045  end
1046 1046  
1047 -
1048 -
1049 1049  Get message in AWS
1050 1050  
1051 -
1052 -|
1053 -| |[[image:image-20220709165402-21.png]]
1000 +[[image:image-20220709165402-21.png]]
image-20220709173500-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Jim
Size
... ... @@ -1,0 +1,1 @@
1 +1.5 MB
Content