I created this PR mainly to address these issues: #26, #16, and I-Connect/NukiBleEsp32#37.
It's a bit of code, but I made sure that every commit is self-contained and commented on.
I suggest reviewing this PR by going commit by commit, and not only the final result.
Features:
Implement a retry mechanism
The lock is now much faster to execute commands and retrieve results
It works even when sending fast-paced commands
It correctly reports the locking and unlocking states of the lock more reliably
Actions and status updates are now correctly prioritized and paced
Stale Bluetooth connections are now terminated without having to wait for the lock to forcibly close the connection after 20 seconds (see these lines)
~I'm marking this PR as a draft in order to have some days in which I will further test the code.~
I tested this for 3 weeks and it's working properly.
Any opinion is welcome.
And thanks for this amazing repo!
I created this PR mainly to address these issues: #26, #16, and I-Connect/NukiBleEsp32#37.
It's a bit of code, but I made sure that every commit is self-contained and commented on. I suggest reviewing this PR by going commit by commit, and not only the final result.
Features:
For best results, I recommend decreasing NukiBleEsp32
CMD_TIMEOUT
as I did in this commit: https://github.com/zanna-37/NukiBleEsp32/commit/1677425e9e6bd484e1abb0669b7d9d23259ecb23~I'm marking this PR as a draft in order to have some days in which I will further test the code.~ I tested this for 3 weeks and it's working properly. Any opinion is welcome. And thanks for this amazing repo!