Publish to a Channel Field Feed
Publish message to update single channel field with MQTT
Topic
channels/<channelID>/publish/fields/field<fieldnumber>
Description
channels/
updates a channel field by publishing a message to the specified topic. Replace
<channelID>
/publish/fields/field<fieldnumber>
<channelID>
with the channel ID, and
<fieldnumber>
with field number that you want to update. To learn
more about configuring your channel, see Channel Properties. Use this method to update a single field in a
channel.
Set the
PUBLISH
messages to aQoS
value of0
.Set the connection
RETAIN
flag to0
(off).Set the connection
CleanSession
flag to1
(true
).
To learn more about these flags, see MQTT v3.1.1 specification.
Input Arguments
Payload Parameters
The payload defines the data to be entered in the specified field of a
channel. For example: 100
Examples
Configure MQTT X to send a PUBLISH
message to
update a channel field.
Topic: channels/33301/publish/fields/field1 Payload: 45
This PUBLISH
message publishes a value of
45
to field1
of channel 33301
.
See Also
Publish to a Channel Feed | Subscribe to a Channel Feed | Subscribe to a Channel Field Feed
Topics
- Publish and Subscribe to a ThingSpeak Channel Using Secure MQTT
- Publish and Subscribe to a Channel Using Desktop MQTT Client
- Publish to a ThingSpeak Channel Using a Particle Device Client via MQTT
- Publish Using WebSockets in Python on a Raspberry Pi
- MQTT Basics
- Troubleshoot MQTT Publish
- Troubleshoot MQTT Subscribe