ThingSpeak

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Troubleshoot MQTT Publish

The MQTT protocol provides minimal feedback and error messages are limited. Use these steps to troubleshoot a connection and publish messages. The steps all independent possibilities, but they are listed with the most likely problems listed first.

  1. Ensure that the client address is mqtt.thingspeak.com. If you incorrectly configure your client to connect to the ThingSpeak™ MQTT broker, your connection request is rejected.

  2. Check that you have the correct topic format for Publish to a Channel Feed or for Publish to a Channel Field Feed.

  3. Check that you have the correct topic API Key. For MQTT publish, your topic must contain the Write API Key.

  4. 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.

  5. Do not set CleanSession flag to 0. If you set the CleanSession flag to 0 on your MQTT client, any connection request to the ThingSpeak™ MQTT broker is rejected with a CONNACK status of "0x05 Connection Refused, not authorized".

  6. Make sure that the port is correct. See MQTT Client Configuration for a list of accepted ports.

  7. Do not set the Will flag to non-zero values on your MQTT client. Any connection request to the ThingSpeak MQTT broker with non-zero Will flag is rejected with a CONNACK status of "0x05 Connection Refused, not authorized".

  8. If you are having trouble connecting with SSL, be aware that your client may require extra steps to enable a secure connection.

See Also

Related Topics

Was this topic helpful?