Closed cbullo closed 4 years ago
Hi, in latest firmware there isn't any known bug about that. So, if you are having mqtt reconnections with latest version, you should look for an issue in your network or in your broker. Please, after you gather some more information, address this to the Tasmota support chat. Thanks
Alright, will do
Alright, will do
Not related to Tasmota nor network nor MQTT broker. Check DHCP lease time configuration on your router.
bolislav2 and mine is 60 seconds. ESP8266 core broke established TCP connections every time dhcp lease is renewed if lease time is smaller than 2 minutes even though IP address doesn't change. Tested with ESP8266 WiFiClient example (nothing related to Tasmota).
bolislav2 fixed it by changing lease time to 72h. I fixed it by configuring static ip address in Tasmotas (my router doesn't allow change DHCP settings).
I'm trying to open a ESP8266 core issue.
No, there is no problem with the DHCP release and Arduino ESP8266. I have not a single reconnect for devices running for days and i have a DHCP release renew time of 300 minutes. The problem is "somewhere" in your network.
No, there is no problem with the DHCP release and Arduino ESP8266. I have not a single reconnect for devices running for days and i have a DHCP release renew time of 300 minutes.
Not the test case. Please, set a 60 seconds lease time and test. If reproduced (for sure will do), recompile Tasmota with LWIP 1.4 (I'm testing right now)
Hi, I couldn't reproduce your issue neither. I have the default lease time and zero problems. Tried 60 as yours and no problem. Please, check the config of your router, update the firmware of your router or report to your routers manufacturer. Thanks.
I have the same problem with a Tuya switch: a SYN request with the wrong checksum followed by a TCP RST 200ms later.
The request seems fine, my network card doesn't have TCP offload as the request from another device (192.168.1.22) has the correct checksum.
I believe maybe the device sends the packet with the wrong checksum, my server drop it. After 200ms the device gives up and sends TCP RST
Please, confirm 60 seconds pattern. If so, please confirm it gone away when setting up a fixed ipadress (IpAddress1 xxx.xxx.xxx.xxx in Console)
BUG DESCRIPTION
I have accidentally (sic!) flashed a perfectly working sonoff device with the newest firmware. Before it worked perfectly and the connection was super stable. Now after flashing the latest firmware it disconnects from mqtt server exactly every 60 seconds. I have followed the steps from the FAQ MQTT troubleshooting without any change.
FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED
[x] Read the Contributing Guide and Policy and the Code of Conduct
[x] Searched the problem in issues
[x] Searched the problem in the wiki
[x] Searched the problem in the forum
[x] Searched the problem in the chat
[x] Device used (e.g., Sonoff Basic): Sonoff wall plug
[ ] Tasmota binary firmware version number used: 6.7.1
[x] Flashing tools used: NodeMCU, esptool for erasing
[ ] Provide the output of command:
Backlog Template; Module; GPIO
:[ ] If using rules, provide the output of this command:
Backlog Rule1; Rule2; Rule3
:[ ] Provide the output of this command:
Status 0
:STATUS 0 output here: 14:22:16 MQT: myhome/livingroom/sonoff/STATUS = {"Status":{"Module":1,"FriendlyName":["Sonoff"],"Topic":"myhome/livingroom/sonoff","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Power on","Uptime":"0T00:08:15","StartupUTC":"2019-11-02T13:14:01","Sleep":50,"CfgHolder":4617,"BootCount":4,"SaveCount":11,"SaveAddress":"F9000"}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS2 = {"StatusFWR":{"Version":"6.7.1(basic)","BuildDateTime":"2019-10-26T13:20:09","Boot":31,"Core":"STAGE","SDK":"2.2.2-dev(38a443e)"}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["localnet",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000005A00000000000000","00000000"]}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS4 = {"StatusMEM":{"ProgramSize":456,"Free":544,"Heap":29,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"144051","FlashMode":3,"Features":["00000809","8F082383","041083A0","20021706","010001C0","00000000"],"Drivers":"1,2,3,4,9,10,16,20,21","Sensors":"3"}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS5 = {"StatusNET":{"Hostname":"myhome/livingroom/sonoff-5933","IPAddress":"192.168.0.36","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.0.1","Mac":"60:01:94:8D:97:2D","Webserver":2,"WifiConfig":4}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.0.10","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_8D972D","MqttUser":"openhabian","MqttCount":9,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS7 = {"StatusTIM":{"UTC":"Sat Nov 02 13:22:16 2019","Local":"Sat Nov 02 14:22:16 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"07:38","Sunset":"17:29"}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS10 = {"StatusSNS":{"Time":"2019-11-02T14:22:16"}} 14:22:16 MQT: myhome/livingroom/sonoff/STATUS11 = {"StatusSTS":{"Time":"2019-11-02T14:22:16","Uptime":"0T00:08:15","UptimeSec":495,"Vcc":3.426,"Heap":29,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":9,"POWER":"OFF","Wifi":{"AP":1,"SSId":"localnet","BSSId":"D8:D7:75:78:00:45","Channel":8,"RSSI":100,"LinkCount":9,"Downtime":"0T00:00:32"}}}
[ ] Provide the output of the Console log output when you experience your issue; if applicable: (Please use
weblog 4
for more debug information)Console output here: 14:21:14 MQT: Attempting connection... 14:21:14 MQT: Connected 14:21:14 MQT: myhome/livingroom/sonoff/LWT = Online (retained) 14:21:14 MQT: myhome/livingroom/sonoff/cmnd/POWER = 14:21:14 MQT: myhome/livingroom/sonoff/RESULT = {"POWER":"OFF"} 14:21:14 MQT: myhome/livingroom/sonoff/POWER = OFF 14:21:31 CMD: Backlog Template; Module; GPIO 14:21:31 MQT: myhome/livingroom/sonoff/RESULT = {"NAME":"Generic","GPIO":[255,255,255,255,255,255,255,255,255,255,255,255,255],"FLAG":15,"BASE":18} 14:21:31 MQT: myhome/livingroom/sonoff/RESULT = {"Module":{"1":"Sonoff Basic"}} 14:21:31 MQT: myhome/livingroom/sonoff/RESULT = {"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"0":"None"},"GPIO14":{"0":"None"}} 14:22:02 MQT: Attempting connection... 14:22:02 MQT: Connect failed to 192.168.0.10:1883, rc -2. Retry in 10 sec 14:22:14 MQT: Attempting connection... 14:22:14 MQT: Connected 14:22:14 MQT: myhome/livingroom/sonoff/LWT = Online (retained) 14:22:14 MQT: myhome/livingroom/sonoff/cmnd/POWER = 14:22:14 MQT: myhome/livingroom/sonoff/RESULT = {"POWER":"OFF"} 14:22:14 MQT: myhome/livingroom/sonoff/POWER = OFF
TO REPRODUCE
Connect to Mosquitto MQTT server on my raspberry pi.
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen. Not disconnecting from MQTT server
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
The same is happening with my generic esp 01 module that I flashed with the same firmware.
And these are messages received on my MQTT:
(Please, remember to close the issue when the problem has been addressed)