Once you signed-up to ThingsBoard PE Cloud we automatically create separate Tenant account for you. The email and password you have specified allows you to login as Tenant Administrator. Also, we automatically provision sample Smart Metering application for your Tenant. The purpose of this application is to show how different ThingsBoard features are used to implement smart metering use cases. Let’s briefly review those use cases one-by-one:
There are different Buildings in the city. Each Building has a few Apartments and each Apartment has 3 devices - Energy/Water meters and Thermostat. Buildings, and Apartments are represented as Assets. Relations with type ‘Contains’ are used to represent how assets/devices are connected between each other.
Devices submit telemetry every 30 seconds.
We want to know how much water/energy was consumed on Building level. Buildings and Apartments have aggregation telemetry that represents an aggregated value from all related devices.
If Energy consumption during the last 20 minutes is more than 40 kWh then we want to generate a Critical Alarm for that Building. Otherwise, if consumption is lower then 10 kWh - we want to clear current Building Alarm if it exists.
Each group view can be configured and additional columns can be added, like ‘Assigned Customer’, attribute or latest telemetry value. Also, you can add different action buttons, for example, open dashboard for the selected device. Asset and Device Groups can be used for resolving dashboard aliases.
More information can be found in Device & Asset groups documentation.
In device details page, in the ‘Attributes’ tab, you can find server attributes that are responsible for handling device lifecycle events. ThingsBoard monitors device state (online/offline) and generates device offline events if a device is offline is more then 60 seconds. You can generate alarms and send notifications when your critical devices are going offline.
More information about Device Connectivity Status events can be found in Device Connectivity Status documentation.
It is a complex multi-page navigation Dashboard that visualizes Buildings, Apartments, and data from Devices. You can use it to learn how to:
More information about dashboard configuration you can find in Dashboard development guide.
More info about Scheduled Events you can find in Scheduling section of this guide.
You can export any Dashboard into different formats - PDF, PNG, JPEG. Also, you can export data from any widget into SCV format.
In some cases, you need to create custom widgets for your solution. In Widgets Library we have created custom widget bundle - ‘Demo Custom Widgets’ and added 3 custom widgets in this bundle.
There is a ‘Demo Custom Widgets’ dashboard that is configured to use custom widgets form that bundle:
More information about custom widget creation you can find in Widgets Development Guide.
There are 2 Customers that are created in the scope of the Smart Metering Demo - ‘Customer A’ and ‘Customer B’.
|Customer Name||User Login||User Password||Assigned Assets/Devices||Assigned Dashboards|
|Customer A||ca_[[email protected]]||customer||Building A
All Apartment A-1 devices
All Apartment A-2 Devices
|Demo Custom Widgets|
|Customer B||cb_[[email protected]]||customer||Building B
All Apartment B-1 devices
All Apartment B-2 Devices
|Demo Custom Widgets
*Please replace [[email protected]] with your real email that was used for registration.
Customers have access only to the assigned dashboard/assets/devices. If few customers have access to the same Dashboard, they will be able to see data only from assigned Assets/Devices. To verify this you can log in as Customer and find that on ‘Demo Custom Widgets’ Dashboard you can see Thermostats only from the single Building.
Scheduled events are used to execute predefined Tasks on a scheduled basis. For example, you want to Enable cooler system every morning and disable it every evening. There are 3 redefined Scheduled Events:
Every Monday, at the specified time, a PDF report will be created. ‘Demo Smart Metering’ Dashboard will be used for report generation. You can configure to send a report to your email, by enabling ‘Send Email’ checkbox in Event configuration. All reports will be saved in Database and available for download via ‘Files’ widget on the ‘Demo Reporting’ Dashboard.
More information about Reporting feature you can find in Reporting Guide.
This Event will send RPC command to all devices from the ‘Thermostat’ Group every Monday and Tuesday. Each Device will receive this RPC command:
More information about RPC feature you can find in RPC Guide.
This Event will update ‘State’ attribute for all Apartments with the ‘silent’ value. This action repeated every day.
More information about ThingsBoard Scheduler you can find in Scheduler Guide.
ThingsBoard web interface allows you to configure your company or product logo and color scheme. The following configuration options are available:
More information you can find in White Labeling Guide.
There are 5 preconfigured Rule Chains in the system:
In our Demo scenario, devices submit their telemetry (water & energy consumption) every 30 seconds. And we want to know how much water/energy was consumed on Building level. So we want to sum all the measurements from all devices in the building within 20 minutes intervals. ‘Smart Metering Aggregation’ Rule Chain perform this aggregation using this algorithm:
After Aggregated telemetry saved, a message is routed to the ‘Smart Metering Alerts’ Rule Chain for generating Alerts if consumption threshold is reached.
If Energy consumption during the last 20 minutes is more than 40 kWh then we want to generate a Critical Alert for that Building. Otherwise, if consumption is lower then 10 kWh - we want to clear current Building Alert if it exists. ‘Smart Metering Alerts’ Rule Chain implements this logic.
As an option, we can send an Email or SMS when an alert is generated\cleared.
For sending Email when Alert is created, you need to create relation from ‘Create Energy Alarm’ node to the ‘Put Energy in Metadata’ node using ‘Created’ link type. After that, you will need to edit ‘Build Email’ node and update ‘To email’ property to your email address.
For sending SMS when Alert is created, you need to create relation from ‘Create Energy Alarm’ node to the ‘Build SMS’ node using ‘Created’ link type. After that, you will need to edit ‘Send SMS’ node and update credentials for connecting to the Twilio Service.
More information about Rule Chains you can find in Rule Engine Overview.
ThingsBoard Platform integrations feature was designed for two primary use cases/deployment options:
Uplink Converters are used for Transforming incoming message payload into the required format. Downlink Converters used for transforming outbound message payload.
You can use 2 Uplink and 2 Downlink predefined Converters as a reference for implementing your own converters.
You can find list of all supported integration types in Integration Tutorials
More information about Integrations & Converters you can find in Platform Integrations Overview.
Some ThingsBoard features are using Tenant Email Settings for sending emails - for reporting, send alert notifications, etc. By default, Tenant Email Settings are blank and if you want to receive emails from the ThingsBoard you will need to connect ThingsBoard to external Email Server. It can be a Gmail or SendGrid or any other SMTP provider. Just open ‘System Settings’ -> ‘Mail Server’ and clear ‘Use System Mail Server Settings’ checkbox.
Important - if you will not make this configuration, you will not be able to send emails from the ThingsBoard.
Please find instructions how configure SMTP settings:
There is a Rule Chain Smart Metering Device Emulators that generates data for the Smart Metering Demo. Data generation is disabled by default. If you want to see how Smart Metering Dashboard is updated with the Real-Time Data you will need to enable Data Generation.
Navigate to Rule Chains -> Smart Metering Device Emulators, add new node Rule Chain that will redirect messages to the Root Rule Chain. After that connect Post Telemetry node with the Root Rule Chain node using Post Telemetry link. Save Rule Chain.
After this configuration, the system will emulate data from devices that are part of the Smart Metering demo and you will see that values on the Dashboard are updated in Real-Time.