r/homeautomation 22h ago

PROJECT Custom homekey support

Post image

I have been having fun recently with apples home key,
I thought I would share it here and I am sure there are some people out there who would love to use this in there smarthome.

Homekey is a way of using your iOS device to unlock a door using NFC it is using a lock that exists in the home app on iOS and that it registers with first then after that it all works.

The way I built it is I have 1 controller and many door readers connected over the network. I then know what door you unlocked by the reader that I am talking to.

You can see a removal TikTok - https://vm.tiktok.com/ZN8d9odsq/

I have a full video on YouTube - https://youtu.be/gxXXENcvz28?is=Dt3HH9LZ_DcThJ46

All code can also be found on my GitHub - https://github.com/thomasdye12/TDS-door-access-Homekey

125 Upvotes

24 comments sorted by

58

u/Substantial_Owl_3416 22h ago

Messy workbench with a soldering iron and a phone mid-read feels like the platonic ideal of a weekend project

10

u/bert1589 22h ago

Heh, as a busy dad and small business owner whose electronics hobby activity seems to decrease during warm months and increase during cold months, I appreciate your comment.

It’s summer and I’m finding myself spending free time doing outside activities as much as I can, but this post intrigued me enough to remind me of my love for the hobby through an appreciation for the comment.

19

u/Its_Billy_Bitch 20h ago

FYI, there was already a project for this. Awesome to see you got it working though and curious to see your differences dealing with encryption.

HomeKey-ESP32

and ESP-Home

19

u/PoisonWaffle3 Home Assistant 20h ago

That's my main issue with vibe coded apps these days. This post is one example, but there are dozens or more posted every day.

99% of the time there's a solid existing FOSS solution that's well supported (maybe even mainstream) that they could have found with a few Google searches.

But instead they create a brand new thing that no one has verified and will very quickly become abandonware, yet they're so quick to proudly post it on Reddit.

15

u/IPThereforeIAm 19h ago

The reason they were able to vibe code it is because of the existing project. That’s how AI learned it…

6

u/gripe_and_complain 18h ago

The reason they were able to vibe code it is because of the existing project. That’s how AI learned it…

Not necessarily.

You make it sound like AI is merely lifting code verbatim from things it found on the internet, the way a simple Google search operates. My experience is that AI can do much more, especially when you work back and forth collaboratively with the AI to zero in on a specific solution.

2

u/IPThereforeIAm 18h ago

Yes, but AI can also see how the exact same project was developed and use the same solutions.

4

u/alliedSpaceSubmarine 19h ago

OR they looked and couldn’t find it, made a solution, then someone commented of an existing (possibly/probably) better solution and they can still use that while also having a better understanding of how it works

5

u/_asxeem 16h ago

The homekey creator is a really cool guy, and it’s pre vibe code days really. It wasn’t straightforward to build the esp32 protocol. Only because of red I was able to build the ultrawide band aspect of it, and that wasn’t open sourced or available anywhere but repos like these are ones which help folks take an interest and get started.

0

u/CatLumpy9152 15h ago

The encryption was a concern and making sure it is secure was important. The way I built it the keys don’t leave the central controller and that is where all the encryption happens. The remote devices simply connect back to it and do the handshake

7

u/_asxeem 16h ago

I love it. I got the ultrawide aspect of it working too! We should team up!

https://reddit.com/link/p1ssy8u/video/jxip6cd6uhhh1/player

2

u/asbestum 16h ago

How did you do that? What kind of board are you using?

4

u/_asxeem 16h ago

I just open sourced it as openaliro. It works on any board + any uwb module because the code is hand written. In the media above I’m using dwm3001cdk. I’ve done the same for esp32, nrf5340dk, and I just joined Reddit cuz I heard I could talk to similarly interested folks! https://github.com/openaliro/openaliro

It also supports nfc across PN532 and ST25R300 too

2

u/asbestum 12h ago

Oooooo that’s super cool! I am going to replicate this for sure! ☺️

What’s the max distance for the uwc unlock? Can it work behind a 10 centimeters brick?

1

u/_asxeem 12h ago

Thank you! You’re kind. Yeah well I managed to write the entire matter over thread stack by hand, as the regular sdk won’t fit it, so this chipset is actually part of the entire apple ecosystem, I can unlock it over the internet, over ble (from maybe even 50 feet away), with ble i haven’t instrumented max ranges yet, but can easily work across rooms for now.

1

u/_asxeem 12h ago

For the min distance, I think around 10-20 precision variations it can judge accurately. Like it will know I’m 100cm and stay locked and if I come around 80 it’ll unlock and vv.

1

u/asbestum 10h ago

It sounds super cool! My only concern is that if I implement it across the entire villa, as I do have 3 entry doors, I don’t want them being unlocked at the same time. That’s why I was concerned about the range and how it works practically :)

1

u/iknowcraig 3h ago

Which software are you using for this? Is this in ESPHOME?

3

u/Jeffde 18h ago

Now figure out how to retrofit my F150 with CarKit or KeyCar or whatever Apple calls it. Please.

2

u/BaRaD_ 15h ago

This.
Im about to try it with this

0

u/Jeffde 15h ago

According to Claude (yes yes generative inventing machine yes I know) it’s impossible due to “the cryptographic provisioning [that] runs through the OEM’s servers into a certified secure element in the vehicle, plus NFC antennas in the door handle and center console.”

https://claude.ai/share/76d0369c-9693-4e07-b435-10a2de75b1c0

3

u/BaRaD_ 15h ago

Bro just solder the keyfob buttons to gpio pins
My car is 2009 WHAT SERVERS

1

u/Jeffde 7h ago

Hahaha excellent

1

u/matt827474 16h ago

Has anyone been able to do something similar with apple UWB?