Closed SteveDinn closed 1 year ago
"MqttHost":"mqtt.example.com"
Are you using a broker on the Internet ? Or is that a local one with some DNS trickery ?
Scrambling the requested information is not helping us to understand your setup
Everything starts by a DNS problem:
14:41:58.622 DNS: Unable to resolve 'mqtt.example.com' 14:41:58.624 MQT: Connect failed to mqtt.example.com:1883, rc -5. Retry in 10 sec 14:42:09.668 MQT: Attempting connection... 14:42:10.672 DNS: Unable to resolve 'mqtt.example.com' 14:42:10.674 MQT: Connect failed to mqtt.example.com:1883, rc -5. Retry in 20 sec
So I would assume something is wrong there. Your MQTT broker may be up but not the DNS
Should have been explicitly clear before:
And like I said, I can hit the pi-hole instance and successfully look up the name at the same time as tasmota is having these issues. and not ALL my tasmota devices have this problem, despite them all being the same version and many of them being Sonoff Basics.
DNS2 is set to Cloudflare (1.1.1.1). If you remove that, does the problem still occur?
PROBLEM DESCRIPTION
Upgraded most of my devices to v12.2.0, and strangely only in a few cases, devices have become "unavailable" in Home Assistant for a few minutes at a time before coming back. I can tell that these devices are able to reconnect to wi-fi immediately because I can still connect to the web console right after they become "unavailable". The problem is that they can't seem to reconnect to the MQTT broker. Nothing has happened to the MQTT broker because the plethora of other devices (TASMOTA included) in my home network are still using it the whole time.
The one thing I am doing that others may not be is using a DNS name instead of an IP address for my MQTT broker. It is provided by my local DNS server (Pi-Hole), which is up the entire time as well. I've verified that I can lookup the DNS name of the MQTT broker while TASMOTA is having this problem.
Here's what TASMOTA's console messages look like when I connect to the web console (I have redacted personal information):
And as shown, it eventually does reconnect, but it takes a few minutes.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
There are no steps to reproduce this other than to have a device with v12.2.0 and have a MQTT broker configured via its DNS name.
EXPECTED BEHAVIOUR
Wi-fi drops happen, but TASMOTA should be able to resolve the name of, and reconnect to, the MQTT broker.
ADDITIONAL CONTEXT
n/a