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.

Choose Between REST and MQTT

REST is a representational state transfer architectural style designed as a request/response model that communicates over HTTP. MQTT is a publish/subscribe model that runs over TCP/IP sockets or WebSockets. MQTT over WebSockets can be secured with SSL. You can choose to update data to a ThingSpeak™ channel either using a REST GET or POST request or using MQTT PUBLISH method.

When to Use REST

In these scenarios it is useful to use REST calls to update or retrieve data from a ThingSpeak channel.

When to Use MQTT

In these scenarios it is useful to use MQTT to update data to a ThingSpeak channel.

  • Your device is power-constrained, and you need to use less battery power to send data to ThingSpeak. Also, an MQTT PUBLISH operation is typically faster in this scenario.

  • Your device connectivity is intermittent, and you have limited bandwidth usage.

See Also

|

Related Examples

More About

Was this topic helpful?