Skip to content

ESP32 HomeKit Lock with support for Apple Home Key

License

Notifications You must be signed in to change notification settings

8cH9azbsFifZ/HomeKey-ESP32

 
 

Repository files navigation

HomeKey-ESP32 Discord Badge

CI

ESP32 HomeKit Lock with support for the HomeKey

Credit to @kormax for reverse-engineering the Homekey NFC Protocol and publishing a POC and credit to @kupa22 for the research on the HAP side of things, this project was possible thanks to their work. Additionaly, thanks to the Arduino library HomeSpan for being a great library that eased my work on HAP and other things and allowed me to just focus on the homekey functionality.

Disclaimer

Use this at your own risk, i'm not a cryptographic expert, just a hobbyist. Keep in mind that the HomeKey was implemented through reverse-engineering as indicated above so it might be lacking stuff from Apple's specification to which us private individuals do not have access.

While functional, the project is still a work in progress so expect breaking changes as i'm figuring out how everything should fit together and the overrall structure of the code.

Overview

Right now only the PN532 is supported as the NFC module, however, beware of cheap clones espcially clones of Elechouse's as it will cause issues, i recommend the Elechouse PN532 NFC Module V3 just make sure to buy from a trusted vendor.

  • It integrates with HomeAssistant's Tags and can be used to create automations based on a person(issuer) or device(endpoint).
  • The lock's state is published and controlled via MQTT through user-defined topics
  • Any NFC Target that's not identified as homekey will skip the flow and publishes the UID, ATQA and SAK on the same Authentication MQTT topic
  • It is not made for battery-powered applications due to the power hungry WiFi and the code not being optimized for this
  • Designed for a board with an ESP32 chip and 4MB Flash size

Goal of the project is to make it easy to add the homekey functionality to locks that don't support it or to anything for that matter :) .

Usage

Visit the wiki for documentation on the project

About

ESP32 HomeKit Lock with support for Apple Home Key

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 71.2%
  • HTML 21.7%
  • C 4.1%
  • Python 1.4%
  • CMake 0.7%
  • Lua 0.6%
  • Makefile 0.3%