Environment Monitoring Station using Raspberry Pi

Posted by ProgrammingAce on Mon 28 July 2014

In the IT world, monitoring the environmental conditions of your data center is something that’s commonly overlooked. There has never been a cheap and easy solution, and it’s easy for the task to fall pretty far down the ‘needs to be done’ list. After being quoted $13,000 for a system to monitor temperature and humidity in one of our data centers, I decided to revive an old project of mine, and build a better system for under $150.

IMG20140613131729

Originally I had used an Arduino Uno to read temperature and humidity data over a USB serial connection. While this was functional, it only gave me the current conditions. I needed to be able to store (and chart) conditions over time. Eventually I settled on using a DHT22 Temp/Humidity sensor connected to a Raspberry Pi as the brains of the operation. Using this platform, I can plot data over time, provide email alerts, and send the data off to our centralized logging system.

The software stack is pretty simple:

  • Raspbian is the operating system.
  • Some small python scripts collect the data from the sensor module.
  • Graphite to store the data and provide pretty graphs.
  • Ansible deploys the software and configuration.

Here’s the final device:

IMG201406131317292

And the charts it creates:

ScreenShot

Up Next: How to build the hardware.