How do I stop piston while it's working?


#1

Hi everyone. I’m new to webCoRE and I’m trying to learn how to use to properly set up my blinds controllers. I’ve been learning a lot about variables before, but I don’t know how to continue with this:

I am doing this action which is supposed to open three blinds but in order, it wil open one, then 30 seconds after the second one, and 30 seconds after, the third one.

I would like to know how to stop the action. I know how to send a Stop command to the blinds, but if blind #1 is opening and I stop the motor in #1, I think some seconds after I’ll see #2 starting and I’ll have to go to press stop to #2, and then the same for #3, right?

I want to set a button to cancel everything and stop sending the “open” actions. Do I need to use variables or is there a way to stop the piston from continuing with its tasks?

Thanks,
Rodrigo


#2

Screenshot_2019-02-12%20webCoRE%20Community%20Forum

I presume that Keypad 1 is a momentary button and not an on/off switch?


#3

It is a button that recognizes both “press” and “hold” actions. Not a switch.


#4

I doubt it. Even if you used “cancel tasks” the blinds will continue to open because they are not in two ways communication with WebCore.

You need to send STOP command to stop them…

I have motorized blinds and I use them wıth webcore. What is it that you want to accomplish? I might try to draft a piston for you.


#5

Do your buttons recognize a “double” tap like here?
If so, then you could use the “double” option to stop the blinds at their current state (opening, closing, open or closed).
I’ll also be happy to throw a piston together for you if needed. :smile:


#6

I can send a stop command to the blinds, but the piston is configured so only one blind opens at a time, so if I send three Stop commands only one (the one that is currently opening) will be stopped, and some seconds after the next one is going to start opening.
Also, I could configure a Hold or a separate button to do this. I just want to understand how to stop the piston from counting more seconds and sending the next Open commands.

Thanks,
Rodrigo.


#7

I am presuming that you can push a button to stop the blinds (Keypad 2). This is my UNTESTED suggested piston. I am certain there is a better way to do this. But I don’t have a way to test this. I WELCOME other comments/suggestions.


#8

But will changing the boolean stop_the_blinds to false automatically stop the action from continuing if it has already started?

I’ll try this later but I think I’ll need an “if variable stop_the_blinds is false” before each action for each blind. I thought there was another way to make the action stop.

Thanks! I’ll report back.
Rodrigo


#9

I am not certain on this as I am still learning as well. But I believe that when the parent condition state changes, the task is cancelled.

Therefore, I THINK that when you push the “stop” button that all tasks are cancelled and the first “IF” executes, thus stopping all blinds.


#10

I just was able to test it. I took your idea of using the Task cancellation policy but applied it in a different way: I set it to be cancelled on Piston State Change.
I am only using variables so I can use the same two buttons to start up / start down or stop the action if it’s happening.
I tested it a couple of times and it works fine :smiley:


#11

I created a simulated button and called it “Auto Lights HOLD”. If I turn this button ON, then all Time Scheduled lights will not execute.

I added the button to the ‘IF’ statements as “Auto Lights HOLD is OFF”

This works great when I want to interrupt the scheduling of the lights.

You may be able to use something like this.

Example: