ewilken / hap-rs

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

Pairing and Performance #76

Open soundprojects opened 2 years ago

soundprojects commented 2 years ago

I am currently comparing the homekit accessory simulator performance with that of hap-rs

It seems that hap-rs is considerably slower and less reliable in both pairing and consequently connecting/reconnecting accessories

Here is a log where I attempt to pair an accessory:

Scherm­afbeelding 2022-08-13 om 18 41 30

There is at least one second delay between Pair setup step M3 and step M4 which does not seem to be there with the simulator

In this particular example, the pairing does not succeed and for some reason hap-rs reinitiates step M1 to step M4. I then receive the error 'Adding Accessory is not possible'

Is the pairing related to the configuration and active values of the accessories? Or is this related to something in the network stack of hap-rs?

After pairing succesfully, which I can't seem to reproduce anymore for some reason, I have the same situation where reconnecting with accessories does not work and.the logs show that the TCP receiver reconnects when I close and reopen the Ios Home app. This does not make the accessories work succesfully though...

overheat commented 1 year ago

I can help to double check this issue. Because I have homekit accessory simulator works and wonder to know how to use hap-rs, this, repo.

but I need to know how to pairing first #79