fliphess/esp8266_p1meter

WDT-reset

Closed this issue · 1 comments

First of all: thanks for the great work!

My Wemos D1 Mini had a lot of WDT-resets while running this code. After I changed read_p1_serial() to disable the watchdog during serial-reading it stopped resetting. I guess the data that is transferred is too large/takes too long.

Maybe it works for other people as well.

       while (p1_serial.available())
        {
          ESP.wdtDisable ();
            int len = p1_serial.readBytesUntil('\n', telegram, P1_MAXLINELENGTH);
          ESP.wdtEnable (1);
etc...

Hey @rob-v-k !

Thanks for this addition, I will have to test it later this week on my wemos, but it looks like a sane addition :)