-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PubSubClient: Allow clean disconnection as optional. #7231
Conversation
Allow clean disconnect as optional. This avoid the automatic deletion of LWT message in the broker for clean disconnections, in order to let LWT work also on all cases (Restart, Config Changes, etc) See arendst#7189
I still can't see why we have to deviate from the standard. A clean disconnect tells the broker we're done for now. Pls convince me. |
Hi Theo, We wouldn't be deviating from the standard. The issue is that Tasmota is sending a close package to the broker on clean disconnections (restarts, ota flash process, etc.) That close package is not needed because that tells the broker to dismiss the LWT. So, when the LWT is dismissed by the broker, Tasmota device will keep been showed, in the home automation software, as ONLINE while in reality is OFFLINE. This happens because as the LWT was dismissed by the broker (due to the closing package) the broker never publish the LWT as OFFLINE. So, an easy test is to change the topic in Tasmota of a fully configured and working device. After the Tasmota's restart you will still see as ONLINE the old topic as long as the new topic. That is why, the use of closing package for clean disconnections is not useful for Tasmota. |
Makes sense. Thx. |
Change PWM implementation to Arduino #7231
* Format code with cpplint Signed-off-by: Mickael Gaillard <mickael.gaillard@tactfactory.com> * Change PWM implementation to Arduino arendst#7231 * Support for setting the time in the Tuya MCU Switch on with USE_TUYA_TIME * Fix wrong setting of free_range after reset or restart (arendst#8120) * Fix ESP32 SCD30 compile error * USE_TUYA_TIME deactivated by default * Fix ESP32 compile errors * Fix compilation Co-authored-by: Mickael Gaillard <mickael.gaillard@tactfactory.com> Co-authored-by: Stephan Hadinger <stephan.hadinger@gmail.com> Co-authored-by: Walter Zengel <w.zengel@gmx.de> Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>
Update to latest PWM version of Arduino #7231
Description:
PubSubClient Library: Allow clean disconnection as optional.
This avoid the automatic deletion of the LWT message in the MQTT broker for clean disconnections in order to let LWT to work on all disconnections cases (Wifi disconnection, wifi bad comms, Normal Restart, Config Changes, unintended or intentional crash, OTA updates, ArduinoOTA, etc) and showing the Tasmota device as OFF-LINE in the home automation software until it reconnects and the LWT with ONLINE is sent again.
Related issue (if applicable): fixes #7189
Checklist: