[Tutorial] Visualizing IoT edge data on the Kaa Platform, an IoT platform with rich data visualization
Tutorial on how to connect and send IoT edge data to the Kaa Platform, and IoT and Dashboards platform. It will show you one way how Gravio IoT Platform can easily visualize data using a third party platform. We will be gathering CO2 sensor readings at the edge, and then displaying the values on the cloud-based dashboard.
Introduction
This article is part of a series to show how to integrate Gravio with different Dashboard or Data visualization platforms and using different techniques to show your data in new and interesting ways, while also enabling you to use your existing dashboards or introduce new ones.
Approach
tldr; we are using a Gravio CO2 sensor and HTTPS API requests, with the 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.
The Kaa Platform provides a range of pricing options to suit all kinds of projects and installations, check out their pricing info here to get a better idea. The cloud offering is called Kaa Cloud.
2. In the Actions view, Click the [ + ] button to create a new Action
3. In the new Action dialogue window:
Enter a name and description for your Action
Click OK to save
4. Open your new Action by double-clicking it in the Actions view:
5. Click the large [ + ] button to add a new step
6. Now we will add an HTTP Request step:
Click the Network tab
Click to select the HTTP Request step
Click Add
7. Now we will set up the HTTP request to send data to the Kaa Project as per the below screenshot:
Select your HTTP Request step
Change the Method dropdown to POST
Update the following URL text with the information you saved earlier for your environment: https://connect.cloud.kaaiot.com:443/kp1/{your-application-version-name}/dcx/{your-endpoint-token}/json
Copy the updated URL text and paste it into the URL field
Change the Content-Type dropdown to application/JSON
In the Pre-Mappings section click the (+) button and add the following: cv.Payload = "{\"value\": + tv.Data + "}"
Close this Action Editor view (it will automatically save your changes)
8. Next, we will create a Trigger that will call this Action when we receive a new date from the CO2 sensor.
Close the StreamCO2Data action, and close the Actions window
Click on the Trigger tab in Gravio Studio
Click on the Add new event Trigger button (lightning bolt with a +)
Enter a Name e.g. ‘CO2 Update’
In the ‘Conditions’ tab, select your Area from the Area dropdown e.g. ‘Inside’
Select the CO2 Layer in Key Layer e.g. CO2 (as per Conditions tab screenshot below)
In Physical Device ID, click the ‘+’ button, which should populate with your CO2 device, then check that box
Then in the ‘Action’ tab, select the ‘StreamCO2Data’ action in the Action dropdown (as per the Action tab screenshot below)
Then click Add - done
Done!
Now that your Trigger and Action are set up, your Kaa graphs should now start updating as CO2 data starts coming in and being pushed out to Kaa by Gravio:
Via Kaa Dashboard > Device Management > Devices > select CO2 endpoint.
Summary
The Kaa Project has a range of functionality for combining and visualising your data, of which we’ve only scratched the surface with here! As you can see the setup is relatively straightforward for this kind of integration, and there is a rich documentation site to support whatever you are trying to create with Kaa.
Tutorial on how to use Gravio, MQTT, and Eniscope to build a simple Energy reporting and logging system without coding. Connect data points to Line for notifications and writing to a CSV file for logging.