Skip to main content

Track KPIs and Create Interactive Dashboards in Zerynth Cloud

Dashboard is the interface the user uses to interact with the IoT solution. It enables clear visualization of key KPIs on the solution and enables control over fleets of devices. Zerynth makes it easy to control devices, monitor industrial sensors and machines, and generate reports through our integrated dashboard service. In this tutorial, We will create our first dashboard in Zerynth Cloud, We will create a basic template with 1 panel to visualize data, Feel free to customize the template according to your application.

Activate Zerynth Dashboard

The first step is to enable the Zerynth Dashboard service in your workspace, Inside your workspace, click on “Zerynth Dashboard” section in the left bar.

Dashboard

Enable the dashboard service by clicking “Enable Zerynth Dashboard” button.

Dashboard

Create a new Layout

Inside the dashboard section, Click on “+” and then on “Dashboard”.

Create a new panel by clicking on “Add an empty panel".

Dashboard

On the right, there are some settings about the panel such as panel name, panel type, and other settings that depend on the active panel. On the left side, you can make a query to get data to visualize. You can write a query using “Query builder” or write an SQL raw query. Initially, you are in “Query builder” mode, but by clicking on “Edit SQL” you switch to raw query mode.

Dashboard

Here's an example of an SQL raw query with the “Time series” panel type.

SELECT 
ts_device as time,
(payload->>'temp')::float as temp
FROM data
ORDER BY ts_device

Dashboard

Click on the “Save” button on the top right to save the dashboard.

SQL Query

through SQL queries you can get data or conditions.

Data queries

To get data, you need to put “data” after “FROM”, and you can use the following columns.

NameTypeDescription
ts_devicetimeTimestamp corresponding to when the data has been sent by device
ts_zdmtimeTimestamp corresponding to when the data has arrived on ZDM
ts_dbtimeTimestamp corresponding to when the data has been save on database
workspace_idstringWorkspace id of the device
fleet_idstringFleet id of the device
device_idstringId of the device
tagstringPublication tag with whom the data has been sent by device
payloadjsonbPayload published by device

Events queries

To get events, you need to put “events” after “FROM”, and you can use the following columns.

NameTypeDescription
tstimestampThe UTC timestamp of the event
ts_dbtimestampTimestamp corresponding to when the data has been save on database
workspace_idstringWorkspace id of the device
fleet_idstringFleet id of the device
device_idstringId of the device
typestringType of the event (e.g., connecttion, job)
directionstringThe direction of the event. Possible values are: c2d (Cloud to Device) or d2c (Device to cloud)
payloadjsonbPayload of the event

More information

In simple steps, we have created our template in Zerynth dashboard. If you have any questions, Please drop us a message on our Helpdesk.