ebaauw / homebridge-nb

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

Bridge IP address cached / unset after DHCP subnet change (0.0.0.0) #20

Closed crouchingtiger closed 3 years ago

crouchingtiger commented 3 years ago

I recently switched over my local DHCP server's subnet from 192.168.0. to 10.0.0.. I've removed the stale callback in the callback list, but nb discover always returns an IP address of 0.0.0.0 for the Bridge. The Bridge settings in the Nuki app correctly shows the static IP address I assigned it (10.0.0.7).

Is this a Bridge issue? Do I need to factory reset it? Or is there some other way to force the IP of the Bridge in homebridge-nb?

Homebridge Log:

[2/3/2021, 11:47:15 AM] [Nuki] Nuki_Bridge_XXXXXXXXX: warning: request 1: error: 0.0.0.0:8080: cannot connect: ECONNREFUSED
[2/3/2021, 11:47:15 AM] [Nuki] error: unhandled rejection: Error: connect ECONNREFUSED 0.0.0.0:8080
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
crouchingtiger commented 3 years ago

After rebooting the modem and router (again), and Homebridge multiple times, the stale configuration finally disappeared and homebridge-nb subscribed to event notifications with the correct callback local IP. nb discover shows the correct IP as expected.