{"id":23181180,"url":"https://github.com/joeshaw/leaf-homekit","last_synced_at":"2025-04-05T03:14:14.211Z","repository":{"id":66627392,"uuid":"324601513","full_name":"joeshaw/leaf-homekit","owner":"joeshaw","description":"HomeKit support for Nissan Leaf using HomeControl","archived":false,"fork":false,"pushed_at":"2022-02-19T19:20:11.000Z","size":14,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T11:15:15.292Z","etag":null,"topics":["homecontrol","homekit","homekit-accessory","leaf","nissan"],"latest_commit_sha":null,"homepage":"","language":"Go","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/joeshaw.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":"2020-12-26T17:17:32.000Z","updated_at":"2024-05-21T21:33:33.000Z","dependencies_parsed_at":"2024-06-20T01:36:54.680Z","dependency_job_id":"cc2c7f7e-b530-4cb0-baa2-13cde67c7627","html_url":"https://github.com/joeshaw/leaf-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/joeshaw%2Fleaf-homekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf-homekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf-homekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf-homekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeshaw","download_url":"https://codeload.github.com/joeshaw/leaf-homekit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280268,"owners_count":20912967,"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":["homecontrol","homekit","homekit-accessory","leaf","nissan"],"created_at":"2024-12-18T08:14:47.866Z","updated_at":"2025-04-05T03:14:14.193Z","avatar_url":"https://github.com/joeshaw.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# leaf-homekit\n\nHomeKit support for the Nissan Leaf using\n[hc](https://github.com/brutella/hc) and my [Leaf Go\nlibrary](https://github.com/joeshaw/leaf).\n\nWhen running, this service publishes a single HomeKit accessory\nexposing three services:\n\n1. A battery service indicating the current charge of your Leaf and\n   its charging status.\n1. A switch service indicating whether the Leaf is currently charging.\n   If the Leaf is plugged in but not charging, you can flip this\n   switch on to begin charging the vehicle.\n1. A switch service for the Leaf's climate control.  Flipping this\n   switch on starts the vehicle's climate control system.\n\nThe Nissan API does not expose climate control status, and it is not\npossible to disable charging once it has started.  As a result, the two\nswitches are stateless and will always reset to the off position.\nHomeKit does not expose a stateless switch (button) service we can use.\n\nAfter the vehicle is paired with your iOS Home app, you can control it\nwith any service that integrates with HomeKit, including Siri (\"How\nmuch battery does the Leaf have?\") and Apple Watch.  If you have a\nhome hub like an Apple TV or iPad, you can control the Leaf remotely.\n\n## Installing\n\nThe tool can be installed with:\n\n    go get -u github.com/joeshaw/leaf-homekit\n\nYou will need a configuration file with your Nissan username and\npassword.  The format is the same as the config file for the\n[leaf](https://github.com/joeshaw/leaf), so you can use it for both\ntools.\n\nYou will need to create a file like `~/.leaf`:\n\n```\nusername foo@example.com\npassword carwingsPassw0rd\n```\n\nThen you can run the service:\n\n    leaf-homekit -config ~/.leaf\n\nThe service will make an initial call to the Nissan service to get the\ncurrent battery information -- this can take nearly 30 seconds -- before\nit exposes the accessory to HomeKit.\n\nTo pair, open up your Home iOS app, click the + icon, choose \"Add\nAccessory\" and then tap \"Don't have a Code or Can't Scan?\"  You should\nsee the Leaf under \"Nearby Accessories.\"  Tap that and enter the PIN\n00102003 (or whatever you chose in your config file).\n\n## Contributing\n\nIssues and pull requests are welcome.  When filing a PR, please make\nsure the code has been run through `gofmt`.\n\n## License\n\nCopyright 2020 Joe Shaw\n\n`leaf-homekit` is licensed under the MIT License.  See the LICENSE\nfile for details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeshaw%2Fleaf-homekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeshaw%2Fleaf-homekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeshaw%2Fleaf-homekit/lists"}