{"id":30681407,"url":"https://github.com/rnurgaliyev/co2meter_exporter","last_synced_at":"2025-09-01T17:05:47.858Z","repository":{"id":45372867,"uuid":"238037695","full_name":"rnurgaliyev/co2meter_exporter","owner":"rnurgaliyev","description":"CO2 Meter exporter to use with Prometheus, optimised for Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2023-11-19T16:55:58.000Z","size":15,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-01T17:03:42.023Z","etag":null,"topics":["co2-sensor","co2meter-exporter","docker","docker-container","exporter","prometheus","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnurgaliyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-03T18:53:23.000Z","updated_at":"2025-01-13T22:27:04.000Z","dependencies_parsed_at":"2024-06-19T11:15:23.683Z","dependency_job_id":"027d49f3-f629-43e5-8179-0122c2cf7a01","html_url":"https://github.com/rnurgaliyev/co2meter_exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rnurgaliyev/co2meter_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnurgaliyev%2Fco2meter_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnurgaliyev%2Fco2meter_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnurgaliyev%2Fco2meter_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnurgaliyev%2Fco2meter_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnurgaliyev","download_url":"https://codeload.github.com/rnurgaliyev/co2meter_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnurgaliyev%2Fco2meter_exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273159599,"owners_count":25055864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["co2-sensor","co2meter-exporter","docker","docker-container","exporter","prometheus","raspberry-pi"],"created_at":"2025-09-01T17:03:32.318Z","updated_at":"2025-09-01T17:05:47.836Z","avatar_url":"https://github.com/rnurgaliyev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# co2meter_exporter\nCO2 Meter state exporter to use with https://prometheus.io/\n\nKeep track of CO2 level around you to stay productive!\n\n![Picture of cheap co2meter](https://user-images.githubusercontent.com/22738239/73683926-7a247c80-46c3-11ea-99cb-a086262aa693.jpg)\n\n## CO2 meters supported\nAll devices that report as USB-zyTemp should in theory be supported.\n\n```\nBus 001 Device 004: ID 04d9:a052 Holtek Semiconductor, Inc. USB-zyTemp\n```\n\nI've played with [this](https://www.wetterladen.de/aircontrol-mini-co2-messgeraet-tfa-31.5006-plus-incl-stecker-netzteil-raumklimakontrolle) one.\nAll of them look more or less same and don't cost too much. Some of them will also report humidity, most will not.\n\nIt is best to power this device via Raspberry Pi in-the-middle, so no extra power supply is needed.\n\n## Running in a docker container\n\nRaspberry Pi and docker are great friends. Just run docker container and you will have Prometheus exporter\nat no cost!\n\n```\ndocker run -dt -p 2112:2112/tcp --name co2meter_exporter --restart unless-stopped --privileged imple/co2meter_exporter:latest\n```\n\n## Downloading and building for ARMv7 (Raspberry Pi 2 and newer)\n\n```\ngo get github.com/rnurgaliyev/co2meter_exporter\nenv GOOS=linux GOARCH=arm go build github.com/rnurgaliyev/co2meter_exporter\n```\n\nTransfer binary to your Raspberry Pi and you are ready to go.\n\n## Running and serving metrics\n\n```\n~ ./co2monitor --help\nco2meter_exporter\n\n  Flags:\n    -h --help             Displays help with available flag, subcommand, and positional value parameters.\n    -d --device           Device to get readings from\n    -b --bind             Address to listen on (default: 0.0.0.0)\n    -p --port             Port number to listen on (default: 9200)\n       --skipDecryption   Skip value decryption. This is needed for some CO2 meter models.\n\n~ ./co2monitor -d /dev/hidraw0 -p 2112\n2020/02/03 19:07:46 Listening on http://0.0.0.0:2112/metrics\n2020/02/03 19:07:51 CO2 reading:  527\n2020/02/03 19:07:51 Temperature reading:  19.48\n2020/02/03 19:07:56 CO2 reading:  527\n2020/02/03 19:07:56 Temperature reading:  19.48\n2020/02/03 19:08:01 CO2 reading:  527\n2020/02/03 19:08:01 Temperature reading:  19.48\n2020/02/03 19:08:06 CO2 reading:  527\n2020/02/03 19:08:06 Temperature reading:  19.48\n2020/02/03 19:08:11 CO2 reading:  529\n```\n\nGet [Prometheus](https://prometheus.io/), [Grafana](https://grafana.com/), and finish setup!\n\n![Screenshot](https://user-images.githubusercontent.com/22738239/73684030-aa6c1b00-46c3-11ea-9d7d-e4a4cdd87fa7.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnurgaliyev%2Fco2meter_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnurgaliyev%2Fco2meter_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnurgaliyev%2Fco2meter_exporter/lists"}