Tasmota Connection Failed

Hello
One of my Tasmota plugs won’t reconnect to HAAS. I can connect directly to the switch via a browser however there’s something flaky with the MQTT. Do I need to upgrade the Tasmota firmware? It’s currently at 8.5.0 and I have other switches running the same firmware.

Thanks in advance for any help that can be provided.

14:41:08 MQT: Attempting connection…
14:41:08 MQT: Connect failed to 192.168.4.2:1883, rc -2. Retry in 10 sec
14:41:10 QPC: Reset

The username or password may be wrong in your MQTT settings.

Is the time right? I had this when MQTT or the devices had the wrong time 'cause they couldn’t sync with a time server.

Looks like a network issue

https://tasmota.github.io/docs/MQTT/#return-codes-rc

Hello

I re-entered the MQTT user name and password and it seemed to connect to HASS, however it didn’t show up as an entity. Next I reset the switch from the Tasmota console and now I’m back to “rc -2. Retry in 10 sec”.

Joerg: I don’t know where it’s getting its time from, but it’s the same time as other Tasmota devices, so I don’t think that’s making a difference.

Is this a firmware issue?

Is it possible to upgrade the firmware from 8.5.0 to 11.0.0 by putting in the following URL http://ota.tasmota.com/tasmota/release/tasmota.bin

Follow the recommended upgrade path

https://tasmota.github.io/docs/Upgrading/#upgrade-flow

Can you try with the plug closer to your router and see what happens. Can your network handle all your wifi devices? Can you set the device to use a different SSID on your network? There are many things you can try.

The error you’re getting suggests a network issue, so updating the firmware might not help, because you say your other devices are on the same firmware.

time for tasmota at stock config comes from pool.ntp.org and as a backdrop nl.pool.ntp.org, there is a 3rd but I dont recall the exact details

you can however easily set your own with

ntpserver1 xxx.xxx.xxx.xxx or DNS address

from the console

in Germany the following is a good setting, copy paste to the console:

backlog ntpserver1 fritz.box; ntpserver2 ptbtime1.ptb.de; ntpserver3 de.pool.ntp.org

fritz.box points to the famous AVM routers, they do provide time services in the local net and get it from the vDSL infrastructure. I personally run my own time server, as I want my time from ptbtime1.ptb.de, the Physikalische Technische Bundesanstalt Braunschweig, the master clock in Germany, and I cant make the FritzBox get its time from PTB.

regarding your problem, you could take a backup from a similar device and store it for testing purpose onto the one with the connection troubles. that will show you if its a setting thing on the tasmota side.

I had a nous A1 smart plug that did not want to reconnect to wifi, until I found that I had only added one of my dedicated networks, and this one was just out of reach where the plug was used. sometimes its simple things like this, that keep you guessing for days.

Cheers Manne

Hell
Tried to restore the configuration from another switch. That didn’t work. Then I tried to reset the switch. Now I get an alternating blue / red flashing light and I can’t connect to it to flash new firmware. It’s a “gosung” switch / plug. Do you happen to know the sequence required to get it into flash mode?

So you can’t reach it at 192.168.4.1 ?

Try this

I believe it’s disconnecting/connecting it 3-5 times from the power until it starts to flash.

did you set static ip in the one that provided the backup? If so, you may now have two units with the same IP address, and that scews up your network, to fix it: disconect the one providing the backup and plug in the trouble one, then try to reach it on the ip of the one providing the backup.

otherwise, thake the advice from @dexstar

cheers

Hello
Okay, I used Joerg method and was able to reset the device and get back into it via a browser. So I now know that I can connect to it via wifi. Here is the info before MQTT has been configured. I have it in my notes that my next step should be to upgrade the firmware. Should I go ahead with the upgrade?

00:00:00 CFG: Loaded from flash at FA, Count 26
00:00:00 QPC: Count 1
00:00:00 Project tasmota Tasmota Version 8.5.0(tasmota)-2_7_4_1
00:00:00 WIF: Connecting to AP1 IoT in mode 11N as Gosund_Plug_1…
00:00:06 QPC: Reset
00:00:07 WIF: Connected
00:00:07 HTP: Web server active on Gosund_Plug_1 with IP address 192.168.4.113
15:10:50 RSL: tele/tasmota_25BFE5/INFO1 = {“Module”:“Sonoff Basic”,“Version”:“8.5.0(tasmota)”,“FallbackTopic”:“cmnd/DVES_25BFE5_fb/”,“GroupTopic”:“cmnd/tasmotas/”}
15:10:50 RSL: tele/tasmota_25BFE5/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:“Gosund_Plug_1”,“IPAddress”:“192.168.4.113”}
15:10:50 RSL: tele/tasmota_25BFE5/INFO3 = {“RestartReason”:“Software/System restart”}
15:10:50 RSL: stat/tasmota_25BFE5/RESULT = {“POWER”:“OFF”}
15:10:50 RSL: stat/tasmota_25BFE5/POWER = OFF
15:10:54 RSL: tele/tasmota_25BFE5/STATE = {“Time”:“2022-03-02T15:10:54”,“Uptime”:“0T00:00:14”,“UptimeSec”:14,“Heap”:28,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“IoT”,“BSSId”:“E6:63:DA:A4:73:19”,“Channel”:1,“RSSI”:76,“Signal”:-62,“LinkCount”:1,“Downtime”:“0T00:00:08”}}
15:11:34 RSL: stat/tasmota_25BFE5/RESULT = {“POWER”:“ON”}
15:11:34 RSL: stat/tasmota_25BFE5/POWER = ON
15:11:35 RSL: stat/tasmota_25BFE5/RESULT = {“POWER”:“OFF”}
15:11:35 RSL: stat/tasmota_25BFE5/POWER = OFF

Yes, just go for it. You always can set it back again if necessary.
Might happend that a minimal FW is loaded first. In that case “upgrade” again.

So now I have two gosund plugs that can’t communicate with home assistant via MQTT (I think that’s what’s happening). Both have their firmware upgraded to 9.1.0 but will not upgraded to the latest release; 11.0

The console shows
192.168.4.113 = rc -2
192.168.4.114 = rc -5

Network issue and your MQTT details are incorrect

Can you share a screenshot of you mqtt settings?

Thanks for the help.

Note: I have a mixture of gosund and topgreener switches all on the same network with the same MQTT settings (different topics). I say about 12 of the 14 switches are operating correctly. So far only these are the only two that are failing.

192.168.4.113

192.168.4.114

lookes good to me, here are mine

youre sure your credentials mqttuserand **** are right, right?

why would they not update to 11? is there anything in the wiki. what gosund do you have? the SP111?

strike that down, dump me could not read your picture right, you got a WP5

Share a screenshot also from the Configure MQTT option.

First thing I would try.

In the Topic section, try simplifying the device names, eg gosund1, gosund2 and see if that helps. I’m not sure if you can use the " . " character :thinking: Also, do you have another SSID you can try connecting your devices to ? Tasmota gives you an option to add a 2nd one.

So you have 14 WiFi plugs, how many WiFi devices would you have in total? Your standard ISP router will only support around 24 before you run into issues. There are many questions, but not knowing your entire setup, it can be difficult to troubleshoot.

rc 5 is incorrect MQTT credentials, so check and double check you don’t have a typo somewhere.