Changes for page 2 Script

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

From version 51.1
edited by Hunter
on 2023/05/06 10:19
Change comment: There is no comment for this version
To version 53.1
edited by Hunter
on 2023/06/07 18:23
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -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
... ... @@ -560,7 +560,7 @@
560 560  function mqtt_init()
561 561   print(string.format("mqtt init mqtt_url:%s mqtt_clientid:%s", MQTT_URL, MQTT_CLIENT_ID))
562 562   if g_mq then
563 - mqtt.close() --Close mqtt object
564 + mqtt.close(g_mq) --Close mqtt object
564 564   end
565 565   g_mq, err = mqtt.create(MQTT_URL, MQTT_CLIENT_ID) -- create mqtt object,and declare it as a global variable
566 566   if g_mq then