Continuous Signal while button widget is pressed

I have an application where we will be controlling a door. There will be a button widget on the App side that while pressed will energize two relays(one for a valve and one for a pump). When the button is released the valve and pump need to turn off so the relays will turn off.

It is however imperative that if for some reason communication between the app and hardware break that the two relays on the board turn off. What I am thinking is sending a signal every 500 milliseconds or so while the button is pressed. The hardware will listen for these signals and will maintain the relays as long as the signal is being received. If it however does not receive the signal after 2 seconds or so it would turn the relays off.

Is this possible in some way? I don’t think monitoring BLYNK_APP_CONNECTED() would be responsive enough for this. I am open to other ideas though.

This sounds like a situation where you are looking for an industrial level of robustness from the free version of the app.

12 months ago you said…

and you were pointed in the direction of the pricing structure for the paid plans. If you’ve signed-up for one of those plans then you should be discussing this issue with your Blynk account manager.

If you haven’t then I’d suggest that you talk to @Pavel about the best way of achieving what you’re looking for.


Hi @PeteKnight,

@Pavel and I have regular conversations and are actually working together on a new line of products. This application is for a customer, not for us. The customer wants a white labeled application with their company branding that in the end will be provided by Blynk. We are simply working on POC at the moment so I was hoping this could be accomplished using Blynk for that.

Can the KEEPALIVE rate change during the time the app is being used? Then what are valid TIMEOUT values… can it timeout in 2 to 3 seconds?

1 Like

If the App disconnect were that responsive that would certainly be acceptable. It seems like most functions like that however are fairly slow(30-60 seconds). I have not looked into the source to see exactly what the App Disconnect timeout is though.