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

ESP32 BME280 issues (not updateing and bad data) #9477

Closed baerrs closed 3 years ago

baerrs commented 3 years ago

PROBLEM DESCRIPTION

Hi All !, I'm having issues with a BME280 running on the dev downloaded on 10/5. I'm using Tasmota32-sensor dev build from 10/5. I've set the GIOP4&5 to I2C SDA/L. It appears the data never gets re-read (the data that comes back is not correct). I even place the device in the frig for an hour... still reported the same (bad)data. I have two BME sensor(only one connected at a time), and confirmed both chips on a PI-zero are working and get good results... I used Pi-Zero and BME280pi to test the chips. I'm using an ESP32 Wroom32E

Program Version: 9.0.0.1(sensors) Build &Time/Date: 2020-10-05T17:07:37 Core/SDK Version: 1_0_4/v3.2.3-14-gd3e562907

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

07:50:03 CMD: Backlog Rule1; Rule2; Rule3 07:50:03 SRC: WebConsole from 192.168.1.141 07:50:03 CMD: Group 0, Index 1, Command "BACKLOG", Data "Rule1; Rule2; Rule3" 07:50:03 SRC: Backlog 07:50:03 CMD: Group 0, Index 1, Command "RULE", Data "" 07:50:03 MQT: stat/tasmota_CF14A8/RESULT = {"Rule1":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""} 07:50:04 SRC: Backlog 07:50:04 CMD: Group 0, Index 2, Command "RULE", Data "" 07:50:04 MQT: stat/tasmota_CF14A8/RESULT = {"Rule2":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""} 07:50:04 SRC: Backlog 07:50:04 CMD: Group 0, Index 3, Command "RULE", Data "" 07:50:04 MQT: stat/tasmota_CF14A8/RESULT = {"Rule3":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}

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

STATUS 0 output here: 07:46:57 CMD: Status 0 07:46:57 SRC: WebConsole from 192.168.1.141 07:46:57 CMD: Group 0, Index 1, Command "STATUS", Data "0" 07:46:57 MQT: stat/tasmota_CF14A8/STATUS = {"Status":{"Module":1,"DeviceName":"Tasmota","FriendlyName":["Tasmota"],"Topic":"tasmota_CF14A8","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}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin","RestartReason":"Software reset CPU","Uptime":"0T01:11:17","StartupUTC":"2020-10-06T05:35:40","Sleep":50,"CfgHolder":4617,"BootCount":45,"BCResetTime":"2020-10-05T21:41:13","SaveCount":64}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS2 = {"StatusFWR":{"Version":"9.0.0.1(sensors)","BuildDateTime":"2020-10-05T17:07:37","Core":"1_0_4","SDK":"v3.2.3-14-gd3e562907","CpuFrequency":80,"Hardware":"ESP32","CR":"358/699"}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":4,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["SmartOne2",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["000A8009","2805C8000100060000005A00000000000000","00000200","00006000","00000000"]}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS4 = {"StatusMEM":{"ProgramSize":1110,"Free":1984,"Heap":111,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashFrequency":40,"FlashMode":3,"Features":["00000809","8FDA8787","00152005","B7FFBFCF","01DA9BC4","60360CC7","00084052","00000000"],"Drivers":"1,2,3,4,5,7,8,9,10,12,14,17,20,21,24,29,34","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,31,34,37,39,40,42,43,51,52,55,56,58,59,64,66,67,74"}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS5 = {"StatusNET":{"Hostname":"tasmota_CF14A8-5288","IPAddress":"192.168.1.144","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer":"8.8.8.8","Mac":"24:62:AB:CF:14:A8","Webserver":2,"WifiConfig":4,"WifiPower":17.0}} 07:46:57 MQT: stat/tasmotaCF14A8/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.149","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_CF14A8","MqttUser":"DVES_USER","MqttCount":10,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS7 = {"StatusTIM":{"UTC":"2020-10-06T06:46:57","Local":"2020-10-06T07:46:57","StartDST":"2020-03-29T02:00:00","EndDST":"2020-10-25T03:00:00","Timezone":"+01:00","Sunrise":"06:57","Sunset":"18:17"}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS10 = {"StatusSNS":{"Time":"2020-10-06T07:46:57","BME280":{"Temperature":21.5,"Humidity":93.0,"DewPoint":20.3,"Pressure":647.4},"PressureUnit":"hPa","TempUnit":"C"}} 07:46:57 MQT: stat/tasmota_CF14A8/STATUS11 = {"StatusSTS":{"Time":"2020-10-06T07:46:57","Uptime":"0T01:11:17","UptimeSec":4277,"Heap":111,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":10,"Wifi":{"AP":1,"SSId":"SmartOne2","BSSId":"14:91:82:30:50:8A","Channel":11,"RSSI":100,"Signal":-47,"LinkCount":1,"Downtime":"0T00:00:05"}}}

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



### TO REPRODUCE
_Steps to reproduce the behavior:_

### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._

### 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)**
arendst commented 3 years ago

Cannot reproduce.

My BMP280 works as expected:

12:33:40 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:33:40","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.6,"Humidity":39.9,"DewPoint":9.1},"BMP280":{"Temperature":24.6,"Pressure":996.8},"PressureUnit":"hPa","TempUnit":"C"}
12:34:07 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:34:07","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.6,"Humidity":39.8,"DewPoint":9.1},"BMP280":{"Temperature":24.7,"Pressure":996.8},"PressureUnit":"hPa","TempUnit":"C"}
12:34:27 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:34:27","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.7,"Humidity":40.1,"DewPoint":9.3},"BMP280":{"Temperature":24.7,"Pressure":996.8},"PressureUnit":"hPa","TempUnit":"C"}
12:34:47 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:34:47","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.7,"Humidity":47.1,"DewPoint":11.7},"BMP280":{"Temperature":24.8,"Pressure":996.8},"PressureUnit":"hPa","TempUnit":"C"}
12:35:07 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:35:07","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.8,"Humidity":41.7,"DewPoint":10.0},"BMP280":{"Temperature":24.8,"Pressure":996.8},"PressureUnit":"hPa","TempUnit":"C"}
12:35:27 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:35:27","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.7,"Humidity":40.9,"DewPoint":9.6},"BMP280":{"Temperature":25.8,"Pressure":996.8},"PressureUnit":"hPa","TempUnit":"C"}

same for BME680:

12:41:04 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:41:04","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.5},"AM2301":{"Temperature":23.7,"Humidity":40.5,"DewPoint":9.5},"BME680":{"Temperature":24.8,"Humidity":54.1,"DewPoint":14.9,"Pressure":996.9,"Gas":20.32},"PressureUnit":"hPa","TempUnit":"C"}
12:41:44 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:41:44","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.6,"Humidity":40.8,"DewPoint":9.5},"BME680":{"Temperature":25.0,"Humidity":52.3,"DewPoint":14.6,"Pressure":996.8,"Gas":44.45},"PressureUnit":"hPa","TempUnit":"C"}
12:42:04 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:42:04","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.7,"Humidity":40.5,"DewPoint":9.5},"BME680":{"Temperature":25.0,"Humidity":52.0,"DewPoint":14.5,"Pressure":996.8,"Gas":57.51},"PressureUnit":"hPa","TempUnit":"C"}
12:42:24 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:42:24","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.6,"Humidity":40.2,"DewPoint":9.3},"BME680":{"Temperature":25.1,"Humidity":51.7,"DewPoint":14.5,"Pressure":996.8,"Gas":70.89},"PressureUnit":"hPa","TempUnit":"C"}
12:42:44 MQT: tele/esp32c/SENSOR = {"Time":"2020-10-06T12:42:44","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.6,"Humidity":40.2,"DewPoint":9.3},"BME680":{"Temperature":25.1,"Humidity":51.7,"DewPoint":14.4,"Pressure":996.9,"Gas":84.53},"PressureUnit":"hPa","TempUnit":"C"}

I have no BME280.

on v9.0.0.1:

12:37:24 CMD: Group 0, Index 1, Command "STATUS", Data "0"
12:37:24 MQT: stat/esp32c/STATUS = {"Status":{"Module":1,"DeviceName":"Esp32C","FriendlyName":["Esp32C"],"Topic":"esp32c","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}}
12:37:24 MQT: stat/esp32c/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/tasmota32-sensors.bin","RestartReason":"Software reset CPU","Uptime":"0T00:03:57","StartupUTC":"2020-10-06T10:33:27","Sleep":50,"CfgHolder":4617,"BootCount":66,"BCResetTime":"2020-04-16T14:39:15","SaveCount":128}}
12:37:24 MQT: stat/esp32c/STATUS2 = {"StatusFWR":{"Version":"9.0.0.1(sensors)","BuildDateTime":"2020-10-06T08:30:15","Core":"1_0_4","SDK":"v3.2.3-14-gd3e562907","CpuFrequency":80,"Hardware":"ESP32","CR":"358/699"}}
12:37:24 MQT: stat/esp32c/STATUS3 = {"StatusLOG":{"SerialLog":3,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"domus1","LogPort":514,"SSId":["indebuurt","indebuurt_IoT"],"TelePeriod":20,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000005A00000000000000","000000C0","00006000","00000000"]}}
12:37:24 MQT: stat/esp32c/STATUS4 = {"StatusMEM":{"ProgramSize":1110,"Free":1984,"Heap":111,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashFrequency":40,"FlashMode":3,"Features":["00000809","8FDA8787","00152005","B7FFBFCF","01DA9BC4","60360CC7","00084052","00000000"],"Drivers":"1,2,3,4,5,7,8,9,10,12,14,17,20,21,24,29,34","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,31,34,37,39,40,42,43,51,52,55,56,58,59,64,66,67,74"}}
12:37:24 MQT: stat/esp32c/STATUS5 = {"StatusNET":{"Hostname":"esp32c","IPAddress":"192.168.2.145","Gateway":"192.168.2.254","Subnetmask":"255.255.255.0","DNSServer":"192.168.2.27","Mac":"84:0D:8E:36:07:5C","Webserver":2,"WifiConfig":5,"WifiPower":17.0}}
12:37:24 MQT: stat/esp32c/STATUS6 = {"StatusMQT":{"MqttHost":"domus1","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_36075C","MqttUser":"DVES_USER","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30}}
12:37:24 MQT: stat/esp32c/STATUS7 = {"StatusTIM":{"UTC":"2020-10-06T10:37:24","Local":"2020-10-06T12:37:24","StartDST":"2020-03-29T02:00:00","EndDST":"2020-10-25T03:00:00","Timezone":99,"Sunrise":"07:43","Sunset":"18:55"}}
12:37:24 MQT: stat/esp32c/STATUS10 = {"StatusSNS":{"Time":"2020-10-06T12:37:24","DS18B20":{"Id":"01144A0CB2AA","Temperature":22.6},"AM2301":{"Temperature":23.7,"Humidity":40.2,"DewPoint":9.3},"BMP280":{"Temperature":24.9,"Pressure":996.7},"PressureUnit":"hPa","TempUnit":"C"}}
12:37:24 MQT: stat/esp32c/STATUS11 = {"StatusSTS":{"Time":"2020-10-06T12:37:24","Uptime":"0T00:03:57","UptimeSec":237,"Heap":111,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":2,"SSId":"indebuurt_IoT","BSSId":"18:E8:29:CA:17:C1","Channel":11,"RSSI":100,"Signal":-40,"LinkCount":1,"Downtime":"0T00:00:07"}}}
sfromis commented 3 years ago

I'm having no problems with BME280 on Tasmota32 9.0.0.1. While using gipo4/5 is the "standard" pins on ESP8266, I'd avoid that on ESP32, as the "usual" suggestion is SDA on gpio21 and SCL on gpio22, as seen here. That page also has a note about gpio5 outputting a PWM signal at boot, I speculate that this might confuse the sensor. I'd suggest trying again with gpio21/22 and see if you get better results.

arendst commented 3 years ago

Those were my original GPIOs too.

baerrs commented 3 years ago

I tried gpio21&22 with the same results. I'm going to verify my hardware set up, I'll keep this post updated.

ascillato2 commented 3 years ago

Hi, any news on this?

baerrs commented 3 years ago

I still have the issue, and am still looking. I'm ramping up on i2c, and c... I have since replaced the bme280 again, so this is my 3rd one, all with the same results. What I've read and am currently looking at isthe humidity has to be set before the temp & pressure, and then give it a min of 4ms delay before reading.. other wise you may get the old results (which is one of my two problems.

czikus commented 3 years ago

I can confirm that I'm seeing the exact same issue with my BME280 and ESP32.

czikus commented 3 years ago

Can we reopen this issue?

Solution-Builders-Alex commented 3 years ago

I have same issue

00:05:28 MQT: tele/sens1/SENSOR = {"Time":"1970-01-01T00:05:28","BME280":{"Temperature":22.4,"Humidity":42.6,"DewPoint":9.0,"Pressure":656.6},"PressureUnit":"hPa","TempUnit":"C"}

robmool commented 3 years ago

I have the same issue with my BME280. I have tried with two BME280's and both have the same issue. The problem occurs randomly after some hours or days.

Additional information: Device used: ESP8266-01 Pre-compiled version: 9.4.0 sensors Flash tools used: NodeMCU PyFlasher 4.0

17:57:28.076 CMD: Backlog Template; Module; GPIO 255 17:57:28.111 MQT: myhome/stat/tasmota_238875/RESULT = {"NAME":"BME280","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18} 17:57:28.325 MQT: myhome/stat/tasmota_238875/RESULT = {"Module":{"0":"BME280"}} 17:57:28.579 MQT: myhome/stat/tasmota_238875/RESULT = {"GPIO0":{"0":"None"},"GPIO1":{"608":"I2C SCL"},"GPIO2":{"0":"None"},"GPIO3":{"640":"I2C SDA"},"GPIO4":{"0":"None"},"GPIO5":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"0":"None"},"GPIO14":{"0":"None"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"},"GPIO17":{"0":"None"}}

Sensor readings: {"Time":"2021-06-26T04:07:35","BME280":{"Temperature":23.8,"Humidity":40.5,"DewPoint":9.5,"Pressure":945.7,"SeaPressure":1018.1},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:12:35","BME280":{"Temperature":23.8,"Humidity":40.4,"DewPoint":9.5,"Pressure":945.8,"SeaPressure":1018.1},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:17:36","BME280":{"Temperature":23.8,"Humidity":40.3,"DewPoint":9.5,"Pressure":945.8,"SeaPressure":1018.2},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:22:35","BME280":{"Temperature":23.8,"Humidity":40.3,"DewPoint":9.5,"Pressure":945.9,"SeaPressure":1018.2},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:27:35","BME280":{"Temperature":23.8,"Humidity":40.4,"DewPoint":9.5,"Pressure":945.9,"SeaPressure":1018.3},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:32:35","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:37:36","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:42:36","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:47:36","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:52:36","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-06-26T04:57:35","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"}

Could someone re-open this issue?

Kind regards, Rob

ascillato commented 3 years ago

@robmool

Hi, sorry but the GPIOs you are using are not recommended for I2C due to they are TX and RX and at boot time the ESP8266 sends a lot of information (hardware limitation) and that can confuse your sensor.

Use other GPIOs as recommend in the Tasmota's documentation.

Thanks.

robmool commented 3 years ago

So basically you're saying that I cannot use the ESP8266-01 chip. The available GPIO pins on this chip are: GPIO0, GPIO1, GPIO2, GPIO3.

Any other suggestions?

Best regards, Rob

ascillato commented 3 years ago

GPIO3 is RX and GPIO2 is normal I/O. Try those.

robmool commented 3 years ago

Thank you for your fast response! I will change the hardware setup and I keep you posted with new info.

robmool commented 3 years ago

Changed the GPIO ports as indicated above. After running the ESP8266-01 for 9 days I got wrong readings again: {"Time":"2021-07-08T18:41:29","BME280":{"Temperature":25.0,"Humidity":36.3,"DewPoint":9.0,"Pressure":949.9,"SeaPressure":1022.6},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-07-08T18:46:29","BME280":{"Temperature":25.0,"Humidity":36.5,"DewPoint":9.1,"Pressure":949.9,"SeaPressure":1022.7},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-07-08T18:51:29","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"} {"Time":"2021-07-08T18:56:29","BME280":{"Temperature":21.1,"Humidity":79.8,"DewPoint":17.5,"Pressure":661.9,"SeaPressure":706.0},"PressureUnit":"hPa","TempUnit":"C"}

I might think that this is a SW issue. Any suggestions?

By the way I am also a SW engineer and could help debugging this issue if necessary.

ascillato commented 3 years ago

I couldn't make my device to fail. Have you tried another sensor?

robmool commented 3 years ago

I already tried with 2 different devices. Both have the same problem. I will try with a 3th device.

As a temporary solution I send the command "restart 1" to the device, this will give me the correct readings.

ascillato commented 3 years ago

How are you powering your device?

sfromis commented 3 years ago

To me, the patterns I see with similar failures looks like a hardware issue, not a software fault. Possibly related to power fluctuations, adding a suitable decoupling capacitor might be helpful. Maybe the driver could be amended to better handle this type of frozen bad values, that would depend on the details.

robmool commented 3 years ago

The powering is as follows: 220 VAC - DC 5V adapter - 3.3V regulator - ESP8266-01 + BME280.

robmool commented 3 years ago

By the way, my BME280 device has an on-board 3.3V LDO regulator. I am using this device: https://www.amazon.es/gp/product/B07FS95JXT/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&psc=1

ascillato commented 3 years ago

The powering is as follows: 220 VAC - DC 5V adapter - 3.3V regulator - ESP8266-01 + BME280.

How much current they can provide? Or what is the power rating in W of your power sources? Voltage specification is not enough to determine if the power source is suitable. For example, a 3.3V power source of less than 1W or a bigger but without ripple filtered output won't be enough for your ESP8266+SENSORS.

They are very sensitive to ripple or power drops.

robmool commented 3 years ago

My DC 5V adapter can provide 2A (10W).

sfromis commented 3 years ago

It is not important what the 5V adapter can provide, as long as it is not too low. What counts is what the LDO supplying the ESP8266 can deliver. And it also counts if your 5V adapter provides "clean" power, which is certainly not a given for "chargers".

robmool commented 3 years ago

I am using a 7333-A LDO which can deliver a maximum output current of 250mA.

ascillato commented 3 years ago

I am using a 7333-A LDO which can deliver a maximum output current of 250mA

That is good, but from the ESP8266 datasheet, it consumes 50mA and can reach peaks to close to 500mA while transmitting. So, your LDO have a capacitor at the output to provide this extra energy peaks when needed? If not, maybe your issue is just a dropout of power in some scenarios that make your device to fail (we saw this scenario with some sonoff Basics that have a bad design in its power regulator and it is all the time in the border between operational and failure). This is just one possibility. We have to be sure that the hardware is working ok due to we can't reproduce this issue. I'm not saying that it is bug free, I think that we must be sure it is not hardware related to find the exact condition that makes it fail.

robmool commented 3 years ago

I have a 2.2uF ceramic capacitor at the LDO output.

robmool commented 3 years ago

I just replaced the 2.2uF ceramic capacitor with two 10uF electrolytic capacitors on the LDO input/output according to the LDO datasheet.

jos149 commented 3 years ago

I have a Wemos d1 mini with a BME280 attached. I get very low air pressure values and very high humidity values compared to what you would expect. Next to that I get a a lot of irrelevant output values. Anyone who knows how to solve these issues?

tele/tasmota_78D7B0/SENSOR = {"Time":"2021-07-22T17:25:17","BME280":{"Temperature":20.7,"Humidity":83.9,"DewPoint":17.8,"Pressure":687.6},"INA219":{"Id":40,"Voltage":0,"Current":0.000,"Power":0},"MGS":{"NH3":-1.00,"CO":-1.00,"NO2":-1.00,"C3H8":-1.00,"C4H10":-1.00,"CH4":-1.00,"H2":-1.00,"C2H5OH":-1.00},"PressureUnit":"hPa","TempUnit":"C"}

These are the output values I get, for which I would only expect Temperature, Humidity, and pressure.

Is it maybe due to connecting to the wrong ports on the wemos?

sfromis commented 3 years ago

Assuming that you do not have INA219 or a Multi Gas Sensor, which have quite different I2C addresses, those popping up looks like some sort of hardware issue. Could be defects, bad wiring/connections or maybe power quality issues. Not all gpios are quite the same, but I'd expect an inappropriate selection to fail fast.

robmool commented 3 years ago

Since I replaced the capacitors on the LDO (see post July 11) I haven't seen any bad reading.

Koddra commented 1 year ago

I have fixed this issue of data not being updated by changing the FORCED sampling mode to NORMAL. Hope that this helps.