A prometheus exporter that reads data from the SCD-30 CO2 sensor
It's expected that the sensor is connected and calibrated. Otherwise, please read the manuals from the vendor how to do this.
Only steps for Debian are provided, for other distros or OS they might differ.
sudo apt install python pip
mkdir /opt/co2-exporter
cp server.py /opt/co2-exporter/
cp co2-exporter.service /etc/systemd/system/
sudo systemctl enable co2-exporter
pip install prometheus-client
- Setup the access to the sensor for python. If you have the adafruit that runs e.g. with a Raspberry PI check out Adafruit_CircuitPython_SCD30
- Edit /opt/co2-exporter/server.py with your favorite editor and change the temperature offset if needed
sudo systemctl start co2-exporter