MQTT LWT disconnection

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

MQTT LWT disconnection

#1 Post by Micha_he » 27 Sep 2020, 08:23

In my opinion, the newer firmware-versions disconnect from MQTT-broker before they go to deep-sleep. So the broker give no 'Connection Lost' message. Can I disable this disconnect-message befor sleep for some clients, to get the old behavior?
Last edited by Micha_he on 27 Sep 2020, 15:38, edited 1 time in total.

TD-er
Core team member
Posts: 8751
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MQTT LWT disconnection

#2 Post by TD-er » 27 Sep 2020, 09:43

Hmm that's one feature I didn't think of.
I guess it makes sense to have it included.

Only thing I can't predict is if all data in the buffers of the MQTT client will be flushed when going to sleep.
That's one reason why I made sure to disconnect before sleeping.

Another approach can be to send the LWT ourself.

Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: MQTT LWT disconnection

#3 Post by Micha_he » 27 Sep 2020, 15:45

I'll test your suggestion to send the 'Connection Lost'-message via rule before goto sleep. But only in a few days, after my bike tour. The problem exists only at three devices, that goto deepsleep.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 124 guests