This small project is for using a Raspberry Pi to log temperature data of a DHT11 sensor and make it available using a HTTP interface.
Flask app with HTTP interface. It reads the temperature data from the local SQLite Database.
Job which inserts data from the connected DHT11 sensor to the database. It uses the Adafruit_Python_DHT Library
- clone this repository
- open a terminal / bash in the local copy of the git repository
- install python dependencies using pip
pip install -r requirements.txt
execute
- open crontab
crontab -e
- append following code
*/5 * * * * python /home/pi/git/rpi-temperature-sensor/temperature-job.py
you may have to adjust the path of your cloned repository - restart cron deamon
/etc/init.d/cron restart
or restart the raspberry pisudo reboot