A web interface for a CO2 monitor on a raspberry pi using an SGP-30 eCO2/TVOC sensor.
- Enable I2C via
raspi-config
- Run
sudo i2c-detect
, if you see 0x58 is available, the SGP-30 should be connected - If the sensor is showing remote I/O errors, you can try slowing the baudrate via the boot config
- If the i2c address happens to be something other than 0x58, change the value in
/usr/local/goairmon/.env
- Unzip the arm6, arm7, or amd64 tar from the dist directory to a temporary folder on the pi.
- CD to the directory and run
cmd/adduser -username={username} -password={password}
to add a user. - You can change any values in the
.env
file and run the server via./goairmon
. - Run
sudo ./install.sh
to copy everything to/usr/local/goairmon
and installgoairmon.service
. - Confirm the service started with
sudo systemctl status goairmon
- Open
localhost:80
in the browser to view the web interface.
Build mage file arm6
to output to the dist directory.
Run sudo /usr/local/goairmon/uninstall.sh
- Before adding or removing users, stop the service
sudo systemctl stop goairmon
- cd to
/usr/local/goairmon
- Run
sudo cmd/adduser -username={username} -password={mypassword}
to add a user - Run
sudo cmd/rmuser -username={username}
to remove a user - Start the service again
sudo systemctl start goairmon