j0ta29 / esphome

ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
https://esphome.io/
Other
6 stars 2 forks source link

Device hangs randomly #8

Open gismo2004 opened 7 months ago

gismo2004 commented 7 months ago

This is basically just for reference for other users.

I had troubles with my ESP stop working/hanging at some point in time. I was not able to reproduce this by switching off/on my Viessmann device, nor was it possible to trigger it by removing the LEDs which was my initial idea of why this happens.

After a while I realized that this problem only occurred, when adding a sensor with an address that can't be read correctly. In my case, it was the error history array (0xA801) .

So in principle it was a configuration issue, but maybe the new VitoWiFi library is more robust against such “stupid users” :-)

j0ta29 commented 5 months ago

@gismo2004 , can you give me an example of a "stupid user"-configuration (only the part that causes the error). I'll try to reproduce the error.

gismo2004 commented 5 months ago

I would love to provide this, but now that i have added the message again, for some reason my device is not crashing anymore. So it must have been something else, but i have no clue what it could be... Sorry

gismo2004 commented 5 months ago

@j0ta29 after some tryouts, I found one configuration that fails. It's just adding a textsensor which does not exist.

    id: WPR_GueltBetriebsart_resultHeizKreisanforderung
    name: GültBetriebsart resultierende Heizkreisanforderung
    address: something that does not exist
    bytes: 1
    filters:
      map:
      - 0.0000 -> BA_Standby
      - 1.0000 -> BA_Reduziert
      - 2.0000 -> BA_Normal
      - 3.0000 -> BA_Festwert

this kills my ESP32 randomly

j0ta29 commented 2 months ago

@gismo2004 , can you still reproduce the problem with the current version of the optlink component? If yes, can you provide me with the log output before the crash?

gismo2004 commented 2 months ago

@j0ta29, I can not tell for sure if this is fixed by latest changes or if it is fixed because I have changed my update_intervalls. I had quite some troubles running the latest version, as I got a lot of “queue full” messages when using my previously working config without changing the update_intervall parameters. It worked for a while and then suddenly stops, as I had it before with the "bad" entry. This causes the loop times to vary from 15ms to > 3000ms and this seems to be the main issue. Now with the bad definition from above I also see higher fluctuations in loop times but just up to 60ms which seems to be no problem as it runs now for 2 days without problems.

Before update: image

while update: image

After update without "bad" entry: image

After update with "bad" entry: image