Changes for page 01 Lua Functions

Last modified by Devin Chen on 2026/08/18 14:08

From version 3.1
edited by Devin Chen
on 2025/09/24 15:40
Change comment: There is no comment for this version
To version 6.1
edited by Devin Chen
on 2026/08/18 14:08
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -765,7 +765,7 @@
765 765  1: reserved
766 766  
767 767  (((
768 -== **mqtt.create(string serverurl, string clientid)** ==
768 +== **mqtt.create(string serverurl, string clientid[, int useDomain])** ==
769 769  )))
770 770  
771 771  **Function:** Create an MQTT object
... ... @@ -784,6 +784,8 @@
784 784  
785 785  //clientid//: Client ID
786 786  
787 +//int useDomain: //0: convert to IP for connection, 1: use domain name for connection.
788 +
787 787  **Return:**
788 788  
789 789  Succeed: MQTT object
... ... @@ -1355,10 +1355,27 @@
1355 1355  end
1356 1356  {{/code}}
1357 1357  
1358 -(((
1359 -
1360 -)))
1360 +{{info}}
1361 +If your Lua script throws the error **module 'http' not found** or **module 'https' not found**, please first check the firmware version of the V‑BOX.
1361 1361  
1363 +For H series & E series (E01 firmware), use the scripts below to load the corresponding modules:
1364 +
1365 +~-~- Load required modules for HTTP requests
1366 +local http = require("socket.http")
1367 +
1368 +~-~- Load required modules for HTTPS requests
1369 +local https = require("https")
1370 +
1371 +For E series (E02 firmware), use the scripts below to load the corresponding modules:
1372 +
1373 +​​~-~- Load required modules for HTTP requests
1374 +local http = require("socket.http")
1375 +
1376 +~-~- Load required modules for HTTPS requests
1377 +local https = require("socket.https")
1378 +{{/info}}
1379 +
1380 +
1362 1362  (((
1363 1363  = **8 General Functions** =
1364 1364  )))
... ... @@ -1782,6 +1782,10 @@
1782 1782  
1783 1783  = **11 MySQL database operation** =
1784 1784  
1804 +{{info}}
1805 +Note: E series V-box with E02 firmware doesn't support
1806 +{{/info}}
1807 +
1785 1785  == **luaMySql.init(string sourcename, string username, string password, string host, number port, string character)** ==
1786 1786  
1787 1787  **Function:** Configure database connection parameters