Subscribe to a Channel Field Feed
Subscribe to channel updates from specific field of channel with MQTT
ThingSpeak™ MQTT supports only QoS 0.
subscribes to updates from a single field of a channel feed. Replace
<channelID> with the channel ID and
<fieldnumber> with the target field number.
to updates to all fields of a channel feed from the specified channel.
<channelID> — channel ID for the subscription target
Channel ID for the subscription target, specified as a positive integer.
<fieldnumber> — field number of the subscription target
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
Field number of the subscription target, specified as a positive integer.
Each ThingSpeak license type allows a different number of MQTT subscriptions and has different restrictions on the number of messages delivered. For more information, see How to Buy and Frequently Asked Questions.
MQTT subscriptions do not report updates to the channel from
Bulk Write JSON Dataor
Bulk Write CSV Data.
ThingSpeak MQTT honors all MQTT disconnect and unsubscribe messages. If you disconnect from the MQTT server, you are automatically unsubscribed from channel updates.
Configure MQTT X to subscribe to updates of field1 from your channel
mqtt3.thingspeak.com and port
In the New Connection dialog, use the following connection settings, along with client ID, username, and password derived when the MQTT device was created in ThingSpeak:
Name: MyChanName Client ID: ENTER_MQTT_DEVICE_CLIENT_ID Host: mqtt:// mqtt3.thingspeak.com Port: 1883 Username: ENTER_MQTT_DEVICE_USERNAME Password: ENTER_MQTT_DEVICE_PASSWORD Clean Session: true (for best performance)
In the New Subscription dialog, use the subscribe topic syntax and settings:
Topic: channels/33301/subscribe/fields/field1 QoS: 0
Now update the field with a publish, and observe the message received in the client from the subscription.
Subscribe to a Channel Feed | Publish to a Channel Feed | Publish to a Channel Field Feed