This is a Prometheus exporter for some similar USB CO2 monitors:
It uses the Linux HIDRAW API (/dev/hidraw0
etc.) to access the CO2 Monitor.
co2monitor_co2_ppm
co2monitor_temp_celsius
co2monitor_humidity_rh
go get github.com/markuslindenberg/co2monitor_exporter
A example udev rule and systemd service to automatically start co3monitor_exporter when the device is plugged in are provided in the systemd/
directory.
sudo cp systemd/[email protected] /etc/systemd/system/
sudo cp systemd/90-co2monitor.rules /etc/udev/rules.d/
sudo systemctl restart udev.service
~/go/bin/co2monitor_exporter --device /dev/hidraw0
This repository includes a Go package for the USB CO2 monitor.