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
22.2k stars 4.81k forks source link

ESP32 CAM Not Working anymore with Tasmota 12.1.0 #16251

Closed helmar74 closed 2 years ago

helmar74 commented 2 years ago

PROBLEM DESCRIPTION

I updated my ESP32 CAM from Tasmota 12.0.2 to 12.1.0. After that the Main Menu isn't working anymore. I can access Subpages with direct links (e.g. /cs?, /up?) but the Main Menu isn't working... It looks like this:

image

REQUESTED INFORMATION

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

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

_Steps to reproduce the behavior: Update ESP32 Cam from 12.0.2 to 12.1.0

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. Device should work as before

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)

helmar74 commented 2 years ago

I'M using this ESP Modul: https://templates.blakadder.com/ai-thinker_ESP32-CAM.html

helmar74 commented 2 years ago

Downgrading to 12.0.2 brings back the main menu:

image
MaceMoneta commented 2 years ago

I just completed upgrade of 5 esp32-cam (AI Thinker) from 12.0.2 to 12.1.0, without issue. It would be helpful to see the weblog immediately after the upgrade (since you say you can get to the console). It was omitted from your report.

helmar74 commented 2 years ago

Thanks for your reply ! Here we go:

00:00:00.003 HDW: ESP32-D0WDQ6 (PSRAM)
00:00:00.003 HDW: FoundPSRAM=1 CanUsePSRAM=1
00:00:00.038 UFS: FlashFS mounted with 304 kB free
00:00:00.082 CFG: Loaded from File, Count 83
00:00:00.402 CFG: Saved, Count 84, Bytes 4096
00:00:00.409 QPC: Count 1
00:00:00.412 ROT: Mode 1
00:00:00.428 BRY: GC from 3601 to 2842 bytes, objects freed 8/24 (in 1 ms) - slots from 39/61 to 22/61
00:00:00.451 CFG: No '*.autoconf' file found
00:00:00.454 BRY: GC from 3598 to 3089 bytes, objects freed 2/28 (in 1 ms) - slots from 39/61 to 25/61
00:00:00.454 BRY: Berry initialized, RAM used=3089 bytes
00:00:00.462 BRY: No 'preinit.be'
00:00:00.463 SRC: Restart
00:00:00.466 Project tasmota - webcam8 Version 12.1.0(webcam)-2_0_4_1(2022-08-18T10:33:47)
00:00:00.491 BRY: No 'autoexec.be'
00:00:00.769 WIF: Checking connection...
00:00:00.770 WIF: Attempting connection...
00:00:00.208 WIF: Connecting to AP1 hs.net_aussen_24GHz Channel 11 BSSId 34:31:C4:76:5C:90 in mode 11n as webcam8...
00:00:01.363 WIF: Checking connection...
00:00:01.364 WIF: Connected
00:00:01.618 HTP: Blank Device - Initial Configuration
00:00:01.620 HTP: Web server active on webcam8 with IP address 192.168.1.72
00:00:02.582 NTP: Sync time...
00:00:02.645 RTC: UTC 2022-08-18T17:08:40, DST 2022-03-27T02:00:00, STD 2022-10-30T03:00:00
18:08:40.000 RTC: Synced by NTP
18:08:40.207 MQT: Attempting connection...
18:08:40.234 MQT: Connected
18:08:40.240 MQT: tele/webcam8/LWT = Online (retained)
18:08:40.245 MQT: cmnd/webcam8/POWER = 
18:08:40.247 MQT: Subscribe to cmnd/webcam8/#
18:08:40.251 MQT: Subscribe to cmnd/tasmotas/#
18:08:40.255 MQT: Subscribe to cmnd/webcam8_fb/#
18:08:40.260 MQT: tele/webcam8/INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"12.1.0(webcam)","FallbackTopic":"cmnd/webcam8_fb/","GroupTopic":"cmnd/tasmotas/"}}
18:08:40.278 MQT: tele/webcam8/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"webcam8","IPAddress":"192.168.1.72"}}
18:08:40.284 MQT: tele/webcam8/INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":44}}
18:08:40.299 TFS: File 'autoexec.bat' not found
18:08:42.451 HTP: Console
18:08:44.588 QPC: Reset
18:08:45.584 BRY: GC from 4704 to 3056 bytes, objects freed 25/30 (in 1 ms) - slots from 67/76 to 31/76
18:08:45.594 MQT: tele/webcam8/STATE = {"Time":"2022-08-18T18:08:45","Uptime":"0T00:00:09","UptimeSec":9,"Heap":152,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":2,"Objects":30},"Wifi":{"AP":1,"SSId":"hs.net_aussen_24GHz","BSSId":"34:31:C4:76:5C:90","Channel":11,"Mode":"11n","RSSI":100,"Signal":-36,"LinkCount":1,"Downtime":"0T00:00:03"}}
18:08:45.637 MQT: tele/webcam8/SENSOR = {"Time":"2022-08-18T18:08:45","ESP32":{"Temperature":69.4},"TempUnit":"C"}
18:08:46.599 APP: Boot Count 44
18:08:47.507 CFG: Saved, Count 85, Bytes 4096
18:08:50.617 MQT: tasmota/discovery/F008D1D2F290/config = {"ip":"192.168.1.72","dn":"webcam8","fn":["webcam8",null,null,null,null,null,null,null],"hn":"webcam8","mac":"F008D1D2F290","md":"ESP32-DevKit","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"12.1.0","t":"webcam8","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[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],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"sht":[[0,0,0],[0,0,0],[0,0,0],[0,0,0]],"ver":1} (retained)
18:08:50.630 MQT: tasmota/discovery/F008D1D2F290/sensors = {"sn":{"Time":"2022-08-18T18:08:50","ESP32":{"Temperature":68.9},"TempUnit":"C"},"ver":1} (retained)
helmar74 commented 2 years ago

I just replaced the HW Module to a new one. Same issue!

helmar74 commented 2 years ago

Downgrading to 12.0.2 brought Main Page of the Webinterface back!

MaceMoneta commented 2 years ago

I don't see the "CAM: Initialized" message. Can you try running WcInit in the console of 12.1.0 and see if it initializes the camera properly? If so, is the main menu then correct?

sfromis commented 2 years ago

Testing a bit, I'm also seeing some RestartReason IntegerDivideByZero (which is also in the Status 0 output reported). Hunting down after which build it started, led me to https://github.com/arendst/Tasmota/commit/e79cd1b34268bb5820603727925b86a6b4e37586 https://github.com/arendst/Tasmota/pull/16182 as the first one it started to fail with, @Jason2866

helmar74 commented 2 years ago

WcInit

Hi, i tried. Didn't work... Same issue

Jason2866 commented 2 years ago

Testing a bit, I'm also seeing some RestartReason IntegerDivideByZero (which is also in the Status 0 output reported). Hunting down after which build it started, led me to e79cd1b #16182 as the first one it started to fail with, @Jason2866

Weird, since there is no active code

gemu2015 commented 2 years ago

since the camera driver is a precompiled library we need to update the lib and include file in sync.

in this enum the PIXFORMAT_YUV420 was inserted in between which effects PIXFORMAT_JPEG we use.

comment the YUV420 and it works again

typedef enum { PIXFORMAT_RGB565, // 2BPP/RGB565 PIXFORMAT_YUV422, // 2BPP/YUV422 //PIXFORMAT_YUV420, // 1.5BPP/YUV420 PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE PIXFORMAT_JPEG, // JPEG/COMPRESSED PIXFORMAT_RGB888, // 3BPP/RGB888 PIXFORMAT_RAW, // RAW PIXFORMAT_RGB444, // 3BP2P/RGB444 PIXFORMAT_RGB555, // 3BP2P/RGB555 } pixformat_t;

helmar74 commented 2 years ago

since the camera driver is a precompiled library we need to update the lib and include file in sync.

in this enum the PIXFORMAT_YUV420 was inserted in between which effects PIXFORMAT_JPEG we use.

comment the YUV420 and it works again

typedef enum { PIXFORMAT_RGB565, // 2BPP/RGB565 PIXFORMAT_YUV422, // 2BPP/YUV422 //PIXFORMAT_YUV420, // 1.5BPP/YUV420 PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE PIXFORMAT_JPEG, // JPEG/COMPRESSED PIXFORMAT_RGB888, // 3BPP/RGB888 PIXFORMAT_RAW, // RAW PIXFORMAT_RGB444, // 3BP2P/RGB444 PIXFORMAT_RGB555, // 3BP2P/RGB555 } pixformat_t;

Could you please give me detailed information, in which file I have to change what, I can compile the firmware and give it a try...

Thanks in advance

helmar74 commented 2 years ago

I commented PIXFORMAT_YUV420 out in file

...Tasmota-master_v1210_webcamfix\lib\libesp32\esp32-camera\driver\include\sensor.h
image

Now it works like charme ;-)

Thank you very much. Maybe this should be flaged as BUG and be changed in next dev release? I'll keep this issue open...

Regards

helmar

Jason2866 commented 2 years ago

Please try the development build firmware with the meged PR #16262. I than will close the issue when it works too.

@gemu2015 Thx!

gemu2015 commented 2 years ago

works with latest dev!

sfromis commented 2 years ago

"Version":"12.1.0.1(webcam)","BuildDateTime":"2022-08-19T07:37:26" works for me.

arendst commented 2 years ago

"Version":"12.1.0(webcam)","BuildDateTime":"2022-08-19T08:32:24" works for me too ;-)

Updated binaries are now in release v12.1.0 too.

helmar74 commented 2 years ago

"Version":"12.1.0(webcam)","BuildDateTime":"2022-08-19T08:32:24" works for me too ;-)

Updated binaries are now in release v12.1.0 too.

Updated with current stable binary, that worked fine