jandebeule / nukiPyBridge

40 stars 19 forks source link

Opening door takes up to 10 seconds #11

Open connyg opened 6 years ago

connyg commented 6 years ago

Fantastic library, I am very happy you did that!

I am using the bridge to open the Nuki with an RFID reader that issues a HTTP call to a Pi Zero W which then calls the Nuki to unlatch the door. That takes a few seconds, up to 10, sometimes 15 seconds. Observing the console the bluetooth connect takes that long. Tried to keep the Nuki object initialized, then it's much faster, but after some time this will run into a timeout exception that kills the python script.

Is there any way to keep the connection, or to keep the Nuki object initialized (avoiding the timeout) or to speed up the connect?

jandebeule commented 6 years ago

I have tried this, but was unsuccessful. Keeping the Nuki object initialized is not possible and probably also a bad idea: 1) it will drain Nuki's batteries and 2) you can't connect with another BLE device (Nuki fob, smartphone, Nuki bridge, ...). Sorry.