Had to wait a while for it to happen, and this time I managed to catch
it quickly...
From the Tasmota console:
05:34:23.171 MQT: 12AR/bedroom/ceiling-lamp/STATE =
{"Time":"2022-03-02T05:34:23","Uptime":"5T05:15:19","UptimeSec":450919,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":7,"POWER":"OFF","Wifi":{"AP":1,"SSId":"i_o_s","BSSId":"4E:D9:E7:FA:A2:26","Channel":3,"Mode":"11n","RSSI":68,"Signal":-66,"LinkCount":7,"Downtime":"0T00:00:20"}}
05:39:23.164 MQT: 12AR/bedroom/ceiling-lamp/STATE =
{"Time":"2022-03-02T05:39:23","Uptime":"5T05:20:19","UptimeSec":451219,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":7,"POWER":"OFF","Wifi":{"AP":1,"SSId":"i_o_s","BSSId":"4E:D9:E7:FA:A2:26","Channel":3,"Mode":"11n","RSSI":64,"Signal":-68,"LinkCount":7,"Downtime":"0T00:00:20"}}
05:43:10.891 WIF: Connecting to AP1 i_o_s Channel 13 BSSId
FE:92:BF:5D:A1:5F in mode 11n as LT30-5...
05:43:13.757 MQT: Attempting connection...
05:43:18.075 MQT: Connect failed to
mqtt.ductilebiscuit.net:1883, rc -4.
Retry in 10 sec
05:43:28.859 MQT: Attempting connection...
05:43:33.181 MQT: Connect failed to
mqtt.ductilebiscuit.net:1883, rc -4.
Retry in 20 sec
05:43:53.979 MQT: Attempting connection...
05:43:58.294 MQT: Connect failed to
mqtt.ductilebiscuit.net:1883, rc -4.
Retry in 30 sec
05:44:29.091 MQT: Attempting connection...
05:44:33.406 MQT: Connect failed to
mqtt.ductilebiscuit.net:1883, rc -4.
Retry in 40 sec
05:44:38.453 RSL: STATE =
{"Time":"2022-03-02T05:44:38","Uptime":"5T05:25:34","UptimeSec":451534,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":7,"POWER":"OFF","Wifi":{"AP":1,"SSId":"i_o_s","BSSId":"FE:92:BF:5D:A1:5F","Channel":13,"Mode":"11n","RSSI":72,"Signal":-64,"LinkCount":8,"Downtime":"0T00:00:23"}}
05:45:14.216 MQT: Attempting connection...
05:45:18.534 MQT: Connect failed to
mqtt.ductilebiscuit.net:1883, rc -4.
Retry in 50 sec
And from the mosquitto log:
1646199799: New connection from 192.168.5.75 on port 1883.
1646199804: Client DVES_E27BEC already connected, closing old connection.
1646199804: Client DVES_E27BEC disconnected.
1646199804: New client connected from 192.168.5.75 as DVES_E27BEC (c1,
k30, u'tasmota').
1646199804: Socket error on client DVES_E27BEC, disconnecting.
1646199811: New connection from 192.168.5.75 on port 1883.
1646199819: New client connected from 192.168.5.75 as DVES_E27BEC (c1,
k30, u'tasmota').
1646199819: Socket error on client DVES_E27BEC, disconnecting.
1646199839: New connection from 192.168.5.75 on port 1883.
1646199844: New client connected from 192.168.5.75 as DVES_E27BEC (c1,
k30, u'tasmota').
1646199844: Socket error on client DVES_E27BEC, disconnecting.
1646199871: New connection from 192.168.5.75 on port 1883.
1646199879: New client connected from 192.168.5.75 as DVES_E27BEC (c1,
k30, u'tasmota').
1646199879: Socket error on client DVES_E27BEC, disconnecting.
1646199920: New connection from 192.168.5.75 on port 1883.
1646199924: New client connected from 192.168.5.75 as DVES_E27BEC (c1,
k30, u'tasmota').
1646199924: Socket error on client DVES_E27BEC, disconnecting.
So it looks like the WiFi pseudo-roams successfully (SetOption56 and
Setoption57 are enabled, as I have multiple access points), but
something goes wrong when reconnecting MQTT. rc -4 is 'connection timeout'.
Suspicious this might somehow be a Unifi, switch or pfSense issue (the
IOT devices are on their own isolated VLAN, and have to cross the
firewall to reach the broker). There's nothing in the firewall logs.
Possibly something isn't updating its ARP table properly? I think I
need to try connecting to the web console from the machine the broker is
running on (rather than the android that's within easy reach of bed at
5:43 in the morning) when it next happens...
Kim.
On 21/02/2022 07:35, Philip Knowles wrote:
> What is the MQTT result code that you get?
>
> *Sent: *20 February 2022 20:56
> *To: *
sonof...@googlegroups.com <mailto:
sonof...@googlegroups.com>
> *Subject: *Re: Tasmota occasionally loses connection to MQTT, but WiFi
>
https://groups.google.com/d/msgid/sonoffusers/07CBAAC1-3A84-4656-A6F2-B8E22CFAB164%40hxcore.ol
> <
https://groups.google.com/d/msgid/sonoffusers/07CBAAC1-3A84-4656-A6F2-B8E22CFAB164%40hxcore.ol?utm_medium=email&utm_source=footer>.