Monitoring office conditions

Community Aug 14, 2019

The problem

Some time ago I noticed that the air in our office gets stale in the evening. After a few minutes of googling I came to the conclusion that the problem might be a high concentration of CO2. The problem with working at high CO2 levels is that you cannot concentrate well and you tire quickly. This is bad news for your company, especially when you have an office full of people doing intellectual work!

The solution

In spite of my suspicions, I knew that our actions should not be not based on hunches. We try to make our decisions based on data. Actually, many of our team's tasks look exactly like that - people come to us with some initial assumption and want to be sure that it aligns with the underlying data.

To get the data in this case we decided to obtain the Netatmo Smart Indoor Air Quality Monitor - a device the size of a soda can that is able to measure temperature, CO2 concentration, air humidity and noise. The only thing we were missing was easy access to the data for more people. It is possible to view your data in a mobile application, which is fine for home use, but with more users the administration becomes tedious. In Mews, we believe that non-confidential information should be available to a broad audience of employees. Fortunately, it is pretty easy to pull the measurements from Netatmo’s servers via their REST API.

The device sitting on a desk

They say that everything looks like a nail when you have a hammer. In our case one of our favorite hammers is Power BI. Each Mews employee has access to the Power BI service with published reports, and this is where we service a lot of data about the company. Therefore we decided to build a Power BI report backed by a push dataset - a storage suitable for real-time monitoring.

The Power BI report

We use a periodically running Azure function to shovel the data from the air quality monitor REST API to the Power BI push dataset. In addition, to have the ability to query the data, we also push them into Azure table storage. Finally, there are two Azure functions periodically refreshing access tokens for Power BI and Netatmo API. You can view the sources on github if you are interested.

Overview of used Azure functions


So, did we get rid of the air quality issue? Well, the situation certainly improved after we moved into our new office. Further improvements have to be discussed with the office landlord. And for those discussions the report provides a much better starting position, and a baseline against which to measure the effectiveness of any future solutions.

For more engineering insights shared by Mews tech team: