Talk

What's that smell? Monitoring air quality with Python, Raspberry Pi, and Redis

Saturday, May 27

11:15 - 11:45
RoomRisotto
LanguageEnglish
Audience levelBeginner
Elevator pitch

With a little wiring and a few lines of code, one can create their own hyper-local air sensor grid to send alerts, activate smart-windows, and visualize data. A sensor measures air particulate density and sends the values to a Raspberry Pi unit. From there, the possibilities are endless!

Abstract

This project was created when air quality was at an all-time low on the west coast of North America due to wildfires. Using an inexpensive and widely available air sensor module and a Raspberry Pi computer, I created a small portable device that would serve as a perfect platform to deliver air quality data points to a database in the cloud.

The Raspberry Pi accepts incoming sensor data, converts it to a timestamped entry in a timeseries, and sends the payload to a Redis instance in the cloud. The data is then able to feed visualization software (finale of presentation), send alerts via email/SMS, or activate servo motors to open or close windows or activate air purifiers.

All code is written in Python. Communication with Redis is done with redis-py, a client library providing Redis commands. Talk attendees should have a comfortable grasp of Python, basic data structures, and a novice understanding of NoSQL databases.

TagsVisualization, Internet of Things (IoT), Raspberry PI, Databases, Data Structures
participant photo

Justin Castilla

Justin is a Senior Developer Advocate at Redis, Inc. He has helped to produce several online courses at Redis University and has created numerous videos for the Redis YouTube channel covering data structures, database best practices, and exciting IoT projects!

Justin has previously taught at a Web Development Boot Camp where he developed a passion for education and making learning accessible to all with a curiosity.

In his spare time he enjoys building audio synthesizers and guitar pedals.