tl;dr
Telemetry data is an important component of any good DevOps process. Being able to observe and capture the data from a running system opens up a lot of opportunity to improve the system. I had a simple problem at home that telemetry could help me solve. With this in mind, I over-engineered a solution to the question; "Why is my office always so hot?".
The solution involved designing a sensor rig around an Espressif ESP8266 microcontroller development board running ESP8266 core for Arduino, a BME280 integrated environmental unit, and a simple photocell. The ESP8266 has built-in WiFi which I connected to my local wifi network to send the temperature, barometric pressure, humidity, and amount of light to Azure IoT hub. From there I configured Azure Stream Analytics to process the incoming data and send it to Power BI for display and review.
After realizing that there was no impact on the temperature based on my presence or absence, that the a/c was never turning off, that we were paying the electric bill, and that this house was a rental so we had no ability to fix it, we decided to build a new, energy-efficient house in a new neighborhood. Now my office is quite comfortable and my electric bill is about half of what it was in the rental. IoT FTW!
This blog series will go through the process and code used to implement this solution.
Blog Series Table of Contents
Part 1 - Problem Space <-- This post
Part 2 - Electronics
Part 3 - ESP8266 Code
Part 4 - Azure IoT Hub
Part 5 - Azure Stream Analytics
Part 6 - Power BI
Part 7 - Drawing Conclusions
Background
My family and I moved from New England to Central Florida a few years ago. We weren't sure where we wanted to set down roots, so we decided to rent a house for a couple of years to allow us to get a feel for the area. The house we rented was a very nice home with two floors. The second floor had three bedrooms, of which one became my office.
This may not be common knowledge, but Florida has a thing we call "Summer" which is characterized by an average of 110 days with temperatures of 90°F or more and relative humidity ranging between 64% to 91%...so hot and sticky. But as Floridians, we have a way to combat this. We use a tool called "air conditioning". In the case of my rental house, we had two "air conditioning" zones, one downstairs and one upstairs.
At Microsoft, I'm considered a Home Office employee, so when I'm not on the road at customer sites (most of my time), I work from my home office. During the summer I noticed that my office was getting up to ~80°F during the course of the day, even while the upstairs a/c unit was running. When discussing this with my wife she thought that it was getting hot because I have so much equipment in the room. Being a total geek I have multiple monitors, computers, printers, electronics tools, 3D printers, etc. in the room. She also posited that my body heat was an additional factor. I disagreed with her and felt that it was a case of the insulation in the attic being insufficient to block out the heat load captured by the roof during the day. We went back and forth on this topic a few times.
After a couple of these discussions, I decided that I needed a way to document how the room temperature behaved both when I'm home and when I'm not. I also needed to document the outside weather at the same time, for comparison. This data would allow me to determine the effectiveness of the upstairs a/c unit.
I know I could have purchased a cloud-enabled thermostat, like the EcoBee, and let them document the temperatures but then I wouldn't have had a reason to solder and write code. So no "easy way out" for me...nope! Here is my over-engineered solution.
Plan of Action
- Create a schematic for a sensor rig that captures temperature, humidity, and amount of light.
- Create two sensor rigs to document inside and outside data.
- Program sensor rig to send data to Azure IoT Hub.
- Process IoT Hub data through Stream Analytics and send to Power BI
- Graph sensor data in Power BI to look see if data changed based on day.
On weeks that I'm away, most of the equipment is turned off and I'm not in the room, so if my wife's hypothesis is correct we should see a lower temperature on those days than when I'm working from home (once differences in outside temp are accounted for).
Conclusion
We've discussed the problem space and the fact that I'm willing to spend way too much time figuring something out if the process includes soldering, coding and general geek-mayhem.
In the next post I'll go through the electronics of the solution.
Blog Series Table of Contents
Part 1 - Problem Space <-- This post
Part 2 - Electronics
Part 3 - ESP8266 Code
Part 4 - Azure IoT Hub
Part 5 - Azure Stream Analytics
Part 6 - Power BI
Part 7 - Drawing Conclusions
Comments