So, I have this Water Pumping system connected to the blynk server which monitors the water level and automatically pumps water if the water tank is empty. I have two esp32 and two water tanks which is located in different area of the building .The tank1 and the water pump is in the groundfloor. The tank2 is in the rooftop.
Now my problem is that the automation of the water pump is only applicable if it is connected to the internet (blynk server). I want my automation to continue even if there’s no internet connection using only the Wifi router for communication of two esp32.
You could stop using the Blynk cloud servers and set-up a local Blynk server.
Alternatively, make the code work in an autonomous way, and don’t use Blynk.begin in your code, as this is a blocking function which will stop your code execution if there is no Blynk connection. Use Blynk.config and Blynk.connect instead.
Actually I have to use the blynk server because I also monitor the voltage and current of the water pump and the water level of thw two tanks.
I’m not suggesting that you wouldn’t use Blynk in some way, but if you want to use the cloud servers then you’d want the water level to be controlled in an autonomous way, and allow the monitoring via the app (which would be there to provide peace of mind) to take place when the internet connection is restored.
I had a similar issue with my smart light switch. When lightning took out our DSL modem, the light switch was dead. I used the exact setup that @PeteKnight mentioned and it works like a champ now even if the internet connection goes dead.