{"id":23415935,"url":"https://github.com/eightsq/mqtt-co2","last_synced_at":"2025-04-09T06:24:01.674Z","repository":{"id":141466519,"uuid":"244170305","full_name":"EightSQ/mqtt-co2","owner":"EightSQ","description":"A script to connect a mh-z19 sensor on a raspberry pi to a mqtt broker.","archived":false,"fork":false,"pushed_at":"2020-03-01T15:10:43.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T00:45:18.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EightSQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-01T15:07:03.000Z","updated_at":"2020-03-01T15:10:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"f43d664d-9868-4572-b326-e62ea521d039","html_url":"https://github.com/EightSQ/mqtt-co2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Fmqtt-co2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Fmqtt-co2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Fmqtt-co2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Fmqtt-co2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EightSQ","download_url":"https://codeload.github.com/EightSQ/mqtt-co2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247988764,"owners_count":21029158,"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","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":[],"created_at":"2024-12-22T21:29:03.148Z","updated_at":"2025-04-09T06:24:01.654Z","avatar_url":"https://github.com/EightSQ.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT-connected MH-Z19B co2 \u0026 temperature sensor\n\n## Requirements\n- Raspberry Pi 1+ B or compatible\n- MH-Z19B sensor (you can find them for less than 20$ on [aliexpress](https://www.aliexpress.com/wholesale?SearchText=mh+z19b))\n- python 3 with pip\n\n## Setup\n- Enable the serial port hardware. (guides for [raspbian](https://github.com/UedaTakeyuki/mh-z19/wiki/How-to-Enable-Serial-Port-hardware-on-the-Raspberry-Pi) and [arch](https://logicalgenetics.com/serial-on-raspberry-pi-arch-linux/))\n- Hook up the sensor according to the [mh-z19 library readme](https://github.com/UedaTakeyuki/mh-z19#cabling).\n- `pip install -r requirements.txt`\n- Run `bp_sensor.py` priviledged (for serial communication). Use `BROKER_HOST`, `BROKER_PORT`, `BROKER_USER` and `BROKER_PASS` environment variables to set up.\n- Modify the topics to publish to inside the main function to fit your needs.\n\n## Running as daemon\n- Install and enable the `co2.service` in systemd. Modify it to match your installation path.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feightsq%2Fmqtt-co2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feightsq%2Fmqtt-co2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feightsq%2Fmqtt-co2/lists"}