ewilken / hap-rs

Rust implementation of the Apple HomeKit Accessory Protocol (HAP)
Apache License 2.0
197 stars 35 forks source link

proxy with hap? #25

Closed jmhodges closed 3 years ago

jmhodges commented 4 years ago

I've been digging in, but is there a way to create a proxy with hap? I have a homekit-enabled device whose behavior I would like to change and enhance by having Siri talk to a hap-created device that proxies modified messages to the original.

ewilken commented 4 years ago

You mean mimicking HomeKit client behavior? Like implementing a HAP server that exposes a virtual device and translating HomeKit requests to that virtual device to HomeKit requests to some real device?

Unfortunately, that's not possible with this crate at the moment, as only the server side of the protocol is implemented.

jmhodges commented 4 years ago

Figured but wasn’t sure how much of the Session stuff was both-sided. I’m going to take a crack at it in my own code. If you’ve got an idea of what a nice integration of client code would look like, I might be able to contribute it back.