Wemos water project Timers?

a bit much to read it all, anyway I noticed:

} else if (disconnectCount > 20) {
  ESP.restart();
}

this can go wrong (esp can get stuck) you need to add delays around it. E.g.:

} else if (disconnectCount > 20) {
  delay(3000);
  ESP.restart();
 delay(5000);
}

delays can be shorter, but its better to be on the safe side.

1 Like

Thanks Wolph, this seemed to stop the random restarts. I also added a WiFi AP closer to this unit which way have helped some.

Also thanks Peter, not sure exactly if this made a difference but I went with it.

Alexis, This seems pretty useful, ill definitely be looking into it to confirm some of my timer operations here.
Nice Work!

1 Like

So for about a week or so the only restarts that have happened are on purpose. and its passing data back and forth as needed. seems like i’m in a pretty good spot aside from the temperature regulation.

I’m going to strip it back and start with a more simple situation, just opening the cold a fraction at a time until it hits the correct temp. If anyone has any ideas on how to make that work better I would love to hear it.

You guys have been fantastic so far though. thanks for all the help.

Maybe one solution is to sense the temperature of the hot and cold lines before they go through the valves, so that you can estimate how much of each will be needed to give your desired output temperature?

Pete.

And how will your system work without the Internet? In such projects I use a real time clock with a battery (ds3231), and install a small display (oled 1.3") and buttons on the main box. And all the timers and other data saved to ds3231 onboard memory.