SmartLock4 Pro keep loosing connection

Installed it yesterday without any problems. Firmwareupdate and access via BT und W(L)AN works really fine, no losses on this side as far as i know. Just Set Uptimekuma to check the availability.

Integration into Homeassistant via Mosquitto worked fine, even its on a different VLAN. Commands were executed really snappy, loving it, but
after a while, first the buttons become unresponsive and then all the entities become unavilable, while the Nuki app goes on working.

only thing that helps is opening the Nuki app and save the MQTT Settings (to force a reconnect)
I have set the integrated WLAN to compatibiliy mode and battery to performance.

Did not help obviously :wink:

Mosquitto broker log - i grouped the events:

2024-12-08 14:24:34: New connection from 192.168.30.20:62003 on port 1883.
2024-12-08 14:24:35: New client connected from 192.168.30.20:62003 as Nuki_4197BE7C (p2, c1, k300, u’mqtt-user’).
2024-12-08 14:32:09: Client Nuki_4197BE7C has exceeded timeout, disconnecting.
.
.
2024-12-08 15:46:23: New connection from 192.168.30.20:57644 on port 1883.
2024-12-08 15:46:24: New client connected from 192.168.30.20:57644 as Nuki_4197BE7C (p2, c1, k300, u’mqtt-user’).
2024-12-08 15:54:03: Client Nuki_4197BE7C has exceeded timeout, disconnecting.
.
.
2024-12-08 16:14:23: New connection from 192.168.30.20:52642 on port 1883.
2024-12-08 16:14:23: New client connected from 192.168.30.20:52642 as Nuki_4197BE7C (p2, c1, k300, u’mqtt-user’).
2024-12-08 16:14:37: New connection from 192.168.30.20:57143 on port 1883.
2024-12-08 16:14:37: Client Nuki_4197BE7C already connected, closing old connection.
2024-12-08 16:14:37: New client connected from 192.168.30.20:57143 as Nuki_4197BE7C (p2, c1, k300, u’mqtt-user’).
.
.
2024-12-08 16:22:01: New client connected from 172.30.32.1:52852 as mqtt-explorer-52dfac40 (p2, c1, k60, u’mqtt-user’).
2024-12-08 16:22:15: Client Nuki_4197BE7C has exceeded timeout, disconnecting.
.
(Thats the Reconnect i forced by saving the MQTT settings)
2024-12-08 16:30:12: New connection from 192.168.30.20:54708 on port 1883.
2024-12-08 16:30:13: New client connected from 192.168.30.20:54708 as Nuki_4197BE7C (p2, c1, k300, u’mqtt-user’).
2024-12-08 16:38:09: Client Nuki_4197BE7C has exceeded timeout, disconnecting.

Any idea?

Edit:
2024-12-08 17:52:11: New connection from 192.168.30.20:57396 on port 1883.
2024-12-08 17:52:12: New client connected from 192.168.30.20:57396 as Nuki_4197BE7C (p2, c1, k300, u’mqtt-user’).
2024-12-08 17:59:51: Client Nuki_4197BE7C has exceeded timeout, disconnecting.

1 Like

No idea on that ?

1 Like

The MQTT connection uses a keep alive timeout of 5min. Looks like your server adds another 3min to it, before he deems a client “not active” anymore. i.e. it seems that keep alives do not arrive at your server, most likely because the TCP connection that was initially set up does not work anymore.

I would try to remove as many network elements as possible in between your Nuki and the MQTT server. Especially firewalls with NAT functionality.

1 Like