News:

Welcome on our forum!

Main Menu

MQTT export string format

Started by ccdr, August 08, 2018, 08:38:59 AM

Previous topic - Next topic

ccdr

Hello
I'd like to use MQTT export to publish variables in format of {"var1":"value1", "var2":"value2"} or [{"var1":"value1"}, {"var2":"value2"}].
Can I achieve that?
What the default format does the Data Logger Suite publish the variable through MQTT?
What does it mean when prompting "MQTT. Data have been processed successfully." with "MQTT. Client exception occurred. [Unable to Publish.]?
Thanks

Arthur Grasin

Hello,

You may prepare and publish this JSON data packet using the Expressions plugin.

By default, the MQTT plugin converts all values to a string and export it as is.

This error may mean that the plugin cannot convert a value to a string.
If you like my work, please take a few seconds and add feedback about our site or our software [here]

ccdr

#2
Quote from: Arthur Grasin on August 08, 2018, 08:53:40 AM
This error may mean that the plugin cannot convert a value to a string.
I was wondering this might be led by my MQTT server/broker side. But your answer seems to imply it was induced by client side. How could the Data logger suite not be able to covert a value to a string?