trvrnrth / esphome-bsec-bme680

ESPHome component for the Bosch BME680 sensor via BSEC providing temperature, humidity, pressure and indoor air quality measurements.
85 stars 17 forks source link

node "ocassionally" crashing on writing registers #29

Closed gretel closed 3 years ago

gretel commented 3 years ago

howdy @trvrnrth!

most importantly and first of all: the bluedot bme680 sensor in use might be faulty. it was running in very humid conditions for a week ("behind" a goretex membrane though) and suddenly started to show 1000 VOC (whis seems to be the upper limit of the scale) and according IAQ values.

eventually i took it out of the moist, dried it (in infrared radiation), rinsed using isopropanol and let sit for a while in dry conditions. finally, used another esp32 to check on it. to my surprise, it came back with a IAQ 25 and did stabilize - showing plausible results again.

but now having the same declarations as before esphome is crashing around every 5-15th loop.

therefore, i am not sure if this is actually an issue in this context.. here are some logs:

[21:30:34][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:34][VV][i2c:093]:     Writing 0b01011010 (0x5A)
[21:30:34][VV][i2c:093]:     Writing 0b01101101 (0x6D)
[21:30:34][VV][i2c:093]:     Writing 0b01100100 (0x64)
[21:30:34][VV][i2c:093]:     Writing 0b01110001 (0x71)
[21:30:34][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:30:34][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:34][VV][i2c:093]:     Writing 0b01110100 (0x74)
[21:30:34][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:30:34][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:30:34][VV][i2c:113]:     Received 0b01010100 (0x54)
[21:30:34][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:34][VV][i2c:093]:     Writing 0b01110101 (0x75)
[21:30:34][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:30:34][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:30:34][VV][i2c:113]:     Received 0b00000000 (0x00)
[21:30:34][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:34][VV][i2c:093]:     Writing 0b01110100 (0x74)
[21:30:34][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:30:34][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:30:35][VV][i2c:113]:     Received 0b01010100 (0x54)
[21:30:35][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:35][VV][i2c:093]:     Writing 0b01110010 (0x72)
[21:30:35][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:30:35][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:30:35][VV][i2c:113]:     Received 0b00000001 (0x01)
[21:30:35][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:35][VV][i2c:093]:     Writing 0b01110001 (0x71)
[21:30:35][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:30:35][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:30:35][VV][i2c:113]:     Received 0b00010000 (0x10)
[21:30:35][VV][i2c:056]: Beginning Transmission to 0x77:
[21:30:35][VV][i2c:093]:     Writing 0b01110101 (0x75)
ERROR Error while reading incoming messages: Error while receiving data: [Errno 54] Connection reset by peer
WARNING Disconnected from API: Error while receiving data: [Errno 54] Connection reset by peer
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01011010 (0x5A)
[21:33:23][VV][i2c:093]:     Writing 0b01101101 (0x6D)
[21:33:23][VV][i2c:093]:     Writing 0b01100100 (0x64)
[21:33:23][VV][i2c:093]:     Writing 0b01110001 (0x71)
[21:33:23][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01110100 (0x74)
[21:33:23][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:33:23][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:33:23][VV][i2c:113]:     Received 0b01010100 (0x54)
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01110101 (0x75)
[21:33:23][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:33:23][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:33:23][VV][i2c:113]:     Received 0b00000000 (0x00)
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01110100 (0x74)
[21:33:23][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:33:23][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:33:23][VV][i2c:113]:     Received 0b01010100 (0x54)
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01110010 (0x72)
[21:33:23][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:33:23][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:33:23][VV][i2c:113]:     Received 0b00000001 (0x01)
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01110001 (0x71)
[21:33:23][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:33:23][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:33:23][VV][i2c:113]:     Received 0b00010000 (0x10)
[21:33:23][VV][i2c:056]: Beginning Transmission to 0x77:
[21:33:23][VV][i2c:093]:     Writing 0b01110101 (0x75)
[21:33:23][VV][i2c:093]:     Writing 0b00000000 (0x00)
ERROR Error while reading incoming messages: Error while receiving data: [Errno 54] Connection reset by peer
[21:31:58][VV][i2c:056]: Beginning Transmission to 0x77:
[21:31:58][VV][i2c:093]:     Writing 0b01011010 (0x5A)
[21:31:58][VV][i2c:093]:     Writing 0b01101101 (0x6D)
[21:31:58][VV][i2c:093]:     Writing 0b01100100 (0x64)
[21:31:58][VV][i2c:093]:     Writing 0b01110001 (0x71)
[21:31:58][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:31:58][VV][i2c:056]: Beginning Transmission to 0x77:
[21:31:58][VV][i2c:093]:     Writing 0b01110100 (0x74)
[21:31:58][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:31:58][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:31:58][VV][i2c:113]:     Received 0b01010100 (0x54)
[21:31:58][VV][i2c:056]: Beginning Transmission to 0x77:
[21:31:58][VV][i2c:093]:     Writing 0b01110101 (0x75)
[21:31:58][VV][i2c:061]:     Transmission ended. Status code: 0x00
[21:31:58][VV][i2c:083]: Requesting 1 bytes from 0x77:
[21:31:58][VV][i2c:113]:     Received 0b00000000 (0x00)
[21:31:58][VV][i2c:056]: Beginning Transmission to 0x77:
[21:31:58][VV][i2c:093]:     Writing 0b01110100 (0x74)
ERROR Error while reading incoming messages: Error while receiving data: [Errno 54] Connection reset by peer

using version 1.0.1 - checkout of master. i'd be glad if you can give this a look. do you require any more information? please let me know. thanks!

gretel commented 3 years ago

@trvrnrth update: the above issue seems to be connected to having

web_server:
  port: 80

declared and actually accessing the web-frontend. i could not reproduce the above when a http connection was not established. so i think it's an upstream issue.

gretel commented 3 years ago

looks like the actual cause is using (relatively too many) filters (in my case median) on esp8266. can also use web_server again. commented on the most related upstream issue i could find.