Open monoluser opened 4 years ago
I don't think this repo is maintained anymore. I forked it, made it Python3 compatible and fixed a bunch of other stuff. Also added a REST layer to easily communicate with the locks from a browser: https://github.com/giejay/nukiPyBridge
Thank you so much for your fast answer. I'll close this and continue at your repo
I can't open a new issue report there so I'll continue here. I'm getting this error:
Starting BLE adapter... Init Nuki BLE connection... Nuki BLE connection established Nuki Pairing UUID handle created: 008b Requesting Nuki Public Key using command: Nuki_REQ Payload: Nuki_PUBLIC_KEY Nuki Public key requested Nuki returned unexpected response (expecting PUBLIC_KEY): Nuki_ERROR Error Code: 10 Command Identifier: 0001
What's the problem? Do you need more information about the SmartLock?
Sometimes it takes two or more efforts before the lock gets recognized.
Is the lock close enough? Did you start pairing mode?
There was a problem with virtualization. Works now like a charm until the isNewNukiStateAvailable() stuff. lock.txt unlock.txt
Thank you for sharing your code. I've ported it to Python 3 as far as I could, but still get errors:
Starting BLE adapter... Init Nuki BLE connection... Nuki BLE connection established Nuki Pairing UUID handle created: 008b Traceback (most recent call last): File "./init.py", line 17, in
nuki.authenticateUser(myPublicKeyHex, myPrivateKeyHex, myID, myIDType, myName)
File "/home/pi/nukiPyBridge/nuki.py", line 88, in authenticateUser
publicKeyReqCommand = publicKeyReq.generate()
File "/home/pi/nukiPyBridge/nuki_messages.py", line 50, in generate
return array.array('B',msg.decode("hex"))
AttributeError: 'str' object has no attribute 'decode'
Can you check my changes and if they're fine, fix the (hopefully) small rest?
nukiPyBridge.diff.txt