
Using the HomeKit Accessory Protocol Specification (Non-Commercial Version) - tdrnd
https://developer.apple.com/support/homekit-accessory-protocol/
======
bouke
This is great news. I've written a HAP Server[1] in Swift, which proved quite
difficult as there was no complete specification available. I've written my
implementation based on various non-offical HAP Server implementations
(written in Go[2], JavaScript[3] and Java[4]).

The major difficulties I ran into while implementing were;

* No debug messages from iOS client. It would fail without telling me why.

* Incompatible SRP implementations (3, 6 and 6a) that slightly differ.

* Chacha20-Poly1305 are provided by libsodium, however the parameters of the variant (IETF) differ from the RFC.

I hoped to run this code on my Raspberry Pi, but Swift and Swift-Foundation
are not quite on-par with their macOS counterparts. Hopefully the cross-
compiling effort will allow me in the future to run my HAP Server on this
machine.

[1]: [https://github.com/Bouke/HAP](https://github.com/Bouke/HAP)

[2]: [https://github.com/brutella/hc](https://github.com/brutella/hc)

[3]: [https://github.com/KhaosT/HAP-NodeJS](https://github.com/KhaosT/HAP-
NodeJS)

[4]: [https://github.com/beowulfe/HAP-Java](https://github.com/beowulfe/HAP-
Java)

