IoT platform Total.js
Tags: node, totaljs, iot, development
Published: 2024-03-26 09:14:43

The [IoT platform](https://www.totaljs.com/iot/) is an app from [Total.js Enterprise](https://www.totaljs.com/enterprise/) created by [Total.js](https://www.totaljs.com/), that can handle the management of IoT devices for various cases, like smart cities, industry, or smart metering. It consists of several parts that together form an environment for managing devices, creating drivers for devices, sensors with the ability to create custom data views, customizable alerts, monitoring current values on an interactive map, creating panels with real-time data, analyzing data and creating reports according to your requirements.


## Map and Zones
Zones allow us to mark a specific point on the map and insert sensors whose values will be displayed on the interactive map. The map is targeted at a selected point and all zones are displayed as independent parts. The map allows you to filter zones based on categories and search for zones by name. With a closer look small panels will appear above each zone with the last received values from displayed sensors. By clicking on one of these panels more detailed view will appear, where you can see when the value was received and a chart showing the evolution of the monitored value with the possibility to modify this chart with your preferences.

![An example of the sensor display on the map](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pl794vmlv2ry61kfn7ee.gif)

## Drivers
Drivers are necessary to process received data from your devices. You don't need to create logic to store data in the database, it is prepared for easy usage, but **you have to create your own drivers** for your devices. When you are creating a driver for your device, you need to define the outputs, connect the received data with these outputs and eventually process this data. You can find more information about drivers in our [documentation](https://docs.totaljs.com/iot/IebeqS1cW61f/#example-of-driver) and we also prepared some examples of drivers.

## Devices
Devices are virtual representations of real devices. To create a device in the platform it is necessary to have ready your driver. In section devices you can see all registered devices with basic information like name, driver name, locality, serial number and status. The serial number is important for pairing received data with the correct device and status tells us, if the device is receiving data or not.

In detail we can see more meta information about device and all device sensors with last received values, timestamp when was this value received and options to change stats granularity. Also we can hide sensors that are not required for our device.


![An example of the device section](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/syw0mesr51gbad45vo0a.gif)

## Sensors and data views
Sensors are created automatically based on the selected driver for the device. In section sensors you can see all sensors with name, locality, last received value with time when was this value received, alerts for sensor, serial number and status. Status for sensors works same as status for devices and the length of time after which it goes offline we can set for both in the driver. By clicking on some sensor we can see the history of received data for a sensor with filtering options and possibility to download this data as a csv file.

With data views it is possible to combine received values from as many different sensors as you want and the resulting value can be displayed on a map. You can choose an operation you want to do between these sensors values (max, min, avg, sum) and you can also format the resulting value.


![An example of sensors and data views](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2mhbyoot7n8gvl5wknh0.gif)

## Alerts
Alerts are automatically created with unexpected driver behavior, or you can create customized alerts with Total.js Flow. To quickly catch alerts, the number of new alerts is displayed in the control panel.

## Panels
To use panels it is **necessary to install [Total.js Flow](https://docs.totaljs.com/flow10/)**. Panels are used to easily display the current values from the platform on simple display devices.

After creating a panel in the platform you have to copy generated link and upload it to Total.js Flow, which will create a new component for this panel. Then you can access received data with publishers in Flow and display them on the panel as a simple HTML structure. The created page can be accessed on the link that can be found in the given panel in the IoT platform.


![An example of the panel integrated with Total.js Flow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/53w1toev5f4uns8e8i3y.gif)

## Reports
To use reports it is **necessary to install [OpenReports](https://docs.totaljs.com/openreports/)**. With reports you can create reports from all received data based on your specific requirements. It allows you to browse your data, filter in them and download them as csv file or xlsx.

From existing reports the IoT platform offers the possibility to create API interfaces with their data. After selecting the desired report, a link is created from which you can instantly retrieve the data in a csv form. There is also possibility to set a verification token for every API interface or deactivate it.


![An example of the reports integrated with OpenReports](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lpfzmie4z4i3iqspjskn.gif)

**Introduction to IoT platform**
{% youtube uCMibexXUb4 %}