AGG Software Forums
November 27, 2024, 08:05:06 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: MQTT export string format  (Read 12384 times)
ccdr
Jr. Member
**

Karma: +0/-0
Posts: 71


View Profile
« on: August 08, 2018, 11:38:59 AM »

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
« Last Edit: August 08, 2018, 11:43:16 AM by ccdr » Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: August 08, 2018, 11:53:40 AM »

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.
Logged
ccdr
Jr. Member
**

Karma: +0/-0
Posts: 71


View Profile
« Reply #2 on: August 08, 2018, 11:59:07 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?

« Last Edit: August 08, 2018, 12:02:11 PM by ccdr » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines