arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.97k stars 4.77k forks source link

Tasmota32 Becomes Unresponsive / Locks-Up / Needs Reboot #14583

Closed BFLK closed 2 years ago

BFLK commented 2 years ago

PROBLEM DESCRIPTION

I am using the latest pre-compiled version of Tasmota32-bluetooth (http://ota.tasmota.com/tasmota32/release/tasmota32-bluetooth.bin) on an ESP-32 D1 Mini for reading values from Xiaomi Temperature and Humidity sensors around the house (3 sensors). After around 24-48h the device becomes unresponsive (MQTT / web interface are not working, additionally the device is not reachable via ICMP) and a soft reset (via the reset button) or a power reset is needed for it to start working again. The issue started to occur after upgrading Tasmota32 from version 9.5.0 to 10.1.0.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [x] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
No rules are used
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
I cannot provide output from the console after the issue occurs as the device is unresponsive / unreachable.

TO REPRODUCE

Install Tasmota32-bluetooth on ESP32 D1 Mini and configure Wifi / MQTT / enable BLE. After somewhere between 24/48h the device hangs and it's unreachable. Seems to stop reporting sensor values via MQTT, it's unreachable via the web interface and stops responding to Ping. This did not happen on Tasmota32-bluetooth 9.5.0. A soft reset via the reset button or a power reset would solve the issue which is reoccurring again after somewhere between 24-48h.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. Device should be stable as it was on 9.5.0.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

tony-fav commented 2 years ago

Are you able to connect the ESP to a computer to record Serial logging? That may be able to get us some post-failure logs.

BFLK commented 2 years ago

I will try to catch that in a serial trace. After the last reset (no configuration change performed), I am trying to reproduce the issue again - for now I reached 1d 18h of uptime without anything going wrong. Keep you posted.

crhass commented 2 years ago

I am seeing the same issue on a sonoff basic and sonoff T1 so not just the ESP32 version. After some time the web interface does not respond and they become unavailable to mqtt. All my devices were on 10.0, some are not affected, or not regularly. Upgrade to 10.1.0 is the same. Lite version is the same. Reset 6 is the same. Rollback to 9.5.0 is stable, web interface works and not dropping from mqtt.

mrekin commented 2 years ago

Same problem at esp32-bluetooth build. Version":"2022.01.2(bluetooth)" on ESP32-wroom. Added free heap history logging, but looks like there are no leaks (75-80).

BFLK commented 2 years ago

I am using Tasmota 10.1.0 on the following ESP8266 devices without any issue: Arilux LC04 / Gosund SP111 / Wemos D1 Mini / Sonoff TH16. The only device where I face this issue is the ESP32 D1 Mini.

Jason2866 commented 2 years ago

@BFLK Please use a different device than a ESP32 D1 mini. Many ESP32 D1 mini have power issues and are not designed as espressif recommends. In other words many of this boards have issues which are not software related. Most Boards which are clones of the official devkit are working.

barbudor commented 2 years ago

Last upgrade for me was 2022.01.2 on Jan 8th. No problems since then with 8 LYWSD03 flashed with PVVX firmware. Running on a ESP32 DevKit clone

BFLK commented 2 years ago

I don't have any other ESP32 devices, only ESP8266 so I can't test it on a different device. The reason I got the ESP32 one is just for the BLE capabilities. However, after the last soft-reset the issue is not occurring anymore which is weird. The only thing that is different from the past is that I access the web interface 2-3 times per day to see if it happened or not. I will leave it untouched for a while to see how it goes. My supposition is that sometimes WIFI disconnects and does not reconnect causing this issue.

When you say that the ESP32 D1 mini has power issues, what do you mean? I am powering this one via USB from a beefy enough power supply. I didn't suspect a power issues because everything was nice and stable on 9.5.0 and issues started with 10.1.0.

Thanks, Alex

Jason2866 commented 2 years ago

The D1 mini ONBOARD 3.3v vreg is (too) poor. It does not help having a good extern power supply. Wifi problems and partitial reachable device are typical symptoms for power problems. Small changes "somewhere" can result in issues. Long story, short. Trying software bug hunting with a D1 ESP32 mini is waste of time.

Jason2866 commented 2 years ago

I will close this until a decent ESP32 have this problems too. Please reopen if you have such a device and the problems are there too.

dkwireless commented 2 years ago

@Jason2866 I have the same problem on two different devices flashed with latest bluetooth firmware. ESP32 CAM and ESP32S NodeMCU. They just hang after some hours/days. I have specifically flashed bluetooth firmware to ESP32 CAM just to test if it has the same effect. I think you should reopen this issue.

barbudor commented 2 years ago

ESP32 CAM is not know to be a good board neither I have tasmota32-bluetooth 2022.01.1 running on a ESP32DevKitC for 3 weeks without interruption. WIth 10.1.0 I also had some lockup

Jason2866 commented 2 years ago

Webcam and Bluetooth will NEVER work reliable together. Both need much CPU power, too much for the ESP32 to do both. My ESP32 (decoding 2 LYWSD03) is running 4 days since i did the test setup. Sorry i cant reproduce the issue.

dkwireless commented 2 years ago

Just to be clear my main setup is on ESP32S NodeMCU with bluetooth firmware 2022.01.3. It monitors 5 Xiaomi sensors with ATC firmware and hangs sometimes in few hours, sometimes in few days. This behavior started from 10.0.0 firmware. I have just tried reproducing the same setup on ESP32 CAM module with same bluetooth firmware (not custom, camera is off). It has shown the same behavior.

barbudor commented 2 years ago

@dkwireless Are you running latest dev ? With 10.1.0 I had 24 to 48 hours locks-up in December. No problems since 2022.01.1 flashed Jan 8th.

dkwireless commented 2 years ago

@barbudor Yesterday, after reading your message, I have reflashed both devices with latest dev. They are still running. I will let you know.

flgh commented 2 years ago

Same problem on AZDelivery ESP32 NodeMCU 10.0.0 and 10.1.0 monitoring 2 Xiaomi sensors reflashed with pvxx and forwarding to MQTT. Disconnects from wifi after 2-7 days and never reconnects.

10:37:10.017 CMD: status 0 10:37:10.019 SRC: Serial 10:37:10.020 CMD: Grp 0, Cmnd 'STATUS', Idx 1, Len 1, Data '0' 10:37:10.025 RSL: STATUS = {"Status":{"Module":1,"DeviceName":"Tasmota","FriendlyName":["Tasmota"],"Topic":"tasmota_8298A0","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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":1,"PowerRetain":} 10:37:10.076 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release/tasmota32-bluetooth.bin","RestartReason":"Software reset CPU","Uptime":"7T17:19:30","StartupUTC":"2022-01-22T16:17:40","Sleep":50,"CfgHolder":4617,"BootCount":59,"BCResetTime":"2021-11-14T21:31:17","SaveCount":184}} 10:37:10.123 RSL: STATUS2 = {"StatusFWR":{"Version":"10.1.0(bluetooth)","BuildDateTime":"2021-12-08T14:50:26","Core":"2_0_1_1","SDK":"v4.4-dev-3728-g7cac8278e","CpuFrequency":80,"Hardware":"ESP32-D0WDQ6","CR":"435/699"}} 10:37:10.146 RSL: STATUS3 = {"StatusLOG":{"SerialLog":4,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["DrayTek","Terpentine"],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008209","2805C80001000600003C5A0A000000000000","000000C0","00006000","00004002"]}} 10:37:10.188 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":1488,"Free":1856,"Heap":39,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashFrequency":40,"FlashMode":3,"Features":["00000809","8F9AC787","00140001","000000CF","010013C0","40000981","00004080","00200000","0000082C"],"Drivers":"1,2,3,4,5,7,8,9,10,12,20,21,24,26,27,29,38,50,52,59,79,85","Sensors":"1,2,3,} 10:37:10.237 RSL: STATUS5 = {"StatusNET":{"Hostname":"tasmota-8298A0-6304","IPAddress":"0.0.0.0","Gateway":"172.16.1.13","Subnetmask":"255.255.255.0","DNSServer1":"172.16.1.22","DNSServer2":"172.16.1.25","Mac":"24:0A:C4:82:98:A0","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}} 10:37:10.272 RSL: STATUS6 = {"StatusMQT":{"MqttHost":"172.16.1.10","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_8298A0","MqttUser":"DVES_USER","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}} 10:37:10.300 RSL: STATUS7 = {"StatusTIM":{"UTC":"2022-01-30T09:37:10","Local":"2022-01-30T10:37:10","StartDST":"2022-03-27T02:00:00","EndDST":"2022-10-30T03:00:00","Timezone":"+01:00","Sunrise":"08:22","Sunset":"17:43"}} 10:37:10.337 RSL: STATUS10 = {"StatusSNS":{"Time":"2022-01-30T10:37:10","ESP32":{"Temperature":43.9,"HallEffect":95},"TempUnit":"C"}} 10:37:10.360 BRY: GC from 7239 to 3774 bytes, objects freed 10/48 (in 1 ms) 10:37:10.363 RSL: STATUS11 = {"StatusSTS":{"Time":"2022-01-30T10:37:10","Uptime":"7T17:19:30","UptimeSec":667170,"Heap":37,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":48}}} 10:37:11.188 WIF: Checking connection... 10:37:11.189 WIF: Connect failed as AP cannot be reached 10:37:12.188 WIF: Checking connection... 10:37:12.189 WIF: Connect failed as AP cannot be reached 10:37:13.189 WIF: Checking connection... 10:37:13.190 WIF: Connect failed as AP cannot be reached

dkwireless commented 2 years ago

It's been three days with latest dev firmware without restart. image I think it's good now. Sorry for confusion.

jma89 commented 2 years ago

I'm just popping in to say that I'm seeing this same problem with 10.1.0 on an ESP32 Dev Board from Adafruit.

(My workaround is an automation in Home Assistant that toggles an outlet when the BLE devices go offline.)

Is there a known date when an update will be released to ... Release ... with this fix? (Despite the irony of this issue, I tend to stay off the dev channel for "prod" devices.)

barbudor commented 2 years ago

You can pop, but that will not change that the fix is there and you can upgrade. If you want to wait a Release version because you like round numbers, up to you. 2022.02 is coming this month, normally before mid Feb