This article is part of a series to show how to integrate Gravio with different dashboards and data visualization platforms, and using different techniques to show your data in new and interesting ways. Today we will be showing you how to use Databox as a data visualization platform for Gravio CO2 sensor data.
tldr; we are using a Gravio CO2 sensor and HTTPS API requests, and aim to visualise Time Series data of sensor readings over time and in real-time.
Note: if you have a Gravio Basic subscription, you could use a Temperature Sensor instead, as that will also provide Time Series data, though the data is sent less frequently.
We use HTTPS to send the data because: this is usually the minimum that a Dashboard provider needs to support; it doesn’t require an MQTT broker setup, and allows us to focus on the Dashboard’s core purpose: showing information.
Databox is a cloud-based platform that enables companies to monitor, analyze and react accordingly to the data displayed in one place. You can choose between various types of integration with other popular platforms such as Google Analytics etc.
Log in to Databox and head over to ‘Data Sources’ tab and select ‘New Connection’
Look for the ‘Push Custom Data’ tile and select it. Then, press ‘Create Token’ and follow the steps.
Note: Please remember to copy your token as we will need to use it later.
After the data source has been created, now we are ready to connect the data to Databox.
Open Gravio Studio:
Note: Databox HTTP tokens use the username. And you may want to refer to their API documentation for extra guidance.
You can use the diagram below as a reference.
Next, we will set the pre-mapping on the right column.
Note: The ‘$’ character is required by Databox to set the Metric in the Data Source, so please remember to include it.
Let us now test the Action created. Press the Play button on Gravio Studio and if it is successful, it will display something like this in the console.
Now we will need to create the Trigger for the Action we want. In this case, we want the Trigger set up such that when a CO2 Reading has been collected by the Gravio CO2 Sensor, it will Trigger the Action to post the reading to Databox Platform.
You can refer to the following images as a reference for the steps.
Finally, remember to turn on the Trigger as we are using it.
Go back to Databox and go into the ‘Data Management’ tab on the left. If the data sent was successful, you should see that the Data Connection Status will be changed to ‘Updated just now’.
Note: If the status did not change, you may need to refresh your browser.
Time to begin the visualisation process! Go to your Dashboard, create one if you do not have one and select ‘Edit’.
Note: You may want to ensure that your dashboard is clean so that it does not get too confusing.
We need to add a data source to the dashboard.
In order to determine what this box is ultimately going to display, we will need to change its settings to get the data from the source that we have created.
Finally, we will need to go into ‘Advanced Settings’. In this section, you will choose how the data you have sent from Gravio is manipulated. For example, you can add the values, count, min, avg etc.
To display real-time data, I have selected ‘LATEST’ as my aggregations. Alternatively, you can refer to the diagram below and follow the exact configuration.
Hooray! We have successfully sent custom edge processed CO2 readings from Gravio Studio to Databox! To view your Dashboard and see how it looks, please go back to the home page and select ‘View’ on your dashboard.
Databox has clear documentation for the integration process which makes pushing data to the dashboard for visualization very simple. If you have data connections which you would like to visualize quickly from anywhere, Databox is a great choice.