ebaauw / homebridge-nb

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

Problem when Nuki bridge changes its IP address #99

Closed dimovic69 closed 1 year ago

dimovic69 commented 1 year ago

Once the plugin is installed and working properly, if Nuki bridge changes its IP address the plugin stops working. You have to reinstall or reconfig the pluging. As far as I see, the plugin saves the IP address of the Bridge and cannot handle Bridge IP change automatically.

When using DHCP option in the bridge this can happen from time to time. A work around is to set fixed IP address in the nuki bridge

ebaauw commented 1 year ago

You have to reinstall or reconfig the pluging.

You shouldn't have to. Homebridge NB polls the Nuki discovery server every 10 minutes, and should update the Nuki bridge IP address when it has changed. Make sure that both the Nuki bridge and Homebridge NB can reach that server, https://api.nuki.io/discover/bridges, and that the Nuki bridge actually registers with it. Run nb discover to check that the Nuki bridge has registered and is discoverable.

I find sometimes the Nuki bridge fails to renew its registration with the discovery server, even when configured correctly. In that case, a power cycle of the Nuki bridge tends to remedy the situation.

A work around is to set fixed IP address in the nuki bridge

Or configure your DHCP server, always to serve the same IP address to the Nuki bridge, based on its MAC address.