This tutorial will have several parts. As and end result we want to have a web site which show different information from inside our flats: temperature, humidity, dust, light... and which also predict the values.
There are several things that are involved in this project: setting up a raspberry pi, setting up sensors and collecting sensor readings, storing the readings. On the consumer side we will have to read the data, analyse it, display it, train some models, write a website and deploy it.
This will all be done with Python.
- Raspberry PI 3 or higher
- Charger: mini-usb phone charger should work
- Micro SD card: at least 8G
- Bread board
- Sensors, can be the DHT11, or equivalent
- One LED... just for fun
- Connecting cables
In this part we will just set things up. Follow the instructions in raspberry-pi-setup.
Using a breadboard and three cables, we'll connect the Raspberry Pi to a DHT11 temperature and humidity sensor. See reading-sensor-data-from-pi for instructions on how to do the wiring. You'll also find a Python script that shows an example of how to get readings from the sensor using the Adafruit_DHT library.
Head over to plotting-readings-from-pi if you want to plot the sensor data you collect as a time series graph with matplotlib.
In serving-readings-from-pi you find inspiration about how to use Python's web framework flask to deploy a super simple web app that runs locally on your Raspberry Pi and serves the current temperature and humidity.
IOTA is a distributed ledger that allows you to store data as part of zero-value transactions. Store your first transaction by following the instructions in tangle.
Find more details about sending sensor data readings to the ledger in pitangle.
The sensor data we collected measures how temperature and humidity change over time. Many important applications rely on modeling time series data like ours, so that predictions and planning can be made for the future.
Learn more about performing analysis and making prediction with your time series data, in analysis.