kind3r / hass-addons

Integration of the offline TTLock sdk into Home Assistant
59 stars 21 forks source link

Can not paired another lock #13

Closed shuenpin closed 3 years ago

shuenpin commented 3 years ago

Hi,

I've add one lock on the Home assistant and it working fine. When I want to add another lock, WebUI can not find it.

But I open the lock via fingerprint, the messages is show "Emmiting paramsChanged { batteryCapacity: false, newEvents: false, lockedStatus: true }" -> unlocked "Emmiting paramsChanged { batteryCapacity: false, newEvents: false, lockedStatus: true }" -> locked

Can you help me?

Thank you.

shuenpin commented 3 years ago

Sorry,I resolve this issue.

I restart this docker and rescan. It's working !

Thank you for this project.

kind3r commented 3 years ago

Hi, glad to see it was solved with a restart. I'm working on various improvements to try to compensate for the inistability in the BLE communication which causes parts of the addon to 'hang' during various stages of communication with the lock requiring a restart. At least now it should throw some errors and work after manual retry. Far from perfect but still. Next on my list is implementing some sort of retry mechanic in the SDK to make things appear more stable in the UI.

shuenpin commented 3 years ago

@kind3r I've upgrade to 0.4.10.This version is more stable!

I also buy raspberry pi 4 case and fans to improve the BLE communication. https://www.raspberrypi.org/products/raspberry-pi-4-case-fan/

so the BLE is working fine.

I'll buy another lock to add my home assistant.

Thank you for your help.

kind3r commented 3 years ago

Thanks for the coffee, but given the fact that I don't drink any, can I replace it with a beer ? Or at least a cola zero ? :D :D :D

I saw some clips on youtube about replacing the PI antenna with an IPX connector and I might try it this weekend so see if there is any improvement. It's a straight forward mod for people with solderinig skills (like I like pretend I have) plus I just received some IPX connectors + antenna which actually regesiter as 2.4Ghz on the antenna tester which for 5$ for 10 antennas+pigtails is really a bargain.

This BLE instabillity and the fact that the Nible BLE SDK does not handle this in any way (as in calls to functions don't return, no error, no nothing ... just wait and wait) is really frustrating. So I'll just have to wrap them around other calls with timeouts so that at leas I will be able to retry or throw some errors.

Cheers !