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.32k stars 4.82k forks source link

Buzzer and SSD1306 broken when upgrading from 8.3.1.2 to 9.1.0 #9913

Closed pookycade closed 4 years ago

pookycade commented 4 years ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.

Buzzer just makes low clicks instead of sound wave, SSD1306 does not turn on at all. Both work just fine in 8.3.1.2 platformio compile. Piezo is passive, and will work in 9.1 if you set it as PWM. Will not work other than almost inaudible clicks in 9.1 if you set on Buzzer. SSD1306 when starting up in 8.3.1.2 is off, have to turn it on with DisplayText [O] and it displays just fine. Cannot get same code on same device to turn on SSD1306 in 9.1. Any thoughts about where to look on why this might be broke ? I'm just out of ideas. Note that i2c is working as VS53L0x distance sensor is working as is a PCF8574 port and both those work in 8.3.1.2 and 9.1. Stock bin in 8.3.1.2 tasmota-display works for buzzer and display. Stock bin 9.1 tasmota-display does not work for either buzzer or display. Stock bin 9.1 tasmota does not work for buzzer (and display commands obviously disabled).

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`:

Rules output here:

- [ x] Provide the output of this command: `Status 0`:

STATUS 0 output here: 03:55:06 CMD: status 0 03:55:06 RSL: stat/tasmota_7A19E1/STATUS = {"Status":{"Module":18,"DeviceName":"Tasmota","FriendlyName":["Tasmota","Tasmota2","Tasmota3","Tasmota4","","",""],"Topic":"tasmota_7A19E1","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}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin.gz","RestartReason":"Software/System restart","Uptime":"0T00:01:08","StartupUTC":"2020-11-19T02:53:58","Sleep":50,"CfgHolder":4617,"BootCount":4,"BCResetTime":"2020-11-19T03:52:12","SaveCount":12,"SaveAddress":"F8000"}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS2 = {"StatusFWR":{"Version":"9.1.0.1(tasmota)","BuildDateTime":"2020-11-18T14:06:00","Boot":31,"Core":"2_7_4_7","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"352/699"}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Zombodor357",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000005A00000000000000","80000000","00006000","00000000"]}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS4 = {"StatusMEM":{"ProgramSize":568,"Free":432,"Heap":25,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"16400B","FlashFrequency":40,"FlashMode":3,"Features":["00000809","8FF02797","04108121","00000007","041000C0","40000A01","00000000","00000000"],"Drivers":"1,2,3,4,7,8,9,10,12,13,16,20,21,24,28,29","Sensors":"1,2,3,40,45"}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS5 = {"StatusNET":{"Hostname":"tasmota_7A19E1-6625","IPAddress":"192.168.0.113","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.0.1","Mac":"50:02:91:7A:19:E1","Webserver":2,"WifiConfig":4,"WifiPower":17.0}} 03:55:06 RSL: stat/tasmota7A19E1/STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_7A19E1","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS7 = {"StatusTIM":{"UTC":"2020-11-19T02:55:06","Local":"2020-11-19T03:55:06","StartDST":"2020-03-29T02:00:00","EndDST":"2020-10-25T03:00:00","Timezone":"+01:00","Sunrise":"08:06","Sunset":"17:04"}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS10 = {"StatusSNS":{"Time":"2020-11-19T03:55:06","VL53L0X":{"Distance":9999}}} 03:55:06 RSL: stat/tasmota_7A19E1/STATUS11 = {"StatusSTS":{"Time":"2020-11-19T03:55:06","Uptime":"0T00:01:08","UptimeSec":68,"Heap":25,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":0,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","POWER5":"OFF","POWER6":"OFF","POWER7":"OFF","Wifi":{"AP":1,"SSId":"Zombodor357","BSSId":"F4:F2:6D:BD:D8:09","Channel":11,"RSSI":94,"Signal":-53,"LinkCount":1,"Downtime":"0T00:00:03"}}}

- [ x] 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: 03:54:21 RSL: stat/tasmota_7A19E1/RESULT = {"Buzzer":"Done"} 03:54:33 CMD: DisplayMode 2 03:54:33 RSL: stat/tasmota_7A19E1/RESULT = {"DisplayMode":2} 03:54:41 CMD: DisplayText [O]Me 03:54:41 RSL: stat/tasmota_7A19E1/RESULT = {"DisplayText":"[O]Me"} 03:55:06 CMD: status 0



### TO REPRODUCE
_Steps to reproduce the behavior:_
Try to either sound the buzzer or display text, it doesn't work

### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._
Should sound buzzer and should show text on OLED.  It doesn't

### 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)**
pookycade commented 4 years ago

Hmm, I am gonna close this topic so we don't waste anyone's time. I rechecked and with the stock build of 8.3.1 and 9.1.0 the Buzzer and the OLED are broke. And yet on my custom build they work on 8.3.1 even though I didn't touch any code to do with the Buzzer. I did modify the library with the OLED since it can be funky on the ESP modules. But I copied those changes over the my 9.1.0 build and they don't provide the same functionality. This indicates there is some glitch in the design, my code, or something that is causing this lack of functionality except with a custom build that somehow in one build enables it to all work but in most doesn't. Lots of hours staring at code ahead

OK for posterity, lets update this some since my own search helped in diagnosing the problem.

1) 8.3.1 and 9.1.0 both work fine, it was my oddball self compile that behaved differently 2) In order to have the SSD1306 you have to actually toggle it on. I thought this can always be done with DisplayText [O]. Apparently it cannot and when first loading the BIN there is a single toggle button - that toggle button is to turn on the display. In order for this all to work correctly you need DisplayMode 0 DisplayModel 2 DisplayDimmer 1 then DisplayText [O] 3) The Buzzer only works for active buzzers as initially configured. For some odd reason my home brew put a PWM wave thru the Buzzer with a Buzzer command and it worked. Stock firmware did not work. Hmm. So anyway, I have a passive buzzer and by default if you want it to work then you have to set SetOption111 1 which will allow your passive buzzer to work like an active buzzer. Problem solved.