Skip to content

astrograph/co2monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CO2 monitor for Raspberry Pi and Tostmann CO2 monitor

Monitoring CO2 level and temperature using a Raspberry Pi and a Tostmann CFA CO2 Monitor.

A realtime clock is used to provide proper timestamps for the data in the csv file.

The script writes the data in CSV form to a daily file in the /home/pi/co2monitor folder.

An upload script is run by a cronjob to upload the data to a webserver. The hostname, username and password are stored in /etc/environment

Hardware

Setup

Follow https://thepihut.com/blogs/raspberry-pi-tutorials/17209332-adding-a-real-time-clock-to-your-raspberry-pi to setup the realtime clock.

A root cronjob has to be installed to make sure the USB device socket can be read by the pi user.

The script is run by systemd therefore co2monitor.service has to be copied to /etc/systemd/system/

When the co2monitor.service file is installed or changed it has to be reloaded:

sudo systemctl daemon-reload

The CO2 monitoring service can then be controlled via systemctl:

sudo systemctl enable co2monitor
sudo systemctl start co2monitor
sudo systemctl status co2monitor
sudo systemctl stop co2monitor
sudo systemctl restart co2monitor
...

Visualization

An index.html is provided for visualizing the CO2 data on the webserver

About

Using a Raspberry Pi Zero W with a CO2 sensor to monitor indoor air quality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published