From 4325d518242215a100a467d2965ae44e4bcca270 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Wed, 22 Aug 2018 23:19:56 -0300 Subject: [PATCH 1/2] Fixed MQTT Reconnection Bug If you restart your wifi router, and you have Tasmota_MQTT Library with wificonfig 5, Tasmota don't realize of this MQTT disconnection. --- sonoff/xdrv_01_mqtt.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/xdrv_01_mqtt.ino b/sonoff/xdrv_01_mqtt.ino index e91e56f16..3860b96a8 100644 --- a/sonoff/xdrv_01_mqtt.ino +++ b/sonoff/xdrv_01_mqtt.ino @@ -109,7 +109,8 @@ TasmotaMqtt MqttClient; bool MqttIsConnected() { - return mqtt_connected; + //return mqtt_connected; + return MqttClient.Connected(); } void MqttDisconnect() From 4b99fd8ad3adeba4be0f5dcf2224106b71dc40e0 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Wed, 22 Aug 2018 23:33:19 -0300 Subject: [PATCH 2/2] Update xdrv_01_mqtt.ino --- sonoff/xdrv_01_mqtt.ino | 1 - 1 file changed, 1 deletion(-) diff --git a/sonoff/xdrv_01_mqtt.ino b/sonoff/xdrv_01_mqtt.ino index 3860b96a8..9e0ea2274 100644 --- a/sonoff/xdrv_01_mqtt.ino +++ b/sonoff/xdrv_01_mqtt.ino @@ -109,7 +109,6 @@ TasmotaMqtt MqttClient; bool MqttIsConnected() { - //return mqtt_connected; return MqttClient.Connected(); }