Changes for page 2 Script
Last modified by Devin Chen on 2025/06/06 14:03
To version 9.1
edited by Jim(Forgotten)
on 2022/07/09 16:48
on 2022/07/09 16:48
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 23 removed)
- image-20220709165226-1.png
- image-20220709165402-1.png
- image-20220709165402-10.png
- image-20220709165402-11.png
- image-20220709165402-12.png
- image-20220709165402-13.png
- image-20220709165402-14.png
- image-20220709165402-15.png
- image-20220709165402-16.png
- image-20220709165402-17.png
- image-20220709165402-18.png
- image-20220709165402-19.png
- image-20220709165402-2.png
- image-20220709165402-20.png
- image-20220709165402-21.png
- image-20220709165402-3.png
- image-20220709165402-4.png
- image-20220709165402-5.png
- image-20220709165402-6.png
- image-20220709165402-7.png
- image-20220709165402-8.png
- image-20220709165402-9.png
- image-20220709173500-1.png
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Stone1 +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 ... ... @@ -256,13 +256,15 @@ 256 256 sv=addr_getshort("@SV Silicone")/10, 257 257 pv=addr_getshort("@PV Silicone")/10, 258 258 product1=addr_getshort("@Product 1")/10, 259 -\\ product2=addr_getshort("@Product 2")/10, 259 + 260 + product2=addr_getshort("@Product 2")/10, 260 260 product3=addr_getshort("@Product 3")/10, 261 261 product4=addr_getshort("@Product 4")/10, 262 262 ice1=addr_getshort("@Ice condenser 1")/10, 263 263 ice2=addr_getshort("@Ice condenser 2")/10, 264 264 vacuum=addr_getfloat("@Vacuum") 265 -\\ } 266 + 267 + } 266 266 local jsAlarm = { HPC = addr_getbit("@B_25395#W0.00"), 267 267 ODPC = addr_getbit("@B_25395#W0.01"), 268 268 MTPC=addr_getbit("@B_25395#W0.02"), ... ... @@ -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 -\\ } 282 + 283 + } 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) ... ... @@ -703,118 +703,139 @@ 703 703 704 704 Login aws account and click“Connect an IoT device” 705 705 706 -[[image: image-20220709165402-1.png]]709 +[[image:图片1.png]] 707 707 708 -[[image:image-20220709165 402-2.png]]711 +[[image:image-20220709163750-4.png]] 709 709 710 - 711 711 === **Create policy** === 712 712 713 713 Click “Secure”~-~-->“Policies”~-~-->“Create policy”~-~-->Click “Create” 714 714 715 -[[image:image-20220709165 402-3.png]]717 +[[image:image-20220709163750-5.png]] 716 716 717 717 Name the policy~-~-->Click “JSON”~-~-->Copy the following content~-~-->Click “Create” 718 718 719 -[[image:image-20220709165 402-5.png]]721 +[[image:image-20220709163750-7.png]] 720 720 721 -[[image:image-20220709165 402-4.png]]723 +[[image:image-20220709163750-6.png]] 722 722 723 -{{code language="java"}} 724 724 { 725 725 726 - 727 + "Version": "2012-10-17", 727 727 728 - 729 + "Statement": [ 729 729 730 - 731 + { 731 731 732 - 733 + "Effect": "Allow", 733 733 734 - 735 + "Action": [ 735 735 736 - 737 + "iot:Connect", 737 737 738 - 739 + "iot:Publish", 739 739 740 - 741 + "iot:Subscribe", 741 741 742 - 743 + "iot:Receive", 743 743 744 - 745 + "greengrass:Discover" 745 745 746 - 747 + ], 747 747 748 - 749 + "Resource": "*" 749 749 750 - 751 + } 751 751 752 - 753 + ] 753 753 754 754 } 755 -{{/code}} 756 756 757 757 === **Create things** === 758 758 759 759 Click “Manage”~-~-->“Things”~-~-->“Create things”~-~-->“Create single thing” 760 760 761 -[[image:image-20220709165 402-6.png]]761 +[[image:image-20220709163750-8.png]] 762 762 763 -[[image:image-20220709165 402-7.png]]763 +[[image:image-20220709163750-9.png]] 764 764 765 765 Name the thing~-~-->Click “Next” 766 766 767 -[[image:image-20220709165 402-8.png]]767 +[[image:image-20220709163750-10.png]] 768 768 769 769 Select the way to create certificate 770 770 771 -[[image:image-20220709165 402-9.png]]771 +[[image:image-20220709163750-11.png]] 772 772 773 773 Select policy 774 774 775 -[[image:image-20220709165402-10.png]] 776 776 777 -[[image:image-20220709165402-11.png]] 778 778 779 779 780 -=== **Test with MQTT.fx tool** === 781 781 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 +| 787 +| |[[image:image-20220709163750-13.png]] 788 + 789 +1. **Test with MQTT.fx tool** 790 + 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]] 794 +| 795 +| |[[image:image-20220709163750-14.png]] 787 787 788 -Create one connection in MQTT.fx tool, set broker port as 8883. 797 +| 798 +| |[[image:image-20220709163750-15.png]] 789 789 790 -[[image:image-20220709165402-14.png]] 800 +| 801 +| |[[image:image-20220709163750-16.png]] 791 791 803 +Create one connection in MQTT.fx tool, set broker port as 8883. 804 + 792 792 Upload the CA File, Client Certificate File, Client Key File 793 793 794 -[[image:image-20220709165402-15.png]] 795 795 808 +| 809 +| |[[image:image-20220709163750-17.png]] 810 + 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. 814 +| 815 +| |[[image:image-20220709163750-18.png]] 801 801 802 -[[image:image-20220709173500-1.png]] 817 +| 818 +| |[[image:image-20220709163750-19.png]] 803 803 820 +Click”Test”~-~-->”MQTT test client”~-~-->”Subscrible to a topic”, to get message publish from MQTT.fx tool. 821 + 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** === 825 +| 826 +| |[[image:image-20220709163750-20.png]] 809 809 828 +1. **Configurate in CloudTool** 829 + 810 810 Copy the same setting in MQTT.fx to MQTT configuration 811 811 812 -[[image:image-20220709165402-19.png]] 813 813 833 +| 834 +| |[[image:image-20220709163750-21.png]] 835 + 814 814 Add a lua script and copy the lua demo into it. 815 815 816 -[[image:image-20220709165402-20.png]] 817 817 839 +| 840 +| |[[image:image-20220709163750-22.png]] 841 + 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 1022 + 1023 + 998 998 Get message in AWS 999 999 1000 -[[image:image-20220709165402-21.png]] 1026 + 1027 +| 1028 +| |[[image:image-20220709163750-23.png]]
- image-20220709165226-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.2 MB - Content
- image-20220709165402-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -200.2 KB - Content
- image-20220709165402-10.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -19.0 KB - Content
- image-20220709165402-11.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -105.9 KB - Content
- image-20220709165402-12.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -29.0 KB - Content
- image-20220709165402-13.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -158.8 KB - Content
- image-20220709165402-14.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -48.1 KB - Content
- image-20220709165402-15.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -46.9 KB - Content
- image-20220709165402-16.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -140.7 KB - Content
- image-20220709165402-17.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -12.5 KB - Content
- image-20220709165402-18.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -32.2 KB - Content
- image-20220709165402-19.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -66.6 KB - Content
- image-20220709165402-2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -188.5 KB - Content
- image-20220709165402-20.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -33.3 KB - Content
- image-20220709165402-21.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -124.8 KB - Content
- image-20220709165402-3.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -103.9 KB - Content
- image-20220709165402-4.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -4.0 KB - Content
- image-20220709165402-5.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -66.5 KB - Content
- image-20220709165402-6.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -110.0 KB - Content
- image-20220709165402-7.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -25.4 KB - Content
- image-20220709165402-8.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -64.2 KB - Content
- image-20220709165402-9.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -37.5 KB - Content
- image-20220709173500-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.5 MB - Content