MQTT X and thingspeak - lost connection
33 views (last 30 days)
I have followed the instructions on mathworks site:
I have downloaded the MQTT X software.
Then I add a new connection as described. The username, password and ID i get from my thingspeak device in my account.
I then at 3) "Click" the connect button, the program replies "connected". But within 3-6 secounds the connection is lost... so I never get to test out the rest of the subscription and publish.
This should not be a difficult task, but I an stuck :-(
Are there anyone experiensing the same?
mvh vegar bartnes
Stonez Chen on 13 Mar 2022
Edited: Stonez Chen on 13 Mar 2022
I'm making a YouTube video in Traditional Chinese to show people how to use ThingSpeak MQTT.
However, I'm also facing the same problem that both my ESP32 & Node-RED lost mqtt3.thingspeak.com connection right after a successful connection. Both ESP32 & Node-RED are under the same Wi-Fi AP.
I'm sure that MQTT device is created and mapped to a Channel.
Clean session: 1
I use client.state() to check on my ESP32 and the result is: -3 (MQTT_CONNECTION_LOST - the network connection was broken)
What could be the problem? Server issue or mine issue?
PS: My last video is with home hosted MQTT server: MQTT + ESP32 + Mosquitto on Raspberry Pi
More Answers in the ThingSpeak Community