Tutorial: Listening to a Topic Data Value

  1. Examine a topic you want to monitor. In this example, we will be monitoring the conveyor as it switched from moving to not moving. The topic it publishes data too is /state. The value it toggles is "data"
  1. Now that we are aware of the topic we want to monitor, we can navigate to the Device Statistics. This is found in the Device Settings.

3 On the page, click Add Statistic.

  1. A side drawer will appear on the right side. It will ask for the following properties to be filled out:
TypeThe statistic category. For this type, we will choose: Topic data value.
NameA unique name to describe the statistic.
DescriptionA long form input that can describe the statistic in more detail.
Force DenominatorThis can be omitted. It is used when calculating the graph representation of the data.
Compute WhenExpected Available or when Active. This will control when the statistic is recorded as a value.
TopicThe topic of choice to evaluate. In our example, we are looking at the /state topic.
Data IndexThe data property of the topic. In this example we are looking at the data property. This would be denoted by ["data"].
AggregationHow often do you want the statistic to be calculated? In this example we are choosing every minute.

For example, with the form filled out:


You will see the statistic show up in the list of statistics.

  1. Next navigate to the fleets. On the left side nav, click Fleets.
  1. Choose the fleet of choice you want to see the statistic in.
  1. For this example, we are choosing the Freedom Factory. Click the statistics icon. It is the heartbeat icon.
  1. You will be navigated to the statistics section of the fleet. On the top right of this page, click Manage Statistics.
  1. A side drawer will appear. At the bottom of this drawer, click Add Statistic.
  1. Fill out the form with the statistic that has been created. Click Save.


Statistic Calculations

Statistics will start generating upon the time they are created. You will not see historical data being used to generate statistics. In this case, I have let some time pass to show over the last week the conveyor movement.