FuseThru devises a prototype for a Smart Building system using IoT components
In this joint development effort, Microsoft teamed up with FuseThru to prototype a new system used to monitor atmospheric variables, both inside and outside of the Flatiron Building in Atlanta, GA.
The English-American Building, commonly referenced as the Flatiron Building, was completed in 1897 and is located in downtown Atlanta, Georgia. The 11-story-tall building is the city’s oldest standing skyscraper. The Flatiron is protected by the city as a historic building in the Fairlie-Poplar district of downtown, and is listed in the National Register of Historic Places.
The Flatiron Building
Our solution resulted in creating multiple sensors placed in a variety of locations to collect data about a multitude of conditions. This data is stored locally, but a two-way request from Azure IoT Hub can open a data valve and start streaming data to the cloud. The team also built a dashboard that is used to interpret this data in real time.
- Jared Rhodes (@QiMata) – CTO, FuseThru
- Marshall Corry (@MarshallCorry) – CEO, FuseThru
- Ian Philpot (@tripdubroot) – Senior Technical Evangelist, Microsoft
One objective of the Flatiron smart building project is to reduce costs of running atmospheric controls of buildings in major cities by monitoring different data points with multiple sensors and adjusting building controls according to monitored environmental outputs.
FuseThru capitalizes on the growth and miniaturization of electronics. Working with existing sensors and modular tools, it provides easy upgrades for OEMs looking to improve product features so users can experience the benefits of the Internet of Things (IoT). Its FuseWorks software runs on ARM mbed, Yocto, Linux, Windows IoT Core, and Windows 10.
As well as the business requirements noted above, a number of other functional requirements needed to be considered:
- For atmospheric monitoring it is important to strategically position sensors within the building. To understand atmospheric levels for air quality, sensors must be located both within the building and externally. For this reason, 7 sensor arrays were deployed—2 on the first floor, 2 on the seventh floor, 2 on the tenth floor, and one on the roof.
- The first floor was selected because it is a public area. The seventh floor was selected because it hosts one of the co-working spaces. The tenth floor is currently unoccupied and gives us a control for the other floors.
- The outdoor sensor array was placed on the roof to capture outside atmospheric conidtions to allow us to compare and contrast data with indoor sensor arrays.
Engagement approach and team
FuseThru was invited to Microsoft’s Innovation Center in Atlanta to evaluate placing sensors throughout the building and build a system to interpret the data generated. Over multiple sessions and site surveys, a plan was developed. Engineers from FuseThru worked with Technical Evangelist Ian Philpot to start putting together specifications for the system that will be used.
A decision was made to use Visual Studio Team Services to collaborate on the project, track issues, and plan sprints. Some of the system will be built using FuseThru’s existing propriety technology, but they agreed to publish portions of the specific implementation for Flatiron on GitHub to share with the community at large.
Over the course of two, two-week sprints the team created and installed the sensors. They also built out the cloud infrastructure needed to collect the data and report on its findings. Most of the coding was done via pair programming using Microsoft Visual Studio 2015
The technical solution was designed based on the above business, functional, and non-functional requirements. The following table details the components along with the partner responsible for the deployment and operation and notes on how these components satisfied requirements:
|Raspberry Pi 2/Windows 10||Microsoft||Windows 10 IoT Core||7 Windows 10 Raspberry Pi-based sensor arrays. Each device is running a custom UWP application for communication with the cloud.|
|Azure cloud||Microsoft||Microsoft Azure IoT Services||The Azure cloud is used to provide all back-end and business intelligence functions, including device registration, security, data ingestion, real-time analytics, storage, and display.|
The fundamental premise of the technical solution was to design with the following architectural concepts in mind:
- Each component used is not dependent on any other component or could easily be replaced, updated or removed without affecting the entire solution.
- Build as much resilience into the solution as possible. For example, one of the challenges can be interruptions to connectivity. FuseThru’s design allowed us to queue the data locally and only send the data when a request is made to turn on the data valve via IoT Hub.
- A solution that supports the maintainability and extensibility of the solution by allowing each component to be updated without affecting the entire solution.
The Smart Building system consisted of Windows 10 IoT running on the sensors, Azure IoT Hub, Stream Analytics, Event Hubs, and a website running in Azure App Service. FuseThru fabricated custom hosing for the sensors to blend with the aesthetics of the building. The final solution consisted of the following workflow:
- Data collected by the sensor is stored locally, and can be queried using FuseThru’s distributed query technology.
- A request made to the sensor via Azure IoT Hub’s two-communication protocol opens the data valve to the cloud.
- Data is sent to Azure IoT Hub.
- Stream Analytics, using window functions, aggregates data in real time and sends it to an event hub.
- A watcher process running in App Service picks up the data from the event hub.
- Signalr is used to push the information to the dashboard.
- The entire system is deployed using the Web Apps feature of App Service built in CI/CD using webhooks from GitHub.
Sensors and gateway equipment
Indoor sensor array
In order to capture different atmospheric readings throughout the building, sensor arrays were positioned at six locations. Two sensors were placed on the first floor, two on the seventh floor, and two on the tenth floor. Data is sent every second and messages use a protobuffer encoding so message size varies from a few bytes to kilobytes. This allowed us to measure different types of offices and public spaces. The screenshot below shows one of FuseThru’s dashboards that is used to manage and monitor deployed sensors.
Outdoor sensor array
A sensor array was also deployed to measure wind speed, air quality, and other data. It was positioned on the roof of the building. Weather data is collected every second and then sent to the cloud when requested.
The Azure IoT Hub is a cloud service responsible for device registration, securing the data transfer, and high-volume data ingestion. In this case, each device is registered with the hub and a unique device ID is passed in all payloads so we can establish identity of the device the data originated from. The data is encrypted in motion and decrypted by the watcher, providing an extra layer of security. This means that the IoT Hub is sent all data collected. The data is first encrypted, then zipped. Once this is complete, it is sent to the IoT Hub. To connect with the IoT Hub, the devices running Windows 10 IoT Core use the C# SDK to send the data. The below diagram shows a snippet of the device message class used:
Once data has been ingested into the IoT Hub, a watcher process unzips and decrypts the data. It is then placed on an event hub. The watcher process was written in C# and hosted as a PaaS-based Cloud Service Worker Role. Stream Analytics is used to transform the data so that it can be consumed by the dashboard. Once the data has been transformed, it is placed again on another event hub for the dashboard to consume.
|Stream Analytics Job||Input||Outputs||Queries||Description|
|PushQueryStreamAnalytics||EventHub||EventHub||See below||Sends all data points to an event hub to be consumed by the dashboard.|
A web dashboard was created to present the data visualizations to customers. The dashboard was built using the ASP.NET MVC framework, Signalr, and Angular front end within Visual Studio 2015. To get started building the dashboard, sample code from the Azure team was used.
As data is pushed onto the second event hub detailed above, a watcher picks up the message and, using Signalr, delivers the updates to the dashboard. The design was using D3.js and Charts.js to mimic the look and feel of Power BI charts. A Power BI dashboard is a planned future expansion of this project.
Diagrams below show the dashboard interfaces:
The ability to use Windows IoT and cloud-based ingestion systems like Azure IoT Hub enables developers to rapidly prototype and deploy production systems. Stream Analytics took all the guesswork out of building a transport system and even allowed us to aggregate the data before persisting it. C# and C++ languages were used on the devices and in the cloud solution, coupled with various SDKs like the IoT Hub Client SDK and the Protocol Buffer SDK for encryption and compression.
“The Azure IoT Hub client libraries enabled us to build this system rapidly…” - Jared Rhodes
The ability to show performance indicators and semaphores on a dashboard that change in real time was a key element to this system. Signalr enabled this data transport to the client browser. The ability to create staging slots and deploy using Azure App Service’s built-in CI/CD system enabled the developers and engineers a workflow that not only got out of the way but also increased productivity.