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.

MQTT API

Use the MQTT API to update ThingSpeak™ channels

The ThingSpeak IoT platform enables clients to update a channel feed by publishing messages to the ThingSpeak MQTT broker. MQTT is a publish/subscribe communication protocol that uses TCP/IP sockets or WebSockets. MQTT over WebSockets can be secured with SSL. A client device connects to the MQTT broker and can publish to a channel or subscribe to updates from that channel.

To get started with the MQTT API, see: MQTT Basics. For client configuration information for your specific library, see MQTT library configuration.

Publish

Publish to a Channel FeedPublish message to update multiple channel fields simultaneously
Publish to a Channel Field FeedPublish message to update single channel field

Subscribe

Subscribe to a Channel FeedSubscribe to updates from a channel feed
Subscribe to a Channel Field FeedSubscribe to channel updates from a particular field of a channel

Topics

MQTT Basics

Learn about the publish/subscribe architecture for connecting bandwidth and power-constrained devices over wireless networks.

Choose Between REST API and MQTT API

Learn when to use REST and MQTT to update a channel.

Publish to a Channel Using Desktop MQTT Client

Publish to a channel using desktop MQTT client such as MQTT.fx.

Publish to a Channel Using Arduino Client

Publish data to a ThingSpeak channel using an Arduino® device.

Publish to a Channel Using Particle Photon Client

Publish data to a ThingSpeak channel using a Particle Photon device.

Publish to a Channel Using Raspberry Pi Board That Runs Python WebSockets

Publish data using WebSockets to a ThingSpeak channel.

Subscribe to Channel Updates Using Desktop MQTT Client

Subscribe to channel updates from a ThingSpeak channel using desktop MQTT.

Subscribe to Channel Updates Using Particle Photon Client

Subscribe to a ThingSpeak channel using a Particle Photon device.

Troubleshooting

Troubleshoot MQTT Publish

Common mistakes and problem resolution for publishing to ThingSpeak

Troubleshoot MQTT Subscribe

Common mistakes and problem resolution for subscribing to ThingSpeak

Was this topic helpful?