{"id":15140397,"url":"https://github.com/geekman/hapz2m","last_synced_at":"2025-06-28T23:38:55.899Z","repository":{"id":167308219,"uuid":"640312188","full_name":"geekman/hapz2m","owner":"geekman","description":"barebones HomeKit \u003c-\u003e Zigbee2MQTT bridge, written purely in Go","archived":false,"fork":false,"pushed_at":"2024-11-24T18:51:18.000Z","size":127,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T10:08:21.073Z","etag":null,"topics":["hap","homebridge","homekit","zigbee2mqtt"],"latest_commit_sha":null,"homepage":"","language":"Go","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/geekman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2023-05-13T17:06:26.000Z","updated_at":"2024-12-16T20:23:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"141a3693-560f-4e57-99d0-24c717b24104","html_url":"https://github.com/geekman/hapz2m","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"1fbc4d520ab2e017cea1e289bd296b29e3a8bec4"},"previous_names":["geekman/hapz2m"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geekman/hapz2m","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekman%2Fhapz2m","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekman%2Fhapz2m/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekman%2Fhapz2m/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekman%2Fhapz2m/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekman","download_url":"https://codeload.github.com/geekman/hapz2m/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekman%2Fhapz2m/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262513634,"owners_count":23322663,"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":["hap","homebridge","homekit","zigbee2mqtt"],"created_at":"2024-09-26T08:20:24.856Z","updated_at":"2025-06-28T23:38:55.730Z","avatar_url":"https://github.com/geekman.png","language":"Go","readme":"hap-z2m Bridge\n===============\n\nA HomeKit \u003c-\u003e Zigbee2MQTT bridge written in Go, so I don't have to install more NodeJS rubbish.\nIt is essentially a Homebridge + homebridge-z2m replacement.\nIt compiles down to a \u003c10 MB static binary instead of another 200++ MB Docker container.\nIt uses the [hap library](https://github.com/brutella/hap) for interfacing with HomeKit.\n\nIt is quite barebones, so there is no configuration for the bridge, apart from the MQTT server \u0026 credentials.\nThe bridge configures and exposes devices based on z2m's MQTT messages.\n\nCurrently only supports the types of Zigbee devices I have:\n\n- Climate sensors (temp, humidity)\n- Contact sensors\n- Motion sensors\n- Wall switch\n- Dimmer, or dimmable light bulbs\n\nIf you do use this software, note that it's in development and may contains bugs,\nor may even burn your house down. I offer no warranty, but you are welcome to file bugs.\n\n\nBuilding\n=========\n\nTo compile `hap-z2m`, use:\n\n    go build -v -trimpath -ldflags=\"-s -w\" ./cmd/...\n\nConfiguration\n==============\n\nThe MQTT broker that Zigbee2MQTT connects to is specified using the following:\n\n- Server\n- Username\n- Password\n\nAdditionally, these options control networking aspects for the bridge:\n\n- `ListenAddr` can be used to bind to a specific port and/or address, \n  useful for selecting a fixed port for firewall rules.\n\n- `Interfaces` limit which interfaces mDNS broadcasts appear on, \n  and which addresses to use when broadcasting.\n\nThese settings are optional and can be left blank.\n\nThe pairing code for the server is generated dynamically on first startup\nand printed to the console (or systemd journal). Alternatively, you can specify\nit using `Pin` in the config file to have it fixed.\n\n\nDebugging\n==========\n\nChecking the Zigbee2MQTT persisted state:\n\n    jq -r 'map_values(@base64d)' \u003c /var/lib/hapz2m/db/z2m_state\n\nLicense\n========\n\nhap-z2m is licensed under the GNU General Public License v3.\n\nCopyright (C) 2023-24 Darell Tan\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation, either version 3 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program. If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekman%2Fhapz2m","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekman%2Fhapz2m","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekman%2Fhapz2m/lists"}