fliphess / esp8266_p1meter

dsmr 4.2 P1 meter to mqtt using esp8266 nodemcu
GNU General Public License v3.0
69 stars 114 forks source link

WDT-reset #1

Closed rob-v-k closed 5 years ago

rob-v-k commented 5 years ago

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...
fliphess commented 5 years ago

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