In this tutorial, you are configuring a device dashboard to monitor how well a painting robot is performing in an automotive process.
Complete these tutorials:
In this tutorial, you configure a dashboard that monitors the load that is handled by individual painting robots in an automotive process.
The dashboard displays the following metrics:
Use the starter JSON configuration to create a dashboard with five card types:
event_1_
, for example, event_1_load
and event_1_travel_time
. As you complete the tutorial, preappend each input data item
with event_1_
.For help with defining the card types in this tutorial, see Dashboard features and Dashboard JSON reference.
Create a new JSON file with using the device dashboard starter JSON configuration:
{
"title": "add dashboard title here",
"cards": [{
"type": "TIMESERIES",
"id": "add_card_ID_here",
"size": "LARGE",
"title": "add line graph card title here",
"content": {
"series": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
}
]
},
"dataSource": {
"attributes": [{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
}
],
"range": {
"count": -1,
"interval": "day"
},
"timeGrain": "hour"
}
}, {
"type": "TABLE",
"id": "add_card_ID_here",
"size": "LARGE",
"title": "add table card title here",
"content": {
"columns": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "timestamp",
"label": "Timestamp",
"type": "TIMESTAMP",
"priority": 1
}
],
"expandedRows": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
}],
"sort": "DESC",
"thresholds": [{
"comparison": ">",
"dataSourceId": "add_datasource_ID_here",
"severity": 3,
"value": 376
},
{
"comparison": ">",
"dataSourceId": "add_datasource_ID_here",
"severity": 1,
"value": 377
}
]
},
"dataSource": {
"attributes": [{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
}
],
"range": {
"count": -1,
"interval": "add_interval_here"
},
"timeGrain": "add_grain_here"
}
}, {
"type": "VALUE",
"id": "add_card_ID_here",
"size": "SMALL",
"title": "add value card title here",
"content": {
"attributes": [{
"dataSourceId": "add_datasource_ID_here",
"precision": 3,
"label": "add label here",
"thresholds": [{
"color": "#5aa700",
"comparison": "<",
"icon": "icon--checkmark--outline",
"value": 10
},
{
"color": "#F00",
"comparison": ">",
"icon": "icon--warning",
"value": 10
}
]
}]
},
"dataSource": {
"attributes": [{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
}]
}
}, {
"id": "Robot-overview-image",
"size": "LARGE",
"title": "Last month",
"type": "IMAGE",
"content": {
"id: "add_image_id_here",
"alt": "Painting robot",
"hotspots": [{
"color": "#00F",
"icon": "icon--info--outline",
"content": {
"attributes": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
}
]
},
"type": "fixed",
"locations": [{
"x": "add_coordinate_here",
"y": "add_coordinate_here"
}]
}]
},
"dataSource": {
"attributes": [{
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here",
"aggregator": "add_aggregator_here"
},
{
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here",
"aggregator": "add_aggregator_here"
}
],
"range": {
"count": -1,
"interval": "add_interval_here"
}
}
}, {
"id": "alerts",
"size": "XLARGE",
"title": "Alerts in the last 3 hours",
"type": "ALERT",
"dataSource": {
"range": {
"count": -3,
"interval": "add_interval_here"
},
"type": "alert"
}
}]
}
"title": "Painting robot load performance"
.Define the contents of a line graph in a TIMESERIES
card.
{
"type": "TIMESERIES",
"id": "add_card_ID_here",
"size": "LARGE",
"title": "add line graph card title here",
"content": {
"series": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
}
]
},
"dataSource": {
"attributes": [{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
}
],
"range": {
"count": -1,
"interval": "day"
},
"timeGrain": "hour"
}
}
Populate the line graph card with the following data:
"type": "TIMESERIES"
."id": "line_cardID"
."size": "LARGE"
."title": "Minimum load vs Maximum load vs Average load"
.Define the metrics to display on the graph in the content
object. Define the time series metrics to display in the series
array. Create a dataSourceId
for each metric and assign a metric. Note:
Later, you define a dataSource
object to map the attributes you display on a card with the data items in the database. Enter:
{
"series": [{
"dataSourceId": "load_mean_ID",
"label": "Average Load"
},
{
"dataSourceId": "load_max_ID",
"label": "Minimum Load"
},
{
"dataSourceId": "load_min_ID",
"label": "Maximumu Load"
}
]
}
Define the source of the data in the dataSource
object.
Define the source of the data items that are displayed on the card in the dataSource.attributes
array. You specify the data item name in attribute
, assign an aggregation method in aggregator
and map the
id
field to the content.series.dataSourceId
attribute. Enter:
"attributes": [{
"aggregator": "mean",
"attribute": "load",
"id": "load_mean_ID"
},
{
"aggregator": "max",
"attribute": "load",
"id": "load_max_ID"
},
{
"aggregator": "min",
"attribute": "load",
"id": "load_min_ID"
}
]
Define the time range to apply to the series in the dataSource.range
object. Show data for the last day. Enter:
"range": {
"count": -1,
"interval": "day"
}
"timeGrain": "hour"
.Go the table card object:
{
"type": "TABLE",
"id": "add_card_ID_here",
"size": "LARGE",
"title": "add table card title here",
"content": {
"columns": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "timestamp",
"label": "Timestamp",
"type": "TIMESTAMP",
"priority": 1
}
],
"expandedRows": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
}],
"sort": "DESC",
"thresholds": [{
"comparison": ">",
"dataSourceId": "add_datasource_ID_here",
"severity": 3,
"value": 376
},
{
"comparison": ">",
"dataSourceId": "add_datasource_ID_here",
"severity": 1,
"value": 377
}
]
},
"dataSource": {
"attributes": [{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
},
{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
}
],
"range": {
"count": -1,
"interval": "day"
},
"timeGrain": "hour"
}
}
Populate the table card with the following data:
"type": "TABLE"
."id": "table_card_ID"
."size": "LARGE"
."title": "Load"
.content
object.
columns
array. You are displaying a max load, a mean load, and a timestamp column. Create a dataSourceId
for each metric and assign a label. Note: Later, you define
a dataSource
object to map the attributes you display on a card with the data items in the database. Enter: "columns": [{
"dataSourceId": "load_max_ID",
"label": "Max"
},
{
"dataSourceId": "load_mean_ID",
"label": "Mean"
},
{
"dataSourceId": "timestamp",
"label": "Timestamp",
"type": "TIMESTAMP",
"priority": 1
}
]
expandedRows
array. You are displaying the mean travel time in the expanded row. Enter: "expandedRows": [{
"dataSourceId": "travel_time_id",
"label": "Mean travel time"
}]
"sort": "DESC"
.content.thresholds
array.
{
"comparison": ">",
"dataSourceId": "load_mean_ID",
"label": "Critical",
"severity": 3,
"value": 376
}
{
"comparison": ">",
"dataSourceId": "load_max_ID",
"severity": 1,
"label": "Warning",
"value": 377
}
dataSource
object.
dataSource.attributes
array. You specify the data item name in attribute
, assign an aggregation method in aggreator
,
and map the id
field to the content.series.dataSourceId
attribute. For example: "attributes": [{
"aggregator": "max",
"attribute": "load",
"id": "load_max_ID"
},
{
"aggregator": "mean",
"attribute": "load",
"id": "load_mean_ID"
},
{
"aggregator": "mean",
"attribute": "travel_time",
"id": "travel_time_id"
}
]
dataSource.range
object. Show data for the last 7 days. Enter: "range": {
"count": -7,
"interval": "day"
}
"timeGrain": "day"
.
{
"type": "VALUE",
"id": "add_card_ID_here",
"size": "SMALL",
"title": "add value card title here",
"content": {
"attributes": [{
"dataSourceId": "add_datasource_ID_here",
"precision": 3,
"label": "add label here",
"thresholds": [{
"color": "#5aa700",
"comparison": "<",
"icon": "icon--checkmark--outline",
"value": 10
},
{
"color": "#F00",
"comparison": ">",
"icon": "icon--warning",
"value": 10
}
]
}]
},
"dataSource": {
"attributes": [{
"aggregator": "add_aggregator_here",
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here"
}]
}
}
Populate the value card with the following data:
"type": "VALUE"
."id": "value_card_ID"
."size": "SMALL"
."title": "Latest"
.Define the metrics to display on the value card in the content
object. Define the metrics to display in a content.attributes
array. Create a dataSourceId
for each metric and assign a metric. Note:
Later, you define a dataSource
object to map the attributes you display on a card with the data items in the database. Define a threshold for the value. Display a warning icon if the average load is greater than 10. Define another
threshold to display a check mark icon if the average load is normal. Enter:
"attributes": [{
"dataSourceId": "load_mean_ID",
"precision": 3,
"label": "load",
"thresholds": [{
"color": "#5aa700",
"comparison": "<",
"icon": "icon--info--outline",
"value": 10
},
{
"color": "#F00",
"comparison": ">",
"icon": "icon--warning",
"value": 10
}
]
}
]
dataSource
object. Define the source of the data items that are displayed on the card in the dataSource.attributes
array. You specify the data item name in attribute
, assign
an aggregation method in aggreator
, and map the id
field to the content.series.dataSourceId
attribute. Enter: {
"attributes": [{
"aggregator": "last",
"attribute": "load",
"id": "load_mean_ID"
}]
}
Go the image card object:
{
"id": "Robot-overview-image",
"size": "LARGE",
"title": "Last month",
"type": "IMAGE",
"content": {
"image": "add_image_id_here",
"alt": "Painting robot",
"hotspots": [{
"color": "#00F",
"icon": "icon--info--outline",
"content": {
"attributes": [{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
},
{
"dataSourceId": "add_datasource_ID_here",
"label": "add label here"
}
]
},
"type": "fixed"
"locations": [{
"x": "add_coordinate_here",
"y": "add_coordinate_here"
}]
}]
},
"dataSource": {
"attributes": [{
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here",
"aggregator": "add_aggregator_here"
},
{
"attribute": "add_data_item_name_here",
"id": "add_datasource_ID_here",
"aggregator": "add_aggregator_here"
}
],
"range": {
"count": -1,
"interval": "add_interval_here"
}
}
}
"type": "IMAGE"
."id": "Robot-overview-image"
."size": "LARGE"
."Last Month"
.Define the image to display on the card and metrics to display in hotspots in the content
object.
"image": "robot"
."alt": "Painting robot"
.Define a hotspot to display in a static location on the card. Specify the attributes to display in the hotspots.content.attributes
array and the location of the hotspot in the hotspots.locations array
. Enter:
"hotspots": [{
"color": "#00F",
"icon": "icon--info--outline",
"content": {
"attributes": [{
"dataSourceId": "load_mean_id",
"label": "Average Load"
},
{
"dataSourceId": "load_max_id",
"label": "Max Load"
}
]
},
"type": "fixed",
"locations": [{
"x": 5.2,
"y": 10.5
}]
}]
dataSource
object.
dataSource.attributes
array. You specify the data item name in attribute
, assign an aggregation method in aggreator
and map the id
field to the content.series.dataSourceId
attribute. Enter: "attributes": [{
"attribute": "load",
"id": "load_mean_id",
"aggregator": "mean"
},
{
"attribute": "load",
"id": "load_max_id",
"aggregator": "max"
}
]
dataSource.range
object. Show data for the last month. Enter: "range": {
"type": "periodToDate",
"count": -1,
"interval": "month"
}
Note: Alert cards are only supported in the beta environment.
Go the alert card object:
{
"id": "alerts",
"size": "LARGE",
"title": "Alerts in the last 3 hours",
"type": "ALERT",
"dataSource": {
"range": {
"count": -3,
"interval": "add_interval_here"
},
"type": "alert"
}
}
"type": "ALERT"
."id": "Robot-alerts
."size": "LARGE"
."Robot alerts in the last 3 hours"
.dataSource
configuration, set interval
to hour
. dataSource
configuration, confirm that type
is set to alert
.Save your JSON file. Validate that the JSON file is well formed before you use it. The dashboard configuration in the JSON file is similar to the following example:
{
"title": "Painting robot load performance",
"cards": [{
"type": "TIMESERIES",
"id": "line_cardID",
"size": "LARGE",
"title": "Minimum load vs Maximum load vs Average load",
"content": {
"series": [{
"dataSourceId": "load_mean_ID",
"label": "Average Load"
},
{
"dataSourceId": "load_max_ID",
"label": "Minimum Load"
},
{
"dataSourceId": "load_min_ID",
"label": "Maximumu Load"
}
]
},
"dataSource": {
"attributes": [{
"aggregator": "mean",
"attribute": "load",
"id": "load_mean_ID"
},
{
"aggregator": "max",
"attribute": "load",
"id": "load_max_ID"
},
{
"aggregator": "min",
"attribute": "load",
"id": "load_min_ID"
}
],
"range": {
"count": -1,
"interval": "day"
},
"timeGrain": "hour"
}
},
{
"type": "TABLE",
"id": "table_card_ID",
"size": "LARGE",
"title": "Load",
"content": {
"columns": [{
"dataSourceId": "load_max_ID",
"label": "Max"
},
{
"dataSourceId": "load_mean_ID",
"label": "Mean"
},
{
"dataSourceId": "timestamp",
"label": "Timestamp",
"type": "TIMESTAMP",
"priority": 1
}
],
"expandedRows": [{
"dataSourceId": "travel_time_id",
"label": "Mean travel time"
}],
"sort": "DESC",
"thresholds": [{
"comparison": ">",
"dataSourceId": "load_mean_ID",
"label": "Critical",
"severity": 3,
"value": 376
},
{
"comparison": ">",
"dataSourceId": "load_max_ID",
"severity": 1,
"label": "Warning",
"value": 377
}
]
},
"dataSource": {
"attributes": [{
"aggregator": "max",
"attribute": "load",
"id": "load_max_ID"
},
{
"aggregator": "mean",
"attribute": "load",
"id": "load_mean_ID"
},
{
"aggregator": "mean",
"attribute": "travel_time",
"id": "travel_time_id"
}
],
"range": {
"count": -7,
"interval": "day"
},
"timeGrain": "day"
}
},
{
"type": "VALUE",
"id": "value_card_ID",
"size": "SMALL",
"title": "Latest",
"content": {
"attributes": [{
"dataSourceId": "load_mean_ID",
"precision": 3,
"label": "load",
"thresholds": [{
"color": "#5aa700",
"comparison": "<",
"icon": "icon--info--outline",
"value": 10
},
{
"color": "#F00",
"comparison": ">",
"icon": "icon--warning",
"value": 10
}
]
}]
},
"dataSource": {
"attributes": [{
"aggregator": "last",
"attribute": "load",
"id": "load_mean_ID"
}]
}
},
{
"id": "Robot-overview-image",
"size": "LARGE",
"title": "Last month",
"type": "IMAGE",
"content": {
"id": "robot.png",
"alt": "Painting robot",
"hotspots": [{
"color": "#00F",
"icon": "icon--info--outline",
"content": {
"attributes": [{
"dataSourceId": "load_mean_id",
"label": "Average Load"
},
{
"dataSourceId": "load_max_id",
"label": "Max Load"
}
]
},
"type": "fixed"
"locations": [{
"x": 5.2,
"y": 10.5
}]
}]
},
"dataSource": {
"attributes": [{
"attribute": "load",
"id": "load_mean_id",
"aggregator": "mean"
},
{
"attribute": "load",
"id": "load_max_id",
"aggregator": "max"
}
],
"range": {
"count": -1,
"interval": "month"
}
}
},
{
"id": "alerts",
"size": "LARGE",
"title": "Alerts in the last 3 hours",
"type": "ALERT",
"dataSource": {
"range": {
"count": -3,
"interval": "hour"
},
"type": "alert"
}
}
]
}
Tip: If the hotspot does not display on the image card, make sure to set the time range on the image card to a period of time that contains data. Alternatively, you might need to resize the dashboard for the hotspot to display.