I'd like to create a virtual button to control a Switch.
When the virtual button is pushed, the switch should turn on, wait a second, turn off.
(I try to give an opening signal to the dry contact of my gate via a shelby relais)
I'd like to create a virtual button to control a Switch.
When the virtual button is pushed, the switch should turn on, wait a second, turn off.
(I try to give an opening signal to the dry contact of my gate via a shelby relais)
The first thing that comes to me without thinking too much is create a virtual switch as well.
With a virtual switch you can set an auto off.
Button pressed.
Virtual switch turns on.
This then turns on your physical switch.
Virtual switch turns off after 1 second using auto-off facility.
Physical switch turns off.
A bit convoluted I know but it would work.
what's the best implementation to turn on (off) the "real" switch when the virtual switch is turned on (off)?
There is a built in mirror app, it sets one switch to mirror the other. So you could set up a mirror of the virtual with the real one.
You could use basic rules.
If switch A turns on.
Turn on B.
A turns off.
Turn off B.
works great, thank you!
Followup question:
I'd like to have a button to keep my gate open for let's say 3 minutes. How would you implement this?
Make a Virtual Button with 1 button, or use the device (Switch) you already created.
Make a rule in Rule Machine:
Trigger: if Virtual Button 1 is pressed (or Switch is triggered).
Action: Delay 3 minutes.
Action: Turn of Switch.
Just a heads up: be careful if you have pets or kids around that might sneak through at the last moment because now it's working unsupervised (unless your gate has a sensor).