I had an issue with getting the DataLogger IoT connected with ThingSpeak. I keep getting the error:
[W] ThingSpeak MQTT disconnected - reconnecting.......[E] ThingSpeak MQTT: Connection Error [-2]
36.710,23.561,99605.406,33429.094,176
[W] ThingSpeak MQTT disconnected - reconnecting.......[E] ThingSpeak MQTT: Connection Error [-2]
36.710,23.390,99603.187,16636.340,176
I’ve double-checked everything multiple times but cannot find the issue…
Settings on DataLogger:
Settings
1) Enabled - Enable or Disable the MQTT Client : true
2) Port - The MQTT broker port to connect to : 8883
3) Server - The MQTT server to connect to : mqtt3.thingspeak.com
4) MQTT Topic - The MQTT topic to publish to :
5) Client Name - Name of this device used for MQTT Communications : PAoLFDAHNjITKw4pNQkbGic
6) Username - Username to connect to an MQTT broker, if required : PAoLFDAHNjITKw4pNQkbGic
7) Password - Password to connect to an MQTT broker, if required : ************************
8) Buffer Size - MQTT payload buffer size. If 0, the buffer size is dynamic : 0
9) CA Cert Filename - File to load the certificate from : ThingsSpeakCertificate.cer
10) Client Cert Filename - File to load the client certificate from :
11) Client Key Filename - File to load the client key from :
12) Channels - Comma separated list of <device name>=<channel ID> : BME68x=2783896
- Wifi is connected
- Certificate should be the right one (https://www.mathworks.com/matlabcentral/answers/1889632-how-to-download-root-certificate-for-use-with-industrial-communication-toolbox-mqtt-functions, saved as ThingsSpeakCertificate.cer)
- Device on ThingSpeak is authorized to publish
Is there anybody having the same issue or having an idea what could cause the problem?
Thanks a lot!