Troubleshoot MQTT Subscribe
The MQTT protocol provides minimal feedback and error messages are limited. Use these steps to troubleshoot issues with connecting and subscribing to receive messages. The steps are all independent possibilities, with the most likely problems listed first.
Ensure that your MQTT device credentials are correct. Select Devices > MQTT. The device configuration details are visible when you click Edit, but if you did not save or make note of the password when you created the device, you can regenerate a new one by clicking .
The MQTT device credentials are required at when connecting the MQTT client to both public and private channels.
Ensure that the client address is
mqtt3.thingspeak.com. If you incorrectly configure your client to connect to the ThingSpeak MQTT broker, your connection request is rejected.
Check that you have the correct topic format for Subscribe to a Channel Feed, or Subscribe to a Channel Field Feed.
Check that your channels have the correct permissions in your ThingSpeak MQTT device. Click Devices > MQTT. For your listed device, click Edit. See the
Allowedcheck boxes for each channel.
Make sure your QoS is set to 0. Some devices have a default QoS that is different than 0. Some clients require you manually change the setting. Some of the MQTT API examples show how to subscribe with QoS 0.
CleanSessionmust be set to 1 if it is specified.
Make sure that the port is correct. See MQTT Client Configuration for a list of accepted ports.
If you are having trouble connecting with SSL, be aware that your client might require extra steps to enable a secure connection.