{"id":2204,"date":"2017-11-10T17:33:24","date_gmt":"2017-11-10T22:33:24","guid":{"rendered":"https:\/\/blogs.mathworks.com\/iot\/?p=2204"},"modified":"2018-01-12T13:39:38","modified_gmt":"2018-01-12T18:39:38","slug":"subscribe-to-thingspeak-iot-data-using-mqtt","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/iot\/2017\/11\/10\/subscribe-to-thingspeak-iot-data-using-mqtt\/","title":{"rendered":"Subscribe to ThingSpeak IoT Data using MQTT"},"content":{"rendered":"

The\u00a0ThingSpeak IoT<\/a>\u00a0service now supports MQTT subscriptions to receive\u00a0instant updates when a ThingSpeak channel gets updated. MQTT is a powerful standard for IoT systems. ThingSpeak enables clients to update and receive updates from channel feeds via the ThingSpeak MQTT broker.\u00a0MQTT 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.<\/p>\n

\"\"<\/a><\/p>\n

MQTT in MATLAB<\/h3>\n

We also published a new File\u00a0Exchange submission that allows you to publish and subscribe\u00a0using MQTT within MATLAB. Download and install MQTT in MATLAB<\/a> to be able to connect to ThingSpeak’s MQTT server or connect to other standard\u00a0MQTT\u00a0brokers such as AWS IoT. Using this Add-On in MATLAB allows you to define custom functions to evaluate on receiving messages streaming over subscribed topics.<\/p>\n

ThingSpeak MQTT Examples<\/h3>\n