Open-source IoT Platform

Device management, data collection, processing and visualization
for your IoT projects
Learn about Thingsboard

Friday, December 23, 2016

Facilities monitoring system prototype using Thingsboard

Environmental controls in the office rooms are very important as loss of HVAC can result in significant loss to servers, network gear, employee productivity etc. Few days ago we decided to prototype facilities monitoring system that will be able to cover following use cases:
  • Monitoring of temperature and humidity in different zones of the office building.
  • Processing of collected telemetry with various alerting rules based on zone type: work space, meeting and server rooms.
  • Distribution of collected alarms to assigned facility managers.
  • Visualization of real-time and historical values on the configurable web dashboards.
This article describes development and configuration steps we have done in order to build the PoC. The prototype is open-source and is also based on open-source technologies, so you are able to use it for building commercial products.

Facilities management
Data flow diagram

Devices and Connectivity

We decided to use quite cheap hardware based on ESP8266 and DHT22 sensor. The total cost of each device that includes sensor and connectivity module is approximately 5$. Since this is a prototype, we decided to use MQTT over WiFi and have not discussed other connectivity options.

Server-side infrastructure

The server-side part of the solution will be based on the Thingsboard IoT platform which is 100% open-source and can be deployed both in the cloud, on premises or even on Raspberry Pi 3. The collected data is stored to Cassandra database due to built-in fault-tolerance and scalability. We have recently launched Live Demo instance to simplify getting-started process, so we will use this instance in the tutorial.

Development and Configuration steps

Step 1. Device provisioning

Initial step of the PoC was to provision several devices and their attributes. We’ve decided to support three zone types: work area, meeting and server rooms. We have registered three buildings with four rooms in each. During registration we have populated Zone Id, Zone Type server-side attributes. Note that the server-side device attributes may be used by the processing rules, but are not visible to the device itself.

Server side attributes

Step 2. Flushing the devices

During this step we have flushed firmware update with individual device credentials built-in to the firmware. The firmware code and corresponding instructions are available in links below. We have used code from our previous article without modifications, since all the logic is on the server side.

Please note that steps 1 and 2 may be automated, we’ve developed simple java based application that performs provisioning of the devices and other entities using REST API and also emulates this devices for the live demo purposes.

Step 3. Processing Rules

During this steps we have provisioned rules that analyze temperature and humidity against configurable thresholds based on zone type. For example, acceptable humidity range in server room is between 40% and 60%, however, humidity range for the work zone is from 30% to 70%.

The rules are basically set of logical expression written using javascript syntax. For example, rule for a server room consist of two parts: attribute and telemetry filter. This filters may be combined, but we decided to separate them to simplify the PoC.

Attributes filter body example:
typeof ss.ZoneType !== 'undefined' && ss.ZoneType === 'Server Room'
Telemetry filter body example:
(
typeof temperature !== 'undefined'
&& (temperature <= 10 || temperature >= 25)
)
|| 
(
typeof humidity !== 'undefined'
&& (humidity <= 40 || humidity >= 60)
)
You may notice “null” checks in the filter body. This is basically a good practise, because you may use same server for multiple device applications. Some of them report humidity and temperature, some of them upload other sensor readings and this should not affect rules processing.

Step 4. Alarms distribution

At this step we have configured email plugin to distribute data using SendGrid mail service and provisioned rule action to send data to the configured mail address. Rule action consists of several templates that allow flexible configuration of email topic, body and adress list based on substitution of device attributes and telemetry values. For example, following email body template:
[$date.get('yyyy-MM-dd HH:mm:ss')] $ss.get('ZoneId') HVAC malfunction detected. 
Temperature - $temperature.valueAsString (°C). 
Humidity - $humidity.valueAsString (%)!
Will be evaluated to the following email body
[2016-12-22 15:06:09] Server Room C HVAC malfunction detected. 
Temperature – 45.0 (°C).
Humidity – 70.0 (%)!
The evaluation and template syntax is based on Velocity engine.

Step 5. Data visualization

At this step we provisioned several dashboards to visualize the data. We will describe them below.

Map dashboard

This dashboard shows multiple buildings on the map with their short status available in the tooltip. You can use links in the tooltips to navigate to Floor Plan and Historical Data dashboards.

Map Dashboard

Floor Plan dashboard

This dashboard uses static background image with the floor plan. We have placed widgets that show temperature and humidity in each room that is being monitored.

Floor Plan

Historical dashboard

This dashboard shows last minute of sensor readings that are reported each second.

Historical Data

Live Demo

In order to demonstrate this PoC in action you need to do two simple steps:
  1. Sign-up or login to the live demo instance and save your login and password.
  2. Download and launch device emulator using this link.
java -jar facilities-monitoring.jar demo.thingsboard.io
Once started, the emulator will ask you for your live demo login and password. This information will be used to get the JWT token and execute REST API calls in order to:
  1. provision demo devices.
  2. create rules and dashboards.
  3. start emulation of the temperature and humidity sensor data for provisioned devices using MQTT.

Conclusion

This prototype was written by two engineers literally in one day. Most of the time was spent on the client-side code (Arduino sketch for real device and emulator). The server-side part of the prototype has zero coding and was all about configuration of the rules, plugins and dashboards.

This demonstrates how easy is to prototype and build IoT solutions using Thingsboard. Of course, there is certain learning curve that you need to pass, but we hope that this article and other docs will help you to do this.

Your feedback

If you found this article interesting, please leave your feedback in the comments section, post questions or feature requests on the forum and “star” our project on the github in order to stay tuned for new releases and tutorials.

15 comments :

  1. This comment has been removed by the author.

    ReplyDelete
  2. IT is developing faster than anything, which cause the reduction of internet buying price. It also increase more new ways to reduce the captive cost of the business. IP phone quebec is using the internet to maintain the communication with more secure and translucent way.

    ReplyDelete
  3. A company has many thing to manage. Workforce management is the most important thing. It can cause the whole production to stand still. So you need professional personnel to do it. You can hire one from the call center pros santo domingo.

    ReplyDelete
  4. Hey friend, it is very well written article, thank you for the valuable and useful information you provide in this post. Keep up the good work! FYI, please check these depression, stress and anxiety related articles:

    https://www.easysketches.com/

    You can also contact me at [email protected] for link exchange, article exchange or for advertisement.

    Thanks a lot

    Dhruv

    ReplyDelete
  5. This is really a nice and informative, containing all information and also has a great impact on the new technology. Check it out here:get update

    ReplyDelete
  6. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...naked url

    ReplyDelete
  7. wow this saintly however ,I love your enter plus nice pics might be part personss negative love being defrent mind total poeple , Sincerly René

    ReplyDelete
  8. Any online business should be aware of the advantages of SEO search optimization, particularly if they desire a more significant proportion of the target market. If you're still uncertain about hiring an SEO expert, now is a good moment to consider a more successful strategy if you want to increase site traffic and capitalize on the thousands of visitors who are eager to learn more about your goods and services. SEO Companies Near Me

    ReplyDelete
  9. This post of Facilities monitoring system prototype using Things board, are so interactive and reliable for all the new ones but there are also very beneficial and highly valuable HND Assignment Writing Service available to getting from them in all over the UK respectively.

    ReplyDelete
  10. To maximize the visibility of hundreds of other products as customers pass by critical items like bread and milk, supermarkets keep them as far from the store entrance as possible. This is done using psychological insight. bopet film supplier

    ReplyDelete
  11. Thanks for your post, I will recommend kick the buddy game, hope you enjoy it.

    ReplyDelete
  12. trucking accident law firms
    This review discusses a prototype for a facilities monitoring system using Thingsboard. It provides an introductory overview, a detailed description of the system, technical details, potential use cases, benefits, challenges, user experience, data security, future development plans, audience engagement, feedback collection, grammar and language review, and a call to action. The system's purpose and significance are explained, and the prototype is described with key features and functionalities. The technical details include hardware and software requirements, IoT devices used, and data integration methods. The review also discusses potential use cases, benefits, challenges, user experience, data security measures, future development plans, audience engagement, feedback collection, grammar and language review, and a call to action. The content is praised for its informative nature, but it could benefit from visual aids like diagrams or screenshots to enhance understanding of the system's implementation. Overall, the review is informative but could benefit from visual aids to enhance understanding.

    ReplyDelete
  13. Program your IoT-enabled microcontrollers to read data from sensors Uno Online and send this data to ThingsBoard. You can use MQTT or HTTP protocols for communication.

    ReplyDelete
  14. "abogado de lesiones por accidentes de motocicleta"
    The review of the 'Facilities Monitoring System Prototype using Thingsboard' highlights the author's commendable effort in designing and implementing a practical solution for monitoring facilities. It provides a clear overview of the prototype's features and the use of Thingsboard for efficient monitoring. The review emphasizes the practicality and relevance of the Facilities Monitoring System, demonstrating its potential impact on streamlined facility management. It is a valuable resource for those exploring IoT-based facilities monitoring, shedding light on the successful integration of Thingsboard for an effective prototype.

    ReplyDelete

  15. Creating a facilities monitoring system prototype using Thingsboard involves setting up a platform for the Internet of Things Palworld Breeding Calculator (IoT) that allows you to collect, visualize, and analyze data from various sensors deployed in a facility.

    ReplyDelete