Momentary On with Virtual Switch


#1

Hi All,

I’m new to webCoRE, but, I’m excited and diving in… I’m trying to write a piston that uses a virtual switch to turn on a plug for 1 second and then shut the switch back off (I tried a virtual button but can’t toggle it in the ST app in a routine).

I am succeeding, with the exception of turning the virtual switch back off makes the power to the plug pulse back on and then it goes off. In other words, I’m getting two power flashes instead of one. My intent is to use this a garage door opener, two power cycles is like pushing the opener twice and does not provide the desired result.

Can someone look at my piston and tell me what I have wrong?


#2

DISREGARD - I figured it out, it was the “changes” command…

Thanks!


#3

You are using “changes” instead of “changes to” so its fireing once when you turn it on and the again when the piston turns it off.

"switch 11’s switch changes"
should be
switch 11’s switch changes to on

Take a look at one I use…


#4

You can also try creating a “Momentary Button Tile” device.
Those automatically turn off themselves once pushed.


#5

I agree and had the same train of thought. I just couldn’t get it to execute for the following reasons (remember I am new to all of this…):

  1. In ST and webCoRE I couldn’t get them to see the virtual button as an available device to choose.
  2. In ST, under devices, I have to select it and then I get the option to “push” it (more keystrokes than I want to manually operate the virtual button).

If someone can explain what I’m doing wrong I would love to learn as my workaround (using a virtual switch) does require a few extra steps to get to where i need to be.


#6

Just for clarification, I have never used a “virtual button”…
I was suggesting a “Momentary Button Tile” as seen in the IDE.
(this works well in both ST and webCoRE)

I use a web browser to:

Then use this as a guide:

Side Note:
Sometimes I have to use a “Private Browsing Window” to be able to log into the IDE.

Once the device is added, ST will see it within a few seconds, but you will have to tell webCoRE that you have a new device. Let me know if you are unfamiliar with that process, and I will elaborate.


#7

WOW! THANK YOU! That’s exactly what I was wanting!