Skip to main content
1-Visitor
Nov 28, 2017 11:00 AM UTC
Question

Creating chart in Thingworx

Hello,

I am developing Thingworx web application that reads different sensor data being published over an MQTT protocol. I subscribe to a topic and getting the values displayed on a Gauge widget.

Now, I want it to form a chart based on the sensor data being received. I watched the "how to create and configure chart widget" video given in the developer community where they are getting an option of GetStreamEnterieswithData in the Add data section. I am not getting that option. I don't know where I am going wrong.

I am getting the data in the Gauge but I also want it on the chart. Please help me with proper steps on how to configure chart widget with MQTT??

Thank you!

13 replies

22-Sapphire I
Nov 28, 2017 1:05 PM UTC

You need to either

1. use the MQTT topic updated to parse out data and write that to a Stream

2. use the MQTT topic updated to parse out data and write that to actual properties and log those

then you can use the Stream or ValueStream to populate your chart with historical data.

Translate
jdave11-VisitorAuthor
1-Visitor
Nov 29, 2017 4:57 PM UTC

I did exactly what you told in the second comment. Data from MQTT server being parsed in the properties and logging it. Then using value stream to populate the chart. I am getting data on the label but not on the chart. If I set the value manually from the properties, it gets plot on the chart but not from the data received over MQTT. I am getting the same data on the label without any issues.

Here are the screenshots of my project. Please let me know where I am going wrong. Thank you

Screenshot (325).pngScreenshot (330).pngScreenshot (327).pngScreenshot (331).pngScreenshot (328).pngScreenshot (329).png

Translate
22-Sapphire I
Nov 29, 2017 5:18 PM UTC

Did you set the X and Y axis for the Chart?

hard to tell for sure, but as far as I can tell everything looks to be done correctly.

Translate
10-Marble
Jan 22, 2018 2:16 PM UTC

Hello, did you find final solution how to correctly store data into valuestream for next chart creation? I have same problem manualy are stored data in valuestream but data from mqtt broker does not store, they only set property value and you can view it. What may cause this behaviour? Many thanks for any response...

Translate