MQTT / ESP8266 / NodeMCU / Lua code not publishing
问题 I have a problem with the following Lua code on an ESP8266... function sendData(humidity,temperature) -- Setup MQTT client and events print("sendData() entered") print("Setting up mqtt.Client...") m = mqtt.Client(mqtt_client_id, 120, username, password) print("Attempting client connect...") m:connect(mqtt_broker_ip , mqtt_broker_port, 0, function(conn) print("Connected to MQTT") print(" IP: " .. mqtt_broker_ip) print(" Port: " .. mqtt_broker_port) print(" Client ID: " .. mqtt_client_id) print