SL4P MQTT Problems since Nuki FW Update 4.1.8

SL4P

root@loxberry:/opt/loxberry# grep Nuki_39C748EC /var/log/mosquitto/mosquitto.log
2024-02-22T15:20:19: New client connected from 192.168.1.103:58343 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:20:20: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:20:31: New client connected from 192.168.1.103:58344 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:20:31: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:20:47: New client connected from 192.168.1.103:58345 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:20:48: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:21:15: New client connected from 192.168.1.103:58346 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:21:16: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:22:03: New client connected from 192.168.1.103:58347 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:22:04: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:23:31: New client connected from 192.168.1.103:58348 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:23:32: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:26:19: New client connected from 192.168.1.103:58349 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:26:20: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:31:48: New client connected from 192.168.1.103:58350 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:31:49: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T15:42:36: New client connected from 192.168.1.103:58351 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T15:42:37: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T16:04:03: New client connected from 192.168.1.103:58352 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T16:04:04: Client Nuki_39C748EC disconnected due to malformed packet.

SL3P

root@loxberry:/opt/loxberry# grep SL3P /var/log/mosquitto/mosquitto.log
2024-02-22T15:18:51: New client connected from 192.168.1.124:52451 as SL3P_330FC4FC (p2, c1, k300, u'loxberry').

I don’t know if its the same issue but my Nuki Pro 4.0 doesn’t read anymore Mqtt messages like I wrote here:

The Nuki sends mqtt messages when I do something through the app, and I can read them, but it seems that the Nuki it self can’t read mqtt message that I send from both Home Assistant and Mqttx

1 Like
2024-02-22T16:04:04: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T16:52:12: New client connected from 192.168.1.103:60592 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-02-22T16:52:12: Client Nuki_39C748EC disconnected due to malformed packet.
2024-02-22T16:52:20: New client connected from 192.168.1.103:60594 as Nuki_39C748EC (p2, c1, k300, u'loxberry').

Since a few hours it is working again but I think it is just a matter of hours until it breaks again :o)

16:52:12.272 **OK:** MQTT received: nuki/39C748EC/connected: false
16:52:20.355 **OK:** MQTT received: yAM....:
16:52:20.456 **OK:** MQTT received: nuki/39C748EC/connected: true
16:52:20.457 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.708 **OK:** MQTT received: nuki/39C748EC/deviceType: 4
16:52:20.759 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.759 **OK:** MQTT received: nuki/39C748EC/name: Haustür
16:52:20.759 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.759 **OK:** MQTT received: nuki/39C748EC/firmware: 4.2.0
16:52:20.760 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.760 **OK:** MQTT received: nuki/39C748EC/batteryChargeState: 53
16:52:20.760 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.760 **OK:** MQTT received: nuki/39C748EC/batteryCritical: false
16:52:20.761 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.761 **OK:** MQTT received: nuki/39C748EC/batteryCharging: false
16:52:20.761 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.761 **OK:** MQTT received: nuki/39C748EC/keypadBatteryCritical: false
16:52:20.762 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.762 **OK:** MQTT received: nuki/39C748EC/doorsensorBatteryCritical: false
16:52:20.762 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.762 **OK:** MQTT received: nuki/39C748EC/state: 3
16:52:20.762 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.763 **OK:** MQTT received: nuki/39C748EC/mode: 2
16:52:20.763 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z
16:52:20.763 **OK:** MQTT received: nuki/39C748EC/serverConnected: true
16:52:20.763 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T15:52:20Z

[…]

18:03:52.480 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T17:03:52Z
18:03:52.480 **OK:** MQTT received: nuki/39C748EC/lockActionEvent: 2,0,199680,0,0
18:03:52.580 **OK:** MQTT received: nuki/39C748EC/state: 4
18:03:52.782 **OK:** MQTT received: nuki/39C748EC/timestamp: 2024-02-22T17:03:52Z

Good Point, IIRC I noticed the same. Will focus on this during the next disconnected outage.

Confirmed - My SL4P is now again not reachable via MQTT but it is sending state changes to my MQTT Server. Also noticing the malformed packages again, in the Mosquitto Log:


1 Like

I have noticed that this is only the case until the MQTT Connection is flaged as not working any longer in the Nuki App.

Do you also have the malformed packages on your Broker?

root@loxberry:/opt/loxberry# grep Nuki_3 /var/log/mosquitto/mosquitto.log | grep 17:08
2024-03-01T17:08:16: New client connected from 192.168.1.103:52339 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-03-01T17:08:17: Client Nuki_39C748EC disconnected due to malformed packet.

In terms of Wifi/Network there is no general problem until the Broker receives the malformed packet from the Nuki. Then the Broker is sending an TCP RST|Reset to the Nuki to cancel the MQTT Setup/Connection attempt:

In this Context this is interesting for me to learn why the Nuki is Publishing so many Topics after the Basic TCP Network Reconnect:

https://developer.nuki.io/t/mqtt-and-wifi-connections/25564/4?u=schmufoo

I have this issue with sl4p: if i restart my server, mqtt doesn’t reconnect. I have to unplug and replug the battery.
Instead, with sl3p, mqtt reconnect automatcly (in about 1 hour).

We’re looking into the issue. Unfortunately we have not been able to reproduce it yet. We’ll keep you posted once we have updates.

2 Likes

Having the same issue. (Two SL4P’s).MQTT has never been stable for me. Randomly loses connection. Sometimes it loses connection when operating the lock. I have setup face recognition which then triggers a unlock cmd to the lock. Sometimes the command works, but it loses connection right after that.

Do you also have the malformed packages error log on your Broker?

root@loxberry:/opt/loxberry# grep Nuki_3 /var/log/mosquitto/mosquitto.log | grep 17:08
2024-03-01T17:08:16: New client connected from 192.168.1.103:52339 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-03-01T17:08:17: Client Nuki_39C748EC disconnected due to malformed packet.

Do you know if this issue Is present in beta fw?
Yesterday i was locked out of my house :slight_smile: :slight_smile:
I have a finger print Reader that call home assistant script to open the Door… Luckily my wife was in the area and she had the Key in her bag.
It was my fault for forgetting my cell phone at home otherways i was able to open with Nuki app

No, I don’t see malformed packages. It just disconnects.

I‘m having the same issue with the latest firmware using Mosquitto MQTT Broker. Unfortunately this breaks all my automations with my KNX home. So any hint on the timeline of a fix would be highly appreciated.

Hi, this morning another disconnection.
The log of mosquitto mqtt broker reports:
1709881823: Client Nuki_XXXX closed its connection.
Remove and replug the battery pack make mqtt working for about 48hours

Hi, I have the same problem!
How to activate mosquitto log? I don’t have any logs under /var/log
I use HA 2024.3.0 and 6.4.0 broker

thanks
Luca

We’ve been able to observe the issue with one of our systems too and have a potential fix for it, which is included in todays 4.2.1 beta.

Please update your Smart Lock and test it and report back if the problem still occurs for you.

1 Like

Installed beta fw. I Will report you in next days

1 Like

Installed 4.2.1 Beta today and after the Update it first didnt connected to my Broker until I have removed the Battery. Since then no new malformed package errors in the Mosquitto Log:

2024-03-08T16:06:58: New client connected from 192.168.1.103:51951 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-03-08T16:06:59: Client Nuki_39C748EC disconnected due to malformed packet.
2024-03-08T16:07:51: New client connected from 192.168.1.103:49867 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
2024-03-08T16:08:26: Client Nuki_39C748EC already connected, closing old connection.
2024-03-08T16:08:26: New client connected from 192.168.1.103:51601 as Nuki_39C748EC (p2, c1, k300, u'loxberry').
root@loxberry:/opt/loxberry