Changes for page 2 Script
Last modified by Devin Chen on 2025/06/06 14:03
From version 52.1
edited by Hunter
on 2023/06/07 15:45
on 2023/06/07 15:45
Change comment:
There is no comment for this version
To version 68.1
edited by Theodore Xu
on 2023/08/25 09:29
on 2023/08/25 09:29
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 9 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Hunter1 +XWiki.AiXia - Content
-
... ... @@ -1,9 +1,9 @@ 1 1 = **1 General Script Demo** = 2 2 3 -== **1.1 Address Operation :Write/Read data from address A to B** ==3 +== **1.1 Address Operation** == 4 4 5 5 ((( 6 -For example:transfer D2 to D0 6 +Write/Read data from address A to B**. **For example:transfer D2 to D0 7 7 ))) 8 8 9 9 (% style="text-align:center" %) ... ... @@ -343,7 +343,7 @@ 343 343 end 344 344 {{/code}} 345 345 346 -== **1.8 H ow to parse value from HTTP response body** ==346 +== **1.8 HTTP response body** == 347 347 348 348 This example use [[https:~~/~~/www.weatherapi.com/>>https://www.weatherapi.com/]] as example, to show how to parse value from HTTP response body. When we input the city name into address "@HDW5050": 349 349 ... ... @@ -472,7 +472,7 @@ 472 472 end 473 473 {{/code}} 474 474 475 -= **2 V-Box connect withthird part server** =475 += **2 Third part server** = 476 476 477 477 V-Box have two mode.One is for V-Net,User need to use WECON server to store data.We call this V-NET platform. 478 478 ... ... @@ -497,7 +497,7 @@ 497 497 (% class="wikigeneratedid" %) 498 498 Tool link: **[[MQTT.fx>>http://mqttfx.jensd.de/index.php/download]]** 499 499 500 -== **2.1 V-Box connect with test server(General Example)** ==500 +== **2.1 Test server(General Example)** == 501 501 502 502 The following example is trying to publish to the topic "testtopic/test/no1/7890", and subscribe the topic "testtopic/test/no1/123456". 503 503 ... ... @@ -521,6 +521,7 @@ 521 521 {{code language="lua"}} 522 522 --MQTT configuration table 523 523 local MQTT_CFG={} 524 +--if there is no need the username and password, please put them as "" 524 524 MQTT_CFG.username = "weconsupport" 525 525 MQTT_CFG.password = "123456" 526 526 MQTT_CFG.netway = 0 ... ... @@ -645,7 +645,7 @@ 645 645 end 646 646 {{/code}} 647 647 648 -== **2.2 V-Box connect with customer server:grouprobotinfo.com** ==649 +== **2.2 Customer server:grouprobotinfo.com** == 649 649 650 650 This demo does not use SSL certification. Script is as below 651 651 ... ... @@ -786,7 +786,7 @@ 786 786 end 787 787 {{/code}} 788 788 789 -== **2.3 V-Box connect withAzure platform** ==790 +== **2.3 Azure platform** == 790 790 791 791 In this demo,V-Box connects with Azure by SSL certification. 792 792 ... ... @@ -917,8 +917,12 @@ 917 917 end 918 918 ))) 919 919 920 -== **2.4 H ow to configure the Huawei platform?(✎Note: Huawei IOT DA function is only in China area.If you want this function,you need to use chinese mobile to register)** ==921 +== **2.4 Huawei platform** == 921 921 923 +{{info}} 924 +**✎Note**:**Huawei IOT DA function is only in China area.If you want this function,you need to use chinese mobile to register** 925 +{{/info}} 926 + 922 922 1.Register a account: [[https:~~/~~/www.huaweicloud.com/intl/en-us/s/JUlPVERNJQ>>https://www.huaweicloud.com/intl/en-us/s/JUlPVERNJQ]] 923 923 924 924 2.log in the Huawei IOTDA ... ... @@ -1066,10 +1066,8 @@ 1066 1066 (% style="text-align:center" %) 1067 1067 [[image:1624441186851-536.png||height="434" width="700" class="img-thumbnail"]] 1068 1068 1069 -== **2.5V-Boxconnectwith Huaweiplatform**==1074 +=== Huawei by SSL certification. === 1070 1070 1071 -In this demo,V-Box connects with Huawei by SSL certification. 1072 - 1073 1073 1.Create a project access for Huawei IOT 1074 1074 1075 1075 2.configure MQTT configuration ... ... @@ -1187,7 +1187,7 @@ 1187 1187 (% style="text-align:center" %) 1188 1188 [[image:1624506666650-161.png||height="547" width="1000" class="img-thumbnail"]] 1189 1189 1190 -== **2.6 V-Box connect withAWS platform** ==1193 +== **2.6 AWS platform** == 1191 1191 1192 1192 === **Log in AWS** === 1193 1193 ... ... @@ -1252,7 +1252,7 @@ 1252 1252 [[image:image-20220709165402-11.png]] 1253 1253 1254 1254 1255 -=== ** Test withMQTT.fx tool** ===1258 +=== **MQTT.fx tool** === 1256 1256 1257 1257 Click “View Setting” to get the “Broker Adress” 1258 1258 ... ... @@ -1280,7 +1280,7 @@ 1280 1280 1281 1281 [[image:image-20220709165402-18.png]] 1282 1282 1283 -=== **C onfigurate in CloudTool** ===1286 +=== **CloudTool** === 1284 1284 1285 1285 Copy the same setting in MQTT.fx to MQTT configuration 1286 1286 ... ... @@ -1478,3 +1478,65 @@ 1478 1478 Get message in AWS 1479 1479 1480 1480 [[image:image-20220709165402-21.png]] 1484 + 1485 +== **2.7 Mysql** == 1486 + 1487 +=== 1.Install Mysql software === 1488 + 1489 +Download the latest version of Mysql. 1490 + 1491 +(% style="text-align:center" %) 1492 +[[image:Mysql的软件版本.png]] 1493 + 1494 +=== 2.Navicat connect Mysql === 1495 + 1496 +Connecting to Mysql with navicat. 1497 + 1498 +(% style="text-align:center" %) 1499 +[[image:连接到mysql.png]] 1500 + 1501 +=== 3.Create a database === 1502 + 1503 +Character set should be choose utf8mb3/utf8mb4 and Collation choose utf8mb3_danish_ci/utf8mb4_danish_ci. 1504 + 1505 +(% style="text-align:center" %) 1506 +[[image:创建数据库.png]] 1507 + 1508 +=== 4.Create a data table === 1509 + 1510 +Create a table, enter the fields you need. 1511 + 1512 +(% style="text-align:center" %) 1513 +[[image:创建表1.png]] 1514 + 1515 +Save, enter table name. 1516 + 1517 +(% style="text-align:center" %) 1518 +[[image:创建表2.png]] 1519 + 1520 +=== 5.Input Table Data === 1521 + 1522 +(% style="text-align:center" %) 1523 +[[image:输入或者导入数据.png]] 1524 + 1525 +=== 6.Modifying scripts and debug:**[[Mysql script>>https://docs.we-con.com.cn/bin/view/V-BOX/V-Net/Manual/04%20Lua%20Script/01%20Lua%20Functions/\#H11MySQLdatabaseoperation]]** === 1526 + 1527 +(% style="text-align:center" %) 1528 +[[image:调试结果.png]] 1529 + 1530 +=== 7.Problem === 1531 + 1532 +During our debugging process it may there are some problems about Mysql, such as 1533 + 1534 +* MySQL: Host 192.168.XXX.XXX is not allowed to connect. 1535 +* MySQL: Host 192.168.XXX.XXX is blocked because of many connection errors. 1536 +* MySQL: SSL connection error: unknown error number. 1537 +* ((( 1538 +1449-The user specified as a definer(‘mysql.infoschema‘@localhost‘) does not exist. 1539 +))) 1540 + 1541 +This type of problem has nothing to do with scripts or devices, it is a Mysql configuration issue. If you have any of these problems, please look for a solution online. 1542 + 1543 +{{info}} 1544 +✎Note: If you want to use CMD to access Mysql, you need to add the bin file to the environment variable, please check online for details of the operation. 1545 +{{/info}}
- Mysql的软件版本.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +78.4 KB - Content
- 创建数据库.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +53.2 KB - Content
- 创建表1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +49.0 KB - Content
- 创建表2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +18.4 KB - Content
- 调试结果.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +68.4 KB - Content
- 输入或者导入数据.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.6 KB - Content
- 连接到mysql.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +59.0 KB - Content
- 连接数据库1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +56.5 KB - Content
- 连接数据库2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.AiXia - Size
-
... ... @@ -1,0 +1,1 @@ 1 +25.5 KB - Content