I-Connect / NukiBleEsp32

GNU General Public License v3.0
35 stars 20 forks source link

Improve pairing reliability and speed #61

Closed iranl closed 2 months ago

iranl commented 3 months ago

Improves pairing speed and reliability, especially in environments with many BLE devices.

Current pairing mechanism will log many "Found nuki in pairing state" messages but still not pair and log "No nuki in pairing mode found" when executing the pairNuki function.

This is caused by other BLE devices resetting the pairingServiceAvailable bool before the pairNuki function is executed.

By putting the pairingServiceAvailable bool on a timer instead of making it dependant on the last seen device by BLEScanner this behaviour can be fixed, increasing pairing speed and reliability.

Also fixes typo in "extendDisconnectTimeout"