Publish message to update multiple channel fields simultaneously
channels/<channelID>/publish/<apikey>
channels/
publishes messages to the topic to update a channel feed. Replace
<channelID>
/publish/<apikey>
<channelID>
with the channel ID and <apikey>
with the Write API Key of the channel. To learn more about configuring your channel, see Channel Properties. To update multiple parameters simultaneously, see Payload Parameters.
Set the PUBLISH
messages to have a QoS
value
of 0
.
Set the connection RETAIN
flag to 0
.
Set the connection CleanSession
flag to
1
.
To learn more about these flags, see MQTT v3.1.1 specification.
Specify the optional payload parameters for the PUBLISH
message as
Name=Value
arguments, separated using &
as a
string. For example: field1=100&field2=50&lat=30.61&long=40.35
If the parameter definition string contains any special characters, it must be URL (percent)
encoded (application/x-www-form-urlencoded).
field1
Data to be entered in field 1 of a channel.
For example: field1=100
fieldx
Data to be entered in field x of a channel. Make sure the field is enabled in the channel settings.
For example: fieldx=100
x must be less than or equal to 8, the number of allowed fields.
lat
Location of your channel in the form of latitude.
For example: lat=10.45
long
Location of your channel in the form of longitude.
For example: long=35.4
elevation
Elevation of your channel from the ground level in meters.
For example: elevation=100
status
Status message of your channel.
For example: status=Message
twitter
User name of your Twitter® account that is linked to ThingTweet app.
For example: twitter=nohans
tweet
Status message update of your Twitter account.
For example: tweet=Tweet from my channel
created_at
Date of feed entry in ISO 8601 format.
For example: created_at=2014-12-31 23:59:59
Configure MQTT.fx to send a
PUBLISH
message to update a channel feed.
Replace <channelID>
with the channel ID and
<apikey>
with the Write API Key of the channel. This
PUBLISH
message publishes a value of 45
to
field1
and 60
to field2
of the
specified channel, along with a status message MQTTPUBLISH
.
Publish to a Channel Field Feed | Subscribe to a Channel Feed | Subscribe to a Channel Field Feed | Troubleshoot MQTT Publish