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??
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.
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
In the Time Series Widget properties section left-hand side below, I am getting an option of a timestamp in XAxis field and property name in the Data Field1. Please see the screenshots for better understanding. Thank you!
It displays on the label but not on the chart until values entered manually from the properties as shown in the screenshots below.
From what you are saying, the logging is not working?
So the MQTT sub is receiving updates and you are processing those and writing those to the property, but for some reason they aren't being logged?
yes, it seems so. Getting single values on label and gauge but not on chart even though checked persistent and logged in the property. I don't know where I am going wrong.
Persistence is not required btw, but shouldn't impact the logging either.
For now set the DataChange to Always vs Value and see if that makes a difference.