Changes for page 2 Script
Last modified by Devin Chen on 2025/06/06 14:03
From version 17.1
edited by Jim(Forgotten)
on 2022/07/09 17:47
on 2022/07/09 17:47
Change comment:
There is no comment for this version
To version 11.1
edited by Jim(Forgotten)
on 2022/07/09 17:01
on 2022/07/09 17:01
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Content
-
... ... @@ -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) ... ... @@ -720,7 +720,7 @@ 720 720 721 721 [[image:image-20220709165402-4.png]] 722 722 723 -{{code language=" java"}}726 +{{code language="LUA"}} 724 724 { 725 725 726 726 "Version": "2012-10-17", ... ... @@ -754,67 +754,122 @@ 754 754 } 755 755 {{/code}} 756 756 757 - ===**Create things**===760 +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]] 765 +| 766 +| |[[image:image-20220709165402-6.png]] 764 764 768 + 769 +| 770 +| |[[image:image-20220709165402-7.png]] 771 + 772 +| 773 +| |[[image:image-20220709165402-8.png]] 774 + 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 781 +| 782 +| |[[image:image-20220709165402-9.png]] 783 + 773 773 Select policy 774 774 775 -[[image:image-20220709165402-10.png]] 776 776 777 -[[image:image-20220709165402-11.png]] 787 +| 788 +| |[[image:image-20220709165402-10.png]] 778 778 779 779 780 -=== **Test with MQTT.fx tool** === 781 781 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 +| 800 +| |[[image:image-20220709165402-11.png]] 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 +1. **Test with MQTT.fx tool** 809 + 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]] 813 +| 814 +| |[[image:image-20220709165402-12.png]] 787 787 788 -Create one connection in MQTT.fx tool, set broker port as 8883. 816 +| 817 +| |[[image:image-20220709165402-13.png]] 789 789 790 -[[image:image-20220709165402-14.png]] 791 791 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 +| 828 +| |[[image:image-20220709165402-14.png]] 829 + 830 +Create one connection in MQTT.fx tool, set broker port as 8883. 831 + 792 792 Upload the CA File, Client Certificate File, Client Key File 793 793 794 -[[image:image-20220709165402-15.png]] 795 795 835 +| 836 +| |[[image:image-20220709165402-15.png]] 837 + 838 + 839 + 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. 843 +| 844 +| |[[image:image-20220709165402-16.png]] 801 801 802 -[[image:image-20220709173500-1.png]] 846 +| 847 +| |[[image:image-20220709165402-17.png]] 803 803 849 +Click”Test”~-~-->”MQTT test client”~-~-->”Subscrible to a topic”, to get message publish from MQTT.fx tool. 850 + 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** === 854 +| 855 +| |[[image:image-20220709165402-18.png]] 809 809 857 + 858 + 859 +1. **Configurate in CloudTool** 860 + 810 810 Copy the same setting in MQTT.fx to MQTT configuration 811 811 812 -[[image:image-20220709165402-19.png]] 813 813 864 +| 865 +| |[[image:image-20220709165402-19.png]] 866 + 814 814 Add a lua script and copy the lua demo into it. 815 815 816 -[[image:image-20220709165402-20.png]] 817 817 870 +| 871 +| |[[image:image-20220709165402-20.png]] 872 + 873 + 874 + 875 + 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,12 @@ 995 995 996 996 end 997 997 1056 + 1057 + 998 998 Get message in AWS 999 999 1000 -[[image:image-20220709165402-21.png]] 1060 + 1061 +| 1062 +| |[[image:image-20220709165402-21.png]] 1063 + 1064 +
- image-20220709173500-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Jim - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.5 MB - Content