Button Widget suggestion

It would be nice to have a confirmation option for the button widget. For example, click a button and have a message pop-up “Are you sure you want to do this”. With a Yes / No. Customizing the message would be a bonus as well.

2 Likes

Something like this “secured” button, yeah? Like it!

Lol… Yeah… something like that!

It 's been a long time since this thread, but I have not found this function implemented. It would be useful as a security ie you can open the front door. Better yet, instead of yes / no you could choose to influence the insertion of a password.
It could be either a new special button widget, or a new feature in the current widget button.

While we (fellow Blynk users) don’t yet have a button that you can’t push, without a key that you can’t have, without a password… that you forgot… :stuck_out_tongue_winking_eye:

We do have code solutions that should work for you:

1 Like

Limited solution than to use a password or pin.
I was looking for a more elegant than the one I implemented solution, which consists, as security, to press simultaneously two buttons that activate relay 2 with the contacts in series to activate the electric lock.

@Barbera Just an idea, not sure if it would work as you need.

Maybe instead of two buttons that control two relays that need to be activated at the same time, you could use one of those buttons as an “ARM” for the other button that controls one relay. Then in your code use an “&” in an if statement so that the button controlling the relay would only work if the other button was active. Then as the last step in the IF, have it write the “ARM” button state LOW to unarm it. That way you have to arm the relay button after each time it is pressed.

Pseudocode below, will need to be changed into working code.

Two Button Widgets, One attached to say virtual pin 1 (push button to activate relay) and the other to virtual pin 2 (switch to ARM).
IF (V1=HIGH & V2 = HIGH)
activate RELAY
Blynk.virtualWrite(V2, LOW);
else
do nothing

You could even work some kind of timer in there so if you arm the button, but do not press the relay button, it will unarm itself after a certain amount of time.

2 Likes

Very good, I think this is good, it is an improvement over as I thought.
Thanks