homebridge / HAP-NodeJS

Node.js implementation of the HomeKit Accessory Protocol (HAP)
Apache License 2.0
2.69k stars 630 forks source link

Is there any documentation for new services and characteristics? #913

Closed PrinceJunkie closed 2 years ago

PrinceJunkie commented 2 years ago

In the changelog I see AccessCode and NFCAccess services and corresponding characteristics. but I don't know what these services do. Is there any documentation for it?

I know that there's https://developers.homebridge.io/ but it only states how to use it but not what it does.

Supereg commented 2 years ago

Apple hasn't openly documented them themselves. And nobody else (to my knowledge) has yet tried to reverse them. Therefore, nobody really knows how they work. But feel free to give it a shot :)

mgoeller commented 2 years ago

Did not @KhaosT already got it to work? See: https://github.com/KhaosT/HAP-NodeJS/tree/tian/nfc-access

Supereg commented 2 years ago

If you look at the commit https://github.com/KhaosT/HAP-NodeJS/commit/80cdb1535f5bee874cc06657ef283ee91f258815, you will see this is a "minimal" implementation. Meaning the NFCAccess device doesn't actually do anything. It returns no values at all. It is visualized in the Home/Wallet app but isn't functional. That's the essential part still missing, where any help from the community is well appreciated.

KhaosT commented 2 years ago

Yeah the NFC side is a little annoying, as the protocol requires the Apple's ECP 2.0 support, which NFC hardware manufacturers requires NDA in place. Even if we can figure that out, there is no easy way to get hardware that support it. Proxmark3 is the only one I tested that can prob ECP 2.0 stuff so far.

mgoeller commented 2 years ago

Ok, understood. So basically any future Smart Lock that wants to support NFC Apple Wallet Unlock, needs to include for example this IC: https://www.nxp.com/products/rfid-nfc/nfc-hf/nfc-readers/high-performance-nfc-controller-ic-with-support-for-apple-enhanced-contactless-polling-ecp:PN7150X