A simple rest server running on your raspberry pi, reporting the current CO2 concentration in your room.
This project is part of the blog article How I built my own CO2 monitor using a Raspberry Pi for Home Office.
- Go to the release page and download the latest binary for your architecture.
- Add the execute permission to the binary. This is required to run the binary.
chmod +x ./mhz19-rest
- Execute the binary on your Raspberry Pi.
./mhz19-rest
- You can now access the rest api on
http://[raspberry-ip]:3500/api/v1/co2
- Clone this repository.
git clone [email protected]:YNNS/mhz19-rest.git
orgit clone https://github.com/YNNS/mhz19-rest.git
- Build your binary
- on the remote machine:
go build -o bin/mhz19-rest main.go
- on a local machine:
GOOS=linux GOARCH=arm64 go build -o bin/mhz19-rest main.go
(orGOARCH=arm
if you are using a 32-bit ARM image)
- on the remote machine:
cd bin/
- Or upload the file to the remote machine.- Add the execute permission to the binary. This is required to run the binary.
chmod +x ./mhz19-rest
- Execute the binary on your Raspberry Pi.
./mhz19-rest
- You can now access the rest api on
http://[raspberry-ip]:3500/api/v1/co2
Check out the corresponding frontend here
If you want to say thank you
- Add a GitHub Star to the project.
- Tweet about the project on your Twitter.
- Add some claps to the story of this project on Medium