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.96k stars 4.77k forks source link

Exception when use tuya zigbee smart knob #22007

Open tasict opened 2 weeks ago

tasict commented 2 weeks ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.

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:

22:39:05.401 MQT: stat/ZBPro/STATUS = {"Status":{"Module":0,"DeviceName":"ZBPro","FriendlyName":["ZBPro"],"Topic":"ZBPro","ButtonTopic":"0","Power":"0","PowerLock":"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":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}} 22:39:05.463 MQT: stat/ZBPro/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"https://ota.tasmota.com/tasmota32/tasmota32-zbbrdgpro.bin","RestartReason":"Software reset CPU","Uptime":"0T00:03:54","StartupUTC":"2024-08-24T14:35:11","Sleep":0,"CfgHolder":4617,"BootCount":794,"BCResetTime":"2023-11-11T09:50:51","SaveCount":1165}} 22:39:05.523 MQT: stat/ZBPro/STATUS2 = {"StatusFWR":{"Version":"14.2.0.3(831597e-zbbrdgpro)","BuildDateTime":"2024-08-23T09:26:00","Core":"3_0_4","SDK":"5.1.4.240801","CpuFrequency":160,"Hardware":"ESP32-D0WD-V3 v3.0","CR":"407/699"}} 22:39:05.560 MQT: stat/ZBPro/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["NO46-2.4G","NO46"],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000695A0A192800000000","00000080","40006082","00004000","00000000"]}} 22:39:05.615 MQT: stat/ZBPro/STATUS4 = {"StatusMEM":{"ProgramSize":1576,"Free":279,"Heap":124,"StackLowMark":3,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"16405E","FlashFrequency":40,"FlashMode":"DIO","Features":["0809","8F8A87CF","00548001","000000CF","010013C0","C0000981","40024080","00200000","5400082C","00000080","00000004"],"Drivers":"1,2,!3,!4,!5,!8,9,10,12,!16,!20,!21,23,24,!27,29,!35,38,!41,50,52,!59,62,!68,82,!121","Sensors":"1,2,3,5,6,127","I2CDriver":"7"}} 22:39:05.688 MQT: stat/ZBPro/STATUS5 = {"StatusNET":{"Hostname":"ZBPro","IPAddress":"10.1.8.25","Gateway":"10.1.8.1","Subnetmask":"255.255.252.0","DNSServer1":"10.1.8.1","DNSServer2":"8.8.8.8","Mac":"40:22:D8:60:7D:04","IP6Global":"fd00:88::4222:d8ff:fe60:7d04","IP6Local":"fe80::4222:d8ff:fe60:7d04%st1","Ethernet":{"Hostname":"","IPAddress":"0.0.0.0","Gateway":"0.0.0.0","Subnetmask":"0.0.0.0","DNSServer1":"10.1.8.1","DNSServer2":"8.8.8.8","Mac":"00:00:00:00:00:00","IP6Global":"","IP6Local":""},"Webserver":2,"HTTPAPI":1,"WifiConfig":4,"WifiPower":16.0}} 22:39:05.761 MQT: stat/ZBPro/STATUS6 = {"StatusMQT":{"MqttHost":"mqtt.ctsite.tk","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_607D04","MqttUser":"DVES_USER","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":15}} 22:39:05.810 MQT: stat/ZBPro/STATUS7 = {"StatusTIM":{"UTC":"2024-08-24T14:39:05Z","Local":"2024-08-24T22:39:05","StartDST":"2024-03-31T02:00:00","EndDST":"2024-10-27T03:00:00","Timezone":"+08:00","Sunrise":"05:31","Sunset":"18:19"}} 22:39:05.848 MQT: stat/ZBPro/STATUS10 = {"StatusSNS":{"Time":"2024-08-24T22:39:05"}} 22:39:05.876 MQT: stat/ZBPro/STATUS11 = {"StatusSTS":{"Time":"2024-08-24T22:39:05","Uptime":"0T00:03:54","UptimeSec":234,"Heap":121,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":999,"MqttCount":1,"Berry":{"HeapUsed":26,"Objects":402},"Wifi":{"AP":2,"SSId":"NO46","BSSId":"E4:38:83:8C:F8:AE","Channel":11,"Mode":"HT20","RSSI":100,"Signal":-21,"LinkCount":1,"Downtime":"0T00:00:04"}}} 22:39:05.938 MQT: stat/ZBPro/STATUS12 = {"StatusSTK":{"Exception":28,"Reason":"LoadProhibited","EPC":"4011c806","EXCVADDR":"00000000","CallChain":["4011c803","401417c2","4013f858","40139aa1","4015e2b6","401402ac","4013f858","401384e0","40139777","40133bd0","4015ec76","4010744f","401034dd","4015f3fb","40109805","40127df7","400dea1c","400d93d1","401501ea"]}}

- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

I encountered an issue while using the Zigbee device Smart Knob (Tuya ERS-10TZBVK-AA) with Tasmota 14.2.0.3 (831597e-zbbrdgpro). When performing a Short Single Press, the ZB Pro crashes and restarts.

EXPECTED BEHAVIOUR

22:35:16.559 MQT: tele/ZBPro/INFO1 = {"Info1":{"Module":"Sonoff Zigbee Pro","Version":"14.2.0.3(831597e-zbbrdgpro)","FallbackTopic":"cmnd/DVES_607D04_fb/","GroupTopic":"cmnd/tasmotas/"}} 22:35:16.596 MQT: tele/ZBPro/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"ZBPro","IPAddress":"10.1.8.25","IP6Global":"","IP6Local":"fe80::4222:d8ff:fe60:7d04%st1"}} 22:35:16.630 MQT: tele/ZBPro/INFO3 = {"Info3":{"RestartReason":{"Exception":28,"Reason":"LoadProhibited","EPC":"4011c806","EXCVADDR":"00000000","CallChain":["4011c803","401417c2","4013f858","40139aa1","4015e2b6","401402ac","4013f858","401384e0","40139777","40133bd0","4015ec76","4010744f","401034dd","4015f3fb","40109805","40127df7","400dea1c","400d93d1","401501ea"]},"BootCount":794}} 22:35:19.311 QPC: Reset

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)

s-hadinger commented 2 weeks ago

It's hard to debug without a detailed log from serial. Do you have the opportunity to plug the ZBPro to serial and set seriallog 3?

tasict commented 2 weeks ago

I suspect that there might be an issue with the Koenkk Zigbee firmware. If I try to patch the latest Koenkk firmware, CC1352P2_CC2652P_launchpad_coordinator_20240710.zip, onto the Sonoff Zigbee Pro, similar to the modifications you made earlier, how should I proceed?

s-hadinger commented 2 weeks ago

Don't jump to conclusions too quickly. Even if there is a bug in Koenkk firmware, it does not explain a crash of Tasmota.

s-hadinger commented 2 weeks ago

I have ordered the device, but it will take weeks for delivery

tasict commented 2 weeks ago

Wow, let me describe it in more detail. This device has two modes: command and event. In the default command mode, rotating the knob doesn’t cause any issues, but single, double, or hold presses all result in a crash. A quick triple press switches it to event mode, and in event mode, everything works fine. I’ll also try to find some time to dump the crash log.

s-hadinger commented 2 weeks ago

Ok, any log that makes it possible to reproduce the problem is useful.