Lesson 2.2 HTML and CSV reports
These reports are easily created in the rule engine as an action and linked to a condition so they are created with the current data of the device. When a report is created it can be sent directly to your mail. They can't be edited after they are created but that is where excel reports come in. Rule engines report are easy to set up.
In this lesson, we’ll cover the following topics:
- How to create HTML Reports and use Rule Engine send them to E-mail recipients.
- How to create different type of CSV Reports and use Rule Engine send them to E-mail recipients.
Refer to the Report Generator User Guide for detailed specifications and configuration options for each report type.
1. HTML Graphs (Email Reports)
These are HTML graphs embedded in emails, allowing quick insights into time series data directly from your inbox. Each report can include multiple graphs, with several devices per graph.
How to set it up:
- Go to the Rule Engine.
- Create a contact (email recipient) for the report.
- Create a Report action, type should be
Report
and the JSON should specifie the_id
of the IoT nodes, type of measurements to include, the resolution, the time period and the type of graph. You find the_id
in theGeneral
tab of each IoT node. - Create a Rule with a
Cronjob
as the trigger (to schedule the report). - Set your Report Action as the rule’s output and assign the intended recipient.
Click the>
button to trigger the rule — the recipient should receive an email shortly. - Experiment with different types of Report Actions and observe how they affect the HTML graphs and the reports you receive.
2. CSV Export Reports (Email or Direct Download)
These reports function similarly to HTML Graphs but only include the raw data in CSV format, without any graphs. CSV data can also be directly exported from any Device View and from Charts.
How to set it up:
Rule Engine:
- Follow the same steps as for HTML Graphs.
- In the Report action , configure it to output CSV only.
Direct download:
- Devices → Select View → Select Many → Choose Devices → Action → Export to File
- Devices → Select a Device → Chart → Select measurement and time periods → Download Data
- Devices → Select Many → Choose Devices → Action → Charts → Select measurement and time periods → Download Data
This option is ideal for those who want structured data for external processing or archiving.
Also try the "Device Count" report type, which generates a report that can be used for invoicing purposes by exporting the CSV file to a compatible system.
3. Export Device List Views to CSV files
One of the easiest ways to export a view’s live data is by exporting it as CSV files. This is also the easiest way to change device names for thousands of devices. You can even update your device data this way, letting you edit devices quickly and easily — as long as you include the _id
field.
For more details see Export views with CSV
4. Export Device Time Series Data to CSV files
Another easy way is to export the data in a Chart view, this can be done both from a Device Chart and the Advanced Chart that can hold multiple devices and multiple devices.
For more details see Export views with CSV