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

BMP / BME wrong readings after DeepSleep #14557

Closed ludwich66 closed 2 years ago

ludwich66 commented 2 years ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. I get incorrect temperature values from a BME 280 (on ESP32 // Tasmota 10.1.0 by Theo Arends), a BMP280 or (on ESP 8285 // Own Firmware Tasmota 2022.01.3 by Theo Arends). a combination breakout with AHT20 and BMP280 (on ESP 8285 // Own Firmware Tasmota 2022.01.3 by Theo Arends). All BMP provide a "wrong" value that does not change, the AHT20 sensor provides correct values. BMP280 and AHT20 Board are on the same bus. If DeepSleep is set to "DeepSleepTime 0" via MQTT, all BMP(and AHT20) have correct values.

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:

--ESP32 with BME280----- 19:29:51.016 CMD: status 0 19:29:51.030 MQT: stat/tasmota_F8F02C/STATUS = {"Status":{"Module":1,"DeviceName":"DIY_ESP32_Hasenhöhle","FriendlyName":["Tasmota"],"Topic":"tasmota_F8F02C","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}} 19:29:51.044 MQT: stat/tasmota_F8F02C/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release/tasmota32-DE.bin","RestartReason":"Deep Sleep reset digital core","Uptime":"0T00:16:48","StartupUTC":"2022-01-21T18:13:03","Sleep":50,"CfgHolder":4617,"BootCount":23,"BCResetTime":"2021-11-05T17:42:37","SaveCount":108}} 19:29:51.056 MQT: stat/tasmota_F8F02C/STATUS2 = {"StatusFWR":{"Version":"10.1.0(tasmota)","BuildDateTime":"2021.12.08 14:52:56","Core":"2_0_1_1","SDK":"v4.4-dev-3728-g7cac8278e","CpuFrequency":80,"Hardware":"ESP32-D0WDQ6","CR":"419/699"}} 19:29:51.070 MQT: stat/tasmota_F8F02C/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["FritzBoxFonWLAN",""],"TelePeriod":15,"Resolution":"558180C0","SetOption":["00008009","2805C80001000600003C5A0A000000000000","00000080","00006000","00004000"]}} 19:29:51.094 MQT: stat/tasmota_F8F02C/STATUS4 = {"StatusMEM":{"ProgramSize":1316,"Free":1856,"Heap":152,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashFrequency":40,"FlashMode":3,"Features":["00000407","9FDAC787","00152001","B7F7BFCF","05DA9BC0","60360DC7","000840D2","20200000","0000482D"],"Drivers":"1,2,3,4,5,7,8,9,10,11,12,14,17,20,21,24,26,27,29,34,38,50,52,59","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,26,28,31,34,37,39,40,42,43,45,51,52,55,56,58,59,64,66,67,74,85,92,127"}} 19:29:51.108 MQT: stat/tasmota_F8F02C/STATUS5 = {"StatusNET":{"Hostname":"tasmota-F8F02C-4140","IPAddress":"192.168.178.131","Gateway":"192.168.178.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.178.1","DNSServer2":"0.0.0.0","Mac":"24:62:AB:F8:F0:2C","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}} 19:29:51.120 MQT: stat/tasmotaF8F02C/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.178.35","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_F8F02C","MqttUser":"DVES_USER","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}} 19:29:51.134 MQT: stat/tasmota_F8F02C/STATUS7 = {"StatusTIM":{"UTC":"2022-01-21T18:29:51","Local":"2022-01-21T19:29:51","StartDST":"2022-03-27T02:00:00","EndDST":"2022-10-30T03:00:00","Timezone":"+01:00","Sunrise":"08:33","Sunset":"17:29"}} 19:29:51.165 MQT: stat/tasmota_F8F02C/STATUS10 = {"StatusSNS":{"Time":"2022-01-21T19:29:51","BME280":{"Temperature":13.5,"Humidity":39.0,"DewPoint":-0.2,"Pressure":965.9},"ESP32":{"Temperature":45.0,"HallEffect":57},"PressureUnit":"hPa","TempUnit":"C"}} 19:29:51.185 MQT: stat/tasmota_F8F02C/STATUS11 = {"StatusSTS":{"Time":"2022-01-21T19:29:51","Uptime":"0T00:16:48","UptimeSec":1008,"Heap":151,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":48},"Wifi":{"AP":1,"SSId":"FritzBoxFonWLAN","BSSId":"CC:CE:1E:F4:D9:A6","Channel":6,"Mode":"11n","RSSI":66,"Signal":-67,"LinkCount":1,"Downtime":"0T00:00:06"}}}

- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
19:34:30.451 MQT: stat/tasmota_F8F02C/RESULT = {"WebLog":4}
19:34:30.462 SRC: Backlog
19:34:30.465 CMD: Grp 0, Cmnd 'MQTTLOG', Idx 1, Len 1, Data '0'
19:34:30.474 MQT: stat/tasmota_F8F02C/RESULT = {"MqttLog":0}
19:34:30.486 SRC: Backlog
19:34:30.489 CMD: Grp 0, Cmnd 'SYSLOG', Idx 1, Len 1, Data '0'
19:34:30.497 MQT: stat/tasmota_F8F02C/RESULT = {"SysLog":{"0":{"Active":"0"}}}
19:34:30.507 SRC: Backlog
19:34:30.510 CMD: Grp 0, Cmnd 'LOGHOST', Idx 1, Len 1, Data '1'
19:34:30.514 CFG: CR 419/699, Busy 0
19:34:30.524 MQT: stat/tasmota_F8F02C/RESULT = {"LogHost":""}
19:34:30.532 SRC: Backlog
19:34:30.534 CMD: Grp 0, Cmnd 'LOGPORT', Idx 1, Len 3, Data '514'
19:34:30.543 MQT: stat/tasmota_F8F02C/RESULT = {"LogPort":514}
19:34:30.556 SRC: Backlog
19:34:30.559 CMD: Grp 0, Cmnd 'TELEPERIOD', Idx 1, Len 2, Data '15'
19:34:30.571 MQT: stat/tasmota_F8F02C/RESULT = {"TelePeriod":15}
19:34:30.663 BRY: GC from 4742 to 3710 bytes, objects freed 2/48 (in 1 ms)
19:34:30.678 MQT: tele/tasmota_F8F02C/STATE = {"Time":"2022-01-21T19:34:30","Uptime":"0T00:21:27","UptimeSec":1287,"Heap":158,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":38,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":48},"Wifi":{"AP":1,"SSId":"FritzBoxFonWLAN","BSSId":"CC:CE:1E:F4:D9:A6","Channel":6,"Mode":"11n","RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:06"}}
19:34:30.743 MQT: tele/tasmota_F8F02C/SENSOR = {"Time":"2022-01-21T19:34:30","BME280":{"Temperature":13.5,"Humidity":39.0,"DewPoint":-0.2,"Pressure":965.9},"ESP32":{"Temperature":45.6,"HallEffect":56},"PressureUnit":"hPa","TempUnit":"C"}
19:34:31.384 CFG: Saved, Anzahl 109, Bytes 4096
19:34:32.243 WIF: Prüfe Verbindung...
19:34:34.046 HTP: Hauptmenü
19:34:35.487 HTP: Konsolen
19:34:37.638 HTP: Konsole
19:34:45.702 BRY: GC from 4500 to 3710 bytes, objects freed 2/48 (in 2 ms)
19:34:45.719 MQT: tele/tasmota_F8F02C/STATE = {"Time":"2022-01-21T19:34:45","Uptime":"0T00:21:42","UptimeSec":1302,"Heap":157,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":48},"Wifi":{"AP":1,"SSId":"FritzBoxFonWLAN","BSSId":"CC:CE:1E:F4:D9:A6","Channel":6,"Mode":"11n","RSSI":68,"Signal":-66,"LinkCount":1,"Downtime":"0T00:00:06"}}
19:34:45.782 MQT: tele/tasmota_F8F02C/SENSOR = {"Time":"2022-01-21T19:34:45","BME280":{"Temperature":13.5,"Humidity":38.9,"DewPoint":-0.3,"Pressure":965.9},"ESP32":{"Temperature":44.4,"HallEffect":57},"PressureUnit":"hPa","TempUnit":"C"}
19:34:52.248 WIF: Prüfe Verbindung...
19:35:00.745 BRY: GC from 4365 to 3710 bytes, objects freed 2/48 (in 1 ms)
19:35:00.759 MQT: tele/tasmota_F8F02C/STATE = {"Time":"2022-01-21T19:35:00","Uptime":"0T00:21:57","UptimeSec":1317,"Heap":157,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":48},"Wifi":{"AP":1,"SSId":"FritzBoxFonWLAN","BSSId":"CC:CE:1E:F4:D9:A6","Channel":6,"Mode":"11n","RSSI":66,"Signal":-67,"LinkCount":1,"Downtime":"0T00:00:06"}}
19:35:00.823 MQT: tele/tasmota_F8F02C/SENSOR = {"Time":"2022-01-21T19:35:00","BME280":{"Temperature":13.5,"Humidity":38.8,"DewPoint":-0.3,"Pressure":965.9},"ESP32":{"Temperature":44.4,"HallEffect":57},"PressureUnit":"hPa","TempUnit":"C"}
19:35:12.262 WIF: Prüfe Verbindung...
19:35:15.679 BRY: GC from 4365 to 3710 bytes, objects freed 2/48 (in 1 ms)
19:35:15.695 MQT: tele/tasmota_F8F02C/STATE = {"Time":"2022-01-21T19:35:15","Uptime":"0T00:22:12","UptimeSec":1332,"Heap":159,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":3,"Objects":48},"Wifi":{"AP":1,"SSId":"FritzBoxFonWLAN","BSSId":"CC:CE:1E:F4:D9:A6","Channel":6,"Mode":"11n","RSSI":68,"Signal":-66,"LinkCount":1,"Downtime":"0T00:00:06"}}
19:35:15.756 MQT: tele/tasmota_F8F02C/SENSOR = {"Time":"2022-01-21T19:35:15","BME280":{"Temperature":13.5,"Humidity":38.9,"DewPoint":-0.3,"Pressure":966.0},"ESP32":{"Temperature":44.4,"HallEffect":56},"PressureUnit":"hPa","TempUnit":"C"}
19:35:24.764 SRC: MQTT
19:35:24.767 CMD: Grp 0, Cmnd 'DEEPSLEEPTIME', Idx 1, Len 3, Data '120'
19:35:24.778 MQT: stat/tasmota_F8F02C/RESULT = {"DeepSleepTime":120}
19:35:25.420 CFG: Saved, Anzahl 110, Bytes 4096
19:35:25.822 DSL: Reset wrong settings wakeup: 0, slip 10000
19:35:25.837 MQT: stat/tasmota_F8F02C/RESULT = {"DeepSleep":{"Time":"2022-01-21T19:36:00","Epoch":1642790160}}
--
kombi
19:38:08.851 MQT: stat/tasmota_CF1C9E/RESULT = {"WebLog":4}
19:38:08.856 SRC: Backlog
19:38:08.858 CMD: Grp 0, Cmnd 'MQTTLOG', Idx 1, Len 1, Data '0'
19:38:08.864 MQT: stat/tasmota_CF1C9E/RESULT = {"MqttLog":0}
19:38:08.869 SRC: Backlog
19:38:08.871 CMD: Grp 0, Cmnd 'SYSLOG', Idx 1, Len 1, Data '0'
19:38:08.876 MQT: stat/tasmota_CF1C9E/RESULT = {"SysLog":{"0":{"Active":"0"}}}
19:38:08.881 SRC: Backlog
19:38:08.884 CMD: Grp 0, Cmnd 'LOGHOST', Idx 1, Len 1, Data '1'
19:38:08.886 CFG: CR 373/699, Busy 0
19:38:08.891 MQT: stat/tasmota_CF1C9E/RESULT = {"LogHost":""}
19:38:08.896 SRC: Backlog
19:38:08.898 CMD: Grp 0, Cmnd 'LOGPORT', Idx 1, Len 3, Data '514'
19:38:08.904 MQT: stat/tasmota_CF1C9E/RESULT = {"LogPort":514}
19:38:08.909 SRC: Backlog
19:38:08.911 CMD: Grp 0, Cmnd 'TELEPERIOD', Idx 1, Len 3, Data '240'
19:38:08.916 MQT: stat/tasmota_CF1C9E/RESULT = {"TelePeriod":240}
19:38:09.321 CFG: in Flash gespeichert an F7, Anzahl 37, Bytes 4096
19:38:09.382 MQT: tele/tasmota_CF1C9E/STATE = {"Time":"2022-01-21T19:38:09","Uptime":"0T01:56:21","UptimeSec":6981,"Heap":16,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":24,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"FritzBoxFonWLAN","BSSId":"CC:CE:1E:F4:D9:A6","Channel":6,"Mode":"11n","RSSI":88,"Signal":-56,"LinkCount":1,"Downtime":"0T00:00:03"}}
19:38:09.414 MQT: tele/tasmota_CF1C9E/SENSOR = {"Time":"2022-01-21T19:38:09","BMP280":{"Temperature":0.8,"Pressure":966.9},"AHT2X":{"Temperature":-0.6,"Humidity":71.5,"DewPoint":-5.2},"PressureUnit":"hPa","TempUnit":"C"}
19:38:12.236 HTP: Hauptmenü
19:38:12.548 WIF: Prüfe Verbindung...
19:38:13.807 HTP: Konsole
19:38:32.531 WIF: Prüfe Verbindung...
19:38:50.405 WIF: Sending Gratuitous ARP
19:38:52.506 WIF: Prüfe Verbindung...
19:38:57.168 SRC: MQTT
19:38:57.171 CMD: Grp 0, Cmnd 'DEEPSLEEPTIME', Idx 1, Len 3, Data '120'
19:38:57.177 MQT: stat/tasmota_CF1C9E/RESULT = {"DeepSleepTime":120}
19:38:57.329 CFG: in Flash gespeichert an F6, Anzahl 38, Bytes 4096
19:38:57.390 DSL: Reset wrong settings wakeup: 0, slip 10000
19:38:57.396 MQT: stat/tasmota_CF1C9E/RESULT = {"DeepSleep":{"Time":"2022-01-21T19:40:00","Epoch":1642790400}}

TO REPRODUCE

Steps to reproduce the behavior: Change Settings for DeepSleepTime

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. Correct output of the values of BMPx sensors after a deep sleep phase

SCREENSHOTS

If applicable, add screenshots to help explain your problem. Picture of the reading with node red Combiboard BMP280/AHT20

Pasted Graphic 18

--> the hub is in deepsleep during the time

ADDITIONAL CONTEXT

Add any other context about the problem here.

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

barbudor commented 2 years ago

I have an outdoor, solar + liion powered esp8266 with BME 280. All values provided are correct. Never seen this.

You get the same behavior from all 3 ESPs?

ascillato2 commented 2 years ago

Just for reference:

9300, https://github.com/arendst/Tasmota/issues/13236, https://github.com/arendst/Tasmota/commit/26e041ab6efe14da3d918154e9d4d0d87f352198

barbudor commented 2 years ago

I confirm that I have no problems with BME280 + HDC1080 and DeepSleep I setup an ESP8266 with a Teleperiod of 330 (5 Min and 30 sec) and a DeepSleepTime of 600 (10 minutes). I also added a rule on time#minute do status 10 endon With this configuration, the ESP wakes up for 5 minutes, publish sensor once after boot, once every minute and once at Teleperiod just befoire going to sleep. It wakes up every 10 minutes.

image