ebaauw / homebridge-nb

Homebridge plugin for Nuki Bridge
Apache License 2.0
52 stars 3 forks source link

Bridge syncs but accessories don't work #64

Closed josetomas95 closed 2 years ago

josetomas95 commented 2 years ago

Hi, I´m Jose I have installed the plugin and managed to pair it with the Bridge perfectly. In Homekit, the lock, the Nuki Opener appear as another lock, and then a doorbell from the Opener. The problem is that pressing to lock or unlock the lock does nothing, pressing the Nuki Opener does not react either.

Captura de Pantalla 2022-04-21 a las 2 15 09 Captura de Pantalla 2022-04-21 a las 2 15 48

photo_2022-04-21 02 17 01

ebaauw commented 2 years ago

The devicetype in the requests doesn’t make sense, 2.11.9 is the firmware version; the devicetype is a single integer, and should be 0 for the 2.0 smart lock.

https://github.com/ebaauw/homebridge-nb/blob/766c024a3345264fed1eaf6a2ce9b9981e15f741/lib/NbAccessory.js#L299

This doesn’t look good, but I think it’s mitigated when you restart Homebridge, causing devicetype to be updated.

ebaauw commented 2 years ago

Looking at the code, the wrong value is set when the accessory is initialised, either because it's newly created or restored from persisted cache. The right value is set when the bridge is polled. Also the but doesn't affect the Opener. I think you might have a communication issue between Homebridge NB and the Nuki bridge, unrelated to this bug. I would need to see the full log for that, please attach the log file (rather than copy/pasting large amounts of logs).

ebaauw commented 2 years ago

In v1.2.7.