Hello Guys, I need help here.

I’m using Blynk bridge to communicate two esp32, I want to trigger the relay off in my first esp32 whenever the second esp32 goes offline or disconnected to the network…

Can somebody help please?
Thankyou! Godbless.

The problem I see here is that if the controlling device is offline, it will not be able to send the needed bridge command… obviously :stuck_out_tongue:

I suppose it is possible to send out a constant, timed, “WDT pulse” from one device to another. Then if on the receiving device, that pulse is missed for a predetermined time, then action is taken.

But depending on the reaction time frame needed, you may have to allot much processing and code to that task alone.

Perhaps you can enlighten us with the actual needed process and reasoning that you are looking to accomplish… there might be other ways to facilitate it.

Thankyou Gunner for the reply.
yep, that’s the main problem, if the device suddenly goes offline it obviously cannot send the command to the other device.

The first esp32 which has a relay in it controls the water pump… the second esp32 has an ultrasonic sensor that monitors the water level on the tank

Now, if the second esp32 detects that the water level of the tank is low it automatically triggers the relay module ‘ON’ in the first esp32 and automatically triggers the relay module ‘OFF’ when the water tank is full.

What if the second esp32 suddenly goes offline? it will continue pumping water to the tank until it will overflow and I dont want it to happen… thats why the relay must automatically turn off if the second esp32 goes offline…

I hope you understand my English … My English is bad af haha

Thankyou very much!

If your relay somehow gets stuck in the ON state due the controlling ESP32 is offline or locked up, then how could the sensor ESP32 do anything about it anyhow??

And if the sensor ESP32 goes offline, then the only way the pump controller will know is if after a few moments of NOT receiving a WDT type signal, then it should stop the pump. But as stated, lots of extra programming and timing logic… also not necessarily foolproof if both go offline or something else somehow leaves the relay activated.

But I would approach this from a simpler standpoint… integrate a “last ditch” physical limit switch (SPST normally closed float switch) that if triggered, will cut power to the pump (bypassing the relay control).

Actually the Water pump system is in a building, the water pump is located in the groundfloor of the bldg and the water tank is in the 4th floor of the bldg… I don’t really want to use any physical limit or float switch because the two devices is far from each other… that’s why as possible I want it to control wirelessly.

Understandable, but low voltage signal wires can still control relays.

So do it wirelessly as I suggested, via some form of WDT type bridge setup, but relying on just a wireless setup alone will, eventually, risk a flood.

Ok Sir… thankyou very much for the time and suggestion.