{"id":14963836,"url":"https://github.com/maximkulkin/esp-homekit","last_synced_at":"2025-04-08T12:08:32.858Z","repository":{"id":27392888,"uuid":"113219787","full_name":"maximkulkin/esp-homekit","owner":"maximkulkin","description":"Apple HomeKit accessory server library for ESP-OPEN-RTOS","archived":false,"fork":false,"pushed_at":"2023-12-18T21:03:14.000Z","size":1036,"stargazers_count":1149,"open_issues_count":34,"forks_count":171,"subscribers_count":89,"default_branch":"master","last_synced_at":"2025-04-01T10:17:55.440Z","etag":null,"topics":["esp8266","homekit"],"latest_commit_sha":null,"homepage":"","language":"C","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/maximkulkin.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}},"created_at":"2017-12-05T18:44:00.000Z","updated_at":"2025-03-27T13:53:17.000Z","dependencies_parsed_at":"2023-12-19T00:35:21.161Z","dependency_job_id":null,"html_url":"https://github.com/maximkulkin/esp-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/maximkulkin%2Fesp-homekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximkulkin%2Fesp-homekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximkulkin%2Fesp-homekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximkulkin%2Fesp-homekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximkulkin","download_url":"https://codeload.github.com/maximkulkin/esp-homekit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"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":["esp8266","homekit"],"created_at":"2024-09-24T13:32:12.772Z","updated_at":"2025-04-08T12:08:32.842Z","avatar_url":"https://github.com/maximkulkin.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":["Others"],"readme":"# esp-homekit\nApple HomeKit accessory server library for\n[ESP-OPEN-RTOS](https://github.com/SuperHouse/esp-open-rtos).\n\nSee [esp-homekit-demo](https://github.com/maximkulkin/esp-homekit-demo) for examples.\n\n## Building for ESP-IDF 4.x\n\nIn ESP-IDF \u003e= 4.0 there is a SPI flash write protection that checks if area written\nto is inside writable parition. Haven't figured out yet how esp-homekit can modify\nparition table automatically, so for the time being you need to disable that check in\nmenuconfig: go to Component config -\u003e SPI Flash driver -\u003e Write to dangerous flash\nregions and set it to \"Allowed\".\n\n## Building for ESP-IDF \u003e= 5.0\n\nYou need to add a custom partition of type data and subtype \"homekit\"\nand at least 4KB (0x1000) in size for HomeKit data storage. Put this into\npartitions.csv file in your project:\n\n```\n# ESP-IDF Partition Table\n# Name,   Type, SubType, Offset,  Size, Flags\nnvs,      data, nvs,     0x9000,  0x5000,\nphy_init, data, phy,     0xe000,  0x1000,\nhomekit,  data, homekit, 0xf000,  0x1000,\nfactory,  app,  factory, 0x10000, 1M,\n```\n\nEnable custom partitions in project configuration (sdkconfig):\n\n```\nCONFIG_PARTITION_TABLE_CUSTOM=y\nCONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions.csv\"\n```\n\n## QR code pairing\n\nYou can use a QR code to pair with accessories. To enable that feature, you need to\nconfigure accessory to use static password and set some setup ID:\n\n```c\nhomekit_server_config_t config = {\n    .accessories = accessories,\n    .password = \"123-45-678\",\n    .setupId=\"1QJ8\",\n};\n```\n\nThe last piece of information you need is accessory category code. You can find it in\nmDNS announcement in accessory logs\n```\nmDNS announcement: Name=Sample LED-1692md=MyLEDpv=1.0id=16:92:CE:D4:EE:7Ac#=1s#=1ff=0sf=1ci=5 Port=5556 TTL=4500\n```\n(notice \"**ci=5**\" \u003c- this is accessory category code)\n\nOr just find value of category enum you set in main accessory:\n```c\n  HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_lightbulb, .services=(homekit_service_t*[]){\n```\n(notice \"**homekit_accessory_category_lightbulb**\" \u003c- this is accessory category code)\n\nThen you need to generate QR code using supplied script:\n```\ntools/gen_qrcode 5 123-45-678 1QJ8 qrcode.png\n```\n\n![QR code example](qrcode-example.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximkulkin%2Fesp-homekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximkulkin%2Fesp-homekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximkulkin%2Fesp-homekit/lists"}