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.17k stars 4.8k forks source link

ESP32 with Tasmota32-Bluetooth let relay switch on and off during cold boot #14320

Closed Shadesh closed 2 years ago

Shadesh commented 2 years ago

PROBLEM DESCRIPTION

ESP32 Bluetooth Release (Webinstaller Version and latest GitHub Dev Version) let a LOW Relay switch on for a short period of time during cold boot. Tried with Liligo t7 and AZDelivery ESP32 Dev Boards with fresh install (erased before). Already tried different GPIOs, same problem, relay switches on for a short period during cold boot.

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:

17:47:35.245 RSL: RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
17:47:35.461 RSL: RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
17:47:35.662 RSL: RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}

17:48:00.488 RSL: STATUS = {"Status":{"Module":1,"DeviceName":"Tasmota","FriendlyName":["Tasmota"],"Topic":"tasmota_473338","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":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0}} 17:48:00.525 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release/tasmota32.bin","RestartReason":"Vbat power on reset","Uptime":"0T00:01:41","StartupUTC":"2022-01-07T16:46:19","Sleep":50,"CfgHolder":4617,"BootCount":4,"BCResetTime":"2022-01-07T16:41:18","SaveCount":13}} 17:48:00.552 RSL: STATUS2 = {"StatusFWR":{"Version":"10.1.0(bluetooth)","BuildDateTime":"2022-01-06T13:32:16","Core":"2_0_1_1","SDK":"v4.4-dev-3728-g7cac8278e","CpuFrequency":80,"Hardware":"ESP32-D0WDQ6-V3","CR":"403/699"}} 17:48:00.578 RSL: STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["IoT",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C80001000600003C5A0A000000000000","00000080","00006000","00004000"]}} 17:48:00.609 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":1488,"Free":1856,"Heap":110,"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,5,6,52,62,127"}} 17:48:00.649 RSL: STATUS5 = {"StatusNET":{"Hostname":"tasmota-473338-4920","IPAddress":"192.168.1.107","Gateway":"192.168.1.65","Subnetmask":"255.255.255.192","DNSServer1":"10.20.30.3","DNSServer2":"10.20.30.4","Mac":"08:3A:F2:47:33:38","Webserver":2,"HTTPAPI":1,"WifiConfig":4,"WifiPower":17.0}} 17:48:00.675 RSL: STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_473338","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}} 17:48:00.697 RSL: STATUS7 = {"StatusTIM":{"UTC":"2022-01-07T16:48:00","Local":"2022-01-07T17:48:00","StartDST":"2022-03-27T02:00:00","EndDST":"2022-10-30T03:00:00","Timezone":"+01:00","Sunrise":"08:42","Sunset":"17:10"}} 17:48:00.724 RSL: STATUS10 = {"StatusSNS":{"Time":"2022-01-07T17:48:00","ESP32":{"Temperature":43.3},"TempUnit":"C"}} 17:48:00.736 RSL: STATUS11 = {"StatusSTS":{"Time":"2022-01-07T17:48:00","Uptime":"0T00:01:41","UptimeSec":101,"Heap":112,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":48},"POWER":"OFF","Wifi":{"AP":1,"SSId":"IoT","BSSId":"7E:8A:20:06:2E:3B","Channel":11,"Mode":"11n","RSSI":88,"Signal":-56,"LinkCount":1,"Downtime":"0T00:00:07"}}}

- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
00:00:13.172 WIF: Connected
00:00:13.430 HTP: Web server active on tasmota-473338-4920 with IP address 192.168.1.107
00:00:13.797 NTP: Synch time...
00:00:14.818 NTP: No reply
00:00:14.976 CFG: Saved, Count 17, Bytes 4096
00:00:14.978 NTP: Synch time...
00:00:15.042 RTC: UTC 2022-01-07T16:54:24, DST 2022-03-27T02:00:00, STD 2022-10-30T03:00:00
17:54:24.000 NTP: Synched
17:54:24.314 RSL: INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"10.1.0(bluetooth)","FallbackTopic":"cmnd/DVES_473338_fb/","GroupTopic":"cmnd/tasmotas/"}}
17:54:24.329 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-473338-4920","IPAddress":"192.168.1.107"}}
17:54:24.333 RSL: INFO3 = {"Info3":{"RestartReason":"Vbat power on reset"}}
17:54:24.348 RSL: RESULT = {"POWER":"OFF"}
17:54:24.350 RSL: POWER = OFF
17:54:24.356 TFS: File 'autoexec.bat' not found
17:54:28.821 BRY: GC from 5413 to 3710 bytes, objects freed 17/48 (in 1 ms)
17:54:28.827 RSL: STATE = {"Time":"2022-01-07T17:54:28","Uptime":"0T00:00:19","UptimeSec":19,"Heap":116,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":48},"POWER":"OFF","Wifi":{"AP":1,"SSId":"IoT","BSSId":"7E:8A:20:06:2E:3B","Channel":11,"Mode":"11n","RSSI":90,"Signal":-55,"LinkCount":1,"Downtime":"0T00:00:13"}}
17:54:28.856 RSL: SENSOR = {"Time":"2022-01-07T17:54:28","ESP32":{"Temperature":45.0},"TempUnit":"C"}
17:54:28.864 RSL: BLE = {"Time":"2022-01-07T17:54:28","BLEDevices":{"total":0}}
17:54:28.869 RSL: BLE = {"Time":"2022-01-07T17:54:28","BLE":{"scans":0,"adverts":0,"devices":0,"resets":0}}
17:54:28.882 EQ3 poll cycle starting
17:54:33.811 RSL: config = {"ip":"192.168.1.107","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota-473338-4920","mac":"083AF2473338","md":"ESP32-DevKit","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.1.0","t":"tasmota_473338","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,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],"ver":1}
17:54:33.818 RSL: sensors = {"sn":{"Time":"2022-01-07T17:54:33","ESP32":{"Temperature":53.3},"TempUnit":"C"},"ver":1}

TO REPRODUCE

Steps to reproduce the behavior: Do a fresh install of tasmota32-bluetooth, attach a LOW switch relay_i on GPIO18 or any other GPIO, save config and do a cold boot. Relay will switch on and off during boot.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. A Relay should not switch on and off during cold boot.

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)

Jason2866 commented 2 years ago

Closing since already opened in Discussions #14310