{"id":23714948,"url":"https://github.com/dnutiu/bme680-homekit","last_synced_at":"2026-02-10T01:30:18.023Z","repository":{"id":100180772,"uuid":"462019437","full_name":"dnutiu/bme680-homekit","owner":"dnutiu","description":"Turn your Raspberry PI and BME680 climate sensor into an Apple Homekit compatible accessory.","archived":false,"fork":false,"pushed_at":"2024-02-08T21:13:10.000Z","size":784,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T20:51:57.423Z","etag":null,"topics":["apple","embedded","embedded-systems","homekit","iot","python"],"latest_commit_sha":null,"homepage":"","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/dnutiu.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":"2022-02-21T20:22:36.000Z","updated_at":"2024-02-06T22:23:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4e1ada0-f620-4620-8b72-85ba1577fdae","html_url":"https://github.com/dnutiu/bme680-homekit","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/dnutiu%2Fbme680-homekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnutiu%2Fbme680-homekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnutiu%2Fbme680-homekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnutiu%2Fbme680-homekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnutiu","download_url":"https://codeload.github.com/dnutiu/bme680-homekit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239803491,"owners_count":19699686,"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":["apple","embedded","embedded-systems","homekit","iot","python"],"created_at":"2024-12-30T20:51:45.612Z","updated_at":"2026-02-10T01:30:17.980Z","avatar_url":"https://github.com/dnutiu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nSimple script utilities to add BME680 sensor readings to Apple Homekit using a Raspberry PI with minimal configuration.\n\nAfter running the program you'll be given the QR code used to add the sensor as an accessory in Homekit.\n\n![](./docs/add_to_home.png)\n\n![](./docs/homekit_view.jpg)\n\n## Installing\n\nEnsure you are the `pi` user. Clone the repo in home and then install requirements.\n\n### Cloning the project\n\n```bash\ncd /home/pi \u0026\u0026 git clone git@github.com:dnutiu/bme680-homekit.git \u0026\u0026 cd bme680-homekit\nsudo apt-get install libavahi-compat-libdnssd-dev\npip3 install -r requirements.txt\n```\n\n### Application\n\nThe `app` directory contains the source code of this application\n\nSensor values are collected and exposed in HomeKit and as prometheus metrics.\n\nBy default, metrics can be accessed on port `8000`.\n\n\n\n### Configuration\n\nBefore running the program edit the `config.yaml` file and replace at least `persist_file` field.\n\nThe program will search for the `config.yaml` file in the current directory but this can be configured to another directory\nby settings the `HOMEKIT_CONFIG` environment variable.\n\n### Running\n\nRun the program once to pair it with your ios. ex:\n\n```bash\npython3 -m app.main \nSetup payload: X-HM://0023K50QET2YB\nScan this code with your HomeKit app on your iOS device:\n\nOr enter this code in your HomeKit app on your iOS device: 053-86-998\n\n```\n\n### SystemD Service\n\nEdit `./systemd/bme680-homekit.service` and replace relevant variables such as `WorkingDirectory`, `ExecStart`\nand `User`.\n\nRun `sudo ./systemd/install.sh` to install SystemD service automatically on your system.\n\nOr follow the manual steps.\n\nCopy the systemd service.\n\n```bash\nsudo cp ./systemd/bme680-homekit.service /etc/systemd/system\nsudo systemctl status bme680-homekit\n```\n\n```\n● bme680-homekit.service - Bme680 Homekit service\n     Loaded: loaded (/etc/systemd/system/bme680-homekit.service; disabled; vendor preset: enabled)\n     Active: inactive (dead)\n```\n\nStart the service\n\n```bash\nsudo systemctl start bme680-homekit\nsudo systemctl status bme680-homekit\n```\n\n```\n● bme680-homekit.service - Bme680 Homekit service\n     Loaded: loaded (/etc/systemd/system/bme680-homekit.service; disabled; vendor preset: enabled)\n     Active: active (running) since Mon 2022-02-21 20:10:30 GMT; 935ms ago\n   Main PID: 1722 (python3)\n      Tasks: 1 (limit: 780)\n        CPU: 895ms\n     CGroup: /system.slice/bme680-homekit.service\n             └─1722 /usr/bin/python3 /home/pi/bme680-homekit/main.py\n\nFeb 21 20:10:30 raspberrypi systemd[1]: Started Bme680 Homekit service.\n```\n\n## Troubleshooting\n\nIf you get an error for FileNotFound:\n\n```\nTraceback (most recent call last):\n  File \"/home/denis/bme680-homekit/sensors/main.py\", line 112, in \u003cmodule\u003e\n    driver.add_accessory(accessory=get_bridge(driver))\n  File \"/home/denis/bme680-homekit/sensors/main.py\", line 101, in get_bridge\n    bridge.add_accessory(Bme680Sensor(accessory_driver, \"Sensor\"))\n  File \"/home/denis/bme680-homekit/sensors/main.py\", line 33, in __init__\n    self.sensor = bme680.BME680(bme680.I2C_ADDR_PRIMARY)\n  File \"/home/denis/.local/lib/python3.9/site-packages/bme680/__init__.py\", line 43, in __init__\n    self._i2c = smbus.SMBus(1)\nFileNotFoundError: [Errno 2] No such file or director\n```\n\nYou will need to active I2C interface with `sudo raspi-config` -\u003e Interfacing -\u003e I2C\n\n### Prometheus\n\nPrometheus is a system for monitoring and alerting. \n\nBefore installing Prometheus you will need to tweak the `prometheus/prometheus.service` file, especially the config\nfile and storage path since they contain the hardcoded string: `/home/pi/bme680-homekit/`.\n\nTo install it run `prometheus./install.sh`.\n\nPrometheus server will listen on port `:9090`\n\n### Grafana\n\nGrafana can be used to create dashboard and visualise prometheus metrics. To install it run `grafana/install.sh`\n\nGrafana is accessible on port `:80`. Premade dashboards can be found in the `grafana/dashboards` folder.\n\n![](./docs/grafana_dashboard.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnutiu%2Fbme680-homekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnutiu%2Fbme680-homekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnutiu%2Fbme680-homekit/lists"}