OK so I configured a device using broker.hivemq.com
Here is my log
00:00:02.023 HTP: Web server active on Sonoff-Pump with IP address 192.168.2.120
09:30:55.025 MQT: Attempting connection...
09:30:55.185 MQT: Connected
This is on v10.1.0 and it connected without issue. Are the Client and the Topic different? Tasmota does not allow them to be the same– for the above device the Client is Pump-Sonoff and the Topic Sonoff-Pump . Hivemq uses Websocket Port 8000 so your router will need to allow that port to be used
Regards
Phil K
Sent from Mail for Windows
From: mohan RatiRam
Sent: 04 February 2022 09:02
To: TasmotaUsers
Subject: Re: tasmota public broker not working
Other than username and password, I don't see any option in tasmota menu I can specify as connect parameter.
I tried playing with these commands on console without much luck ..
Backlog mqtthost broker.hivemq.com; mqttport 1883; mqttuser mohan; mqttpassword mohan; topic mytopic
The only thing different in connecting via the MQTT box is that we have to specify the client name in the tool. could that cause the problem ? If so, is there a way to specify the client name in Tasmota MQTT connect packet?
regards
mohan
On Friday, 4 February 2022 at 13:08:40 UTC+5:30 knowles...@gmail.com wrote:
So result code 2 is a rejection from the broker so Tasmota has connected but the connection has been refused. That may be caused by needing some further configuration
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/28910f70-a629-46d2-9317-ecc9687c13ben%40googlegroups.com.
for testing purposes, I set my Client as Pump-Sonoff and the Topic as Sonoff-Pump and get the same error , this time using test.mosquitto.org. I chose a different broker on purpose just to eliminate it is not a broker.hivemq.com problem in specific but a public broker in general.
here is the log..
00:00:04.004 HTP: Web server active on mohan with IP address 192.168.1.8
17:45:08.005 MQT: Attempting connection...
17:45:08.415 MQT: Connect failed to test.mosquitto.org:1883, rc -2. Retry in 10 sec
17:45:09.415 QPC: Reset
17:45:19.009 MQT: Attempting connection...
17:45:19.224 MQT: Connect failed to test.mosquitto.org:1883, rc -2. Retry in 20 sec
17:45:40.008 MQT: Attempting connection...
17:45:40.228 MQT: Connect failed to test.mosquitto.org:1883, rc -2. Retry in 30 sec
17:46:11.050 MQT: Attempting connection...
17:46:11.261 MQT: Connect failed to test.mosquitto.org:1883, rc -2. Retry in 40 sec
I hope this helps!
I appreciate your time and effort in helping with this issue.
Have you checked that you can actually reach the broker?
Try using telnet command from a Linux box eg
telnet broker.hivemq.com 1883
You should get an answer like
Connecting to broker...
Escape character is xxx
If you don't get any answer, then the port on broker is not open
If it does work then you have a local issue.
Pedro
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Can you share the config page for MQTT. I tried a test with v10.1 and v11 and successfully connected to the hive broker. Most rc -2 issues are caused by network issues not Tasmota.
From: Mark Desk
Sent: 25 February 2022 01:34
To: TasmotaUsers
Subject: Re: tasmota public broker not working
Hello,
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/5c52d8b4-e067-43d0-9819-e8d6b132d7f2n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "TasmotaUsers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonoffusers/6OnfvhO6u8o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/7BC11114-F11F-4557-BB8C-B20876FDDF14%40hxcore.ol.

Perhaps but I can connect to hive using v10.1 – that points to an issue in your setup not in Tasmota. The version I use on that device is a pre-compiled sensors.bin. That device has been in use since v5.12
I would erase and re-flash to see if something is corrupted in flash – bear in mind too that downgrading below v9.1 is not supported by Tasmota anyway. Migration has to go via v9.1 and if that was skipped that may cause an issue too.
From: mohan
Sent: 26 February 2022 09:59
To: Philip Knowles
Cc: TasmotaUsers
Subject: Re: tasmota public broker not working
if DNS was not playing well...
1. Tasmota should have connected using the IP address
2. MQTT explorer would have failed but it works well as shown in the screenshot.

I tried connecting Tasmota to a public broker from my office as well as my home without much luck.
best,
mohan
On Sat, Feb 26, 2022, 11:15 AM Philip Knowles <knowles...@gmail.com> wrote:
I suspect that you have a DNS issue.
All I changed was the address of the MQTT broker and it connected straight away.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/c8a153a1-d854-4e94-9bb7-e8a874c9121bn%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/41969518-572a-411a-a7b7-3d8faa61eda8n%40googlegroups.com.
CONS?
PROS?
Any advice welcome.