Open teovoinea opened 2 months ago
Flaky pairing is unfortunately a fact of life with HomeKit; 'just try it again' is my usual advice. There are a couple of things to note though:
identifier
in your configuration to a new one often helps. iOS seems to cache some aspects of device setup based on this identifierdata_path
is set to (this depends on the target; see the docs for details). Deleting this and restarting should get you back to a clean state.Thinking about this, I wonder if a HAP.reset_pairing
function would be useful for such cases, that would remove any of the persistent information / pairing data and reset the device to a clean slate. WDYT?
reset_pairing would be a great addition!
I had setup the demo in nerves livebook and HAP printed the connection code, the Home App identified the accessory, but at connection time a but in my code caused a failure. Ever since, HAP no longer prints the connection code after starting the accessory server. I've tried reflashing, restarting, killing the process.
It's definitely an issue on my end, I just don't know how to reset/restart for debugging purposes.