Note: This pattern is part of a composite pattern. These are code patterns that can be stand-alone applications or might be a continuation of another code pattern. This composite pattern consists of:
- Integrate a TRIRIGA perceptive app with Building Insights APIs (this pattern)
- Integrate an Indoor Positioning System with TRIRIGA
In this developer code pattern, we’ll demonstrate how to build a custom perceptive application within a TRIRIGA® instance.
TRIRIGA is a system used to monitor enterprise facilities by integrating data from real estate portfolios, construction projects, workplace assets, and so on. We can extend the TRIRIGA capabilities with custom business logic by deploying a “perceptive app” via the UX framework. A perceptive app is a dynamic, custom application built using the TRIRIGA UX framework. This is structured as an MVC architecture. The application “View” is built using the Polymer library, which makes it simple to create an interactive dashboard using modular web components. These components can provide visual elements such as graphs, maps, images, and so on. Each component can be rendered by data pulled from internal TRIRIGA reports or API data from other offerings (Building Insights, Weather Company).
The project dependencies (Polymer, web components, UX framework) are all pre-installed within the TRIRIGA instance. Additional third-party dependencies can be uploaded along with the project code.
The Building Insights service provides APIs to retrieve real-time occupancy/energy sensor data, as well as an analytics engine to perform prediction and anomalies. The Building Insights service tracks sensor data such as energy consumed per hour, number of people on each floor in a building, and so on. Our solution demonstrates a way to integrate the Building Insights analytics engine and data into TRIRIGA. This is achieved by using a deploying a Node.js back end on Kubernetes to periodically make REST calls to the available APIs. As data is retrieved, it is then cached in a Cloudant® database.
When you have completed this code pattern, you will understand how to:
- Design and publish a customized Polymer application to a TRIRIGA instance
- Pull occupancy and energy data via Building Insights APIs
- Persist historical data in a Cloudant® database
- Node.js back-end requests updates dataset from Building Insights APIs every hour and persists certain values into a Cloudant database. This allows for us to build a chronological hourly dataset, which can be used to create custom analytics models/graphics.
- Custom TRIRIGA app pulls formatted sensor data from Node.js back end to render graphics and tables.
Ready to give it a try? Please see the README for detailed instructions.