Fix homekit_controller pairing retry when the first attempt is busy (#38605)

* Fix homekit_controller pairing retry

If the device was busy on the first pairing attempt, it
was not possible to retry.

* always restart pairing on recoverable execptions

* move code

* malformed pin is safe to restart

* make busy_error an abort

* switch max retries, simplify tests

* try pairing later

* try pairing later

* merge

* s/tlv_error/protocol_error/g

* Adjust wording
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-08-09 22:17:13 -05:00
1 parent 4e56339ba1
commit 9bb7b3b125
4 files changed
+137 -63

No files matched your search

@@ -16,11 +16,16 @@
"data": {
"pairing_code": "Pairing Code"
}
}
},
"try_pair_later": {
"title": "Pairing Unavailable",
"description": "Ensure the device is in pairing mode or try restarting the device, then continue to re-start pairing."
}
},
"error": {
"unable_to_pair": "Unable to pair, please try again.",
"unknown_error": "Device reported an unknown error. Pairing failed.",
"protocol_error": "Error communicating with the accessory. Device may not be in pairing mode and may require a physical or virtual button press.",
"authentication_error": "Incorrect HomeKit code. Please check it and try again.",
"max_peers_error": "Device refused to add pairing as it has no free pairing storage.",
"busy_error": "Device refused to add pairing as it is already pairing with another controller.",