{"id":24757730,"url":"https://github.com/hkoosha/homer2","last_synced_at":"2026-04-19T15:04:05.827Z","repository":{"id":221937814,"uuid":"745446565","full_name":"hkoosha/homer2","owner":"hkoosha","description":"Air quality monitoring on Raspberry Pi Pico, sent to Victoria Metrics, shown on Grafana: CO2, Humidity, Temperature, Volatile Organic Compounds, ..., you name it!","archived":false,"fork":false,"pushed_at":"2024-02-16T05:46:21.000Z","size":1811,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T06:20:08.477Z","etag":null,"topics":["air-quality","air-quality-monitor","bme68x","bmp388","grafana","pico-w","pms5003","raspberry-pi-pico","raspberry-pico","senseair","sgp40","sht4x"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hkoosha.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":"2024-01-19T10:57:27.000Z","updated_at":"2024-11-24T15:52:45.000Z","dependencies_parsed_at":"2024-02-16T06:43:26.712Z","dependency_job_id":null,"html_url":"https://github.com/hkoosha/homer2","commit_stats":null,"previous_names":["hkoosha/homer2"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hkoosha/homer2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkoosha%2Fhomer2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkoosha%2Fhomer2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkoosha%2Fhomer2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkoosha%2Fhomer2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hkoosha","download_url":"https://codeload.github.com/hkoosha/homer2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkoosha%2Fhomer2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32010959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["air-quality","air-quality-monitor","bme68x","bmp388","grafana","pico-w","pms5003","raspberry-pi-pico","raspberry-pico","senseair","sgp40","sht4x"],"created_at":"2025-01-28T15:34:54.868Z","updated_at":"2026-04-19T15:04:05.804Z","avatar_url":"https://github.com/hkoosha.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What?\n\nHomer2, running on a Raspberry Pi Pico, reads air quality monitoring sensors and sends \nthe readings to Victoria Metrics, and finally graphs them on Grafana.\n\nRaspberry Pi Ansible configuration also included (for Grafana and Victoria Metrics).\n\nSensors:\n\n- BME68x\n- BMP3xx\n- PMS5003 or PMS7003\n- SGP40\n- SHT4X\n- Senseair Sunrise\n\n## How?\n\n1. Clone this project.\n2. Setup Raspberry Pico SDK locally.\n3. Build the project. Example:\n\n   ```bash\n   # You need to put your actual Wifi name, password and your own country code here.\n   # You need to put your raspberry PIs DDNS address here, connecting directly to IPs is planned.\n   cmake -DWIFI_SSID=\"your_wifi_name\" \\\n         -DWIFI_PASSWORD=\"your_wifi_password\" \\\n         -DWIFI_COUNTRY=\"DE\" \\\n         -DHOMER2_VICTORIA_ADDR=\"ip_address__OR__your_raspberry_pi_DDNS_address\"\n         -DHOMER2_VICTORIA_PORT=4242\n   ```\n4. Flash the image to Pico (I transfer the image to a Raspberry PI and flash from there,\n   faster than usb-ip, safer than connecting Pico to my PC):\n\n   ```bash\n   # You need to adjust YOUR_OPEN_OCD_PATH_HERE to wherever you installed openocd.\n   # You need to adjust PATH_TO_BUILD to the path of the project's directory.\n   sudo openocd \\\n         -f /YOUR_OPEN_OCD_PATH_HERE/openocd/share/openocd/scripts/interface/cmsis-dap.cfg \\\n         -f /YOUR_OPEN_OCD_PATH_HERE/openocd/share/openocd/scripts/target/rp2040.cfg \\\n         -c \"adapter speed 20000\" \\\n         -c \"program PATH_TO_BUILD/build/homer2.elf verify reset exit\"\n   ```\n\n5. Connect the sensors to the pins you configured in [configs](./src/homer2_config.h.in).\n   All I2C sensors go to the same pins. PMS5003 goes to UART 1 pins, again configured\n   in [configs](./src/homer2_config.h.in).\n6. Connect the power to Pico and see the readings in serial console or on\n   grafana.\n7. Import the Grafana [dashboard](./rpi/homer2_grafana_dashboard.json) into Grafana. Currently,\n   this is a manual process, later to be added to Ansible.\n\n## Configuration \n\nAll the configurable options can be found in [configs](./src/homer2_config.h.in):\n\nIf you don't want pico to connect to Wi-Fi or write to Victoria Metrics,\nset `HOMER2_WIFI` to `false`.\u003cbr\u003e\n\nTo disable Unicode characters on serial console output,\nset `HOMER2_CONSOLE_UTF` to `false`.\u003cbr\u003e\n\nYou can disable any of the sensors if you don't have them:\n- `HOMER2_SENSOR_ENABLED_SGP40 false`\n- `HOMER2_SENSOR_ENABLED_SHT4X false`\n- `HOMER2_SENSOR_ENABLED_BMP3XX false`\n- `HOMER2_SENSOR_ENABLED_BME68X false`\n- `HOMER2_SENSOR_ENABLED_SUNRISE false`\n- `HOMER2_SENSOR_ENABLED_PMSX00X false`\n\n## Where to get sensors from?\n\nI bought almost all of them from Amazon, only from Adafruit or Sparkfun (sensors\nfrom other cheaper vendors produced inaccurate results or didn't work at all).\n\nSenseair/Sunrise was available from Digikey.\n\n## ROADMAP\n\n- e-paper display (Waveshare).\n- Make it power consumption friendly.\n- Sensors calibration.\n- Allow connecting to IPs directly.\n- Build a housing (WIP).\n\n## History\n\n[Homer1](https://github.com/hkoosha/homer1) ran on ESP32, Homer2 is a port to raspberry pi pico.\n\n## Screenshots\n\nSerial output (after running for ~1.5 hour):\n\u003cbr\u003e\n\n![SerialOutput](screenshots/serial.png)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\nGrafana:\n\u003cbr\u003e\n\n![GrafanaDashboard](screenshots/grafana0.png)\n\n\u003cbr\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkoosha%2Fhomer2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhkoosha%2Fhomer2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkoosha%2Fhomer2/lists"}