This is my logic and it works great. But, if I want to push another button to turn off the valve before 15 minutes have elapsed, I don’t know how to do that. Appreciate any help!
You could use Button Controllers and assign Button 1 to the run what you rule currently does and Button 2 to close the water valve.
The "Cancel Timed Actions" action in Rule Machine or Button Controller will cancel any waits in the specified rule, which is a direct answer to that part of your question. (Note that it cancels more than waits--anything scheduled, including waits; delays, whether cancelable or not; repeats; periodic triggers; and more, as indicated in the UI.) But I don't think that's really what you want here.
Since it sounds like you really want to wait that amount of time or until button 2 is pressed, you can just use "Wait for event: button 2 pushed" with 15-minute timeout (a timeout is basically the same as elapsed time, except here it will proceed sooner if the specified event happens first).
EDIT: My information may be outdated... thanks @bertabcd1234 for the correction.
I think you're using the "wait for event" function incorrectly. I believe it's meant to look for some other event to occur after your initial trigger. The timeout parameter is just the maximum time allowed between events before proceeding to the next action.
That said, the "event" that you are waiting for could be a second button. As soon as you push that second button, the rule should advance to the next action.
The "normal" ways to add a time delay are to use the "wait for event" function with the "elapsed time" option OR use the "delay" option within the OFF action. "Cancelling" these usually prevents the action from occurring at all... not "skipping" the timer and executing the action immediately.
One note: as of recent Rule versions, the rule displays "timeout" after saving even when you choose "Elapsed time." So, I think it's being used correctly (in this sense) in the screenshot--just an odd display thing that I guess is a feature rather than a bug now.
Thanks all. But, this problem seems to be more than just interrupting an elapsed time event. As I sit here testing the possibilities, I would say I have a bad valve. But, that's not it. I can close the valve on the device page but I cannot program a button controller or other rule to make the valve close. There is a device specific settings switch that might come into play but I have tested both positions.
Appreciate any ideas even though this seems to be moving away from a RM topic. Thanks!
If the device works when controlled manually, then it's likely you're dealing with an app/rule issue, but perhaps it's just coincidence. My suggestion is to enable all logging for the rule, then check "Logs" to see what is executing when. See here (the linked section of this document) for what I mean:
https://docs.hubitat.com/index.php?title=How_to_Troubleshoot_Apps_or_Devices#Enable_Logging
I assume the "Action: Close: HA Sinope Water Valve2" line is from your rule? If so, there was a bug in a previous version of Rule Machine where the "close" action on a valve actually opened it. That seems like it might be what you're running into here. Re-creating this in the latest version of Rule 5.1 may help if that is not what you're using.
Otherwise, what platform version are you on (check Settings > Hub Details), and what "version" do you see listed at the bottom of the main page of your rule if you open it? For example, on one of mine, I see: "Version 5.1.3 (4/4/2022)"
5.1.1
Is there a way to upgrade RM without upgrading the hub os?
No, built-in apps come as part of the hub platform version. If you don't have a reason to not be on 2.3.1 (the latest release; check Settings > Hub Details for Platform Version if you aren't sure), I would recommend upgrading to get fixes like these (and an optional Z-Wave radio update that many have found to be helpful!).
Ok. For posterity, the original problem I had was with use of the bug version of RM (5.1.1) which did not allow for a valve to be closed programmatically. Update to RM fixed that problem.
Now, I've learned to use a new-to-me feature of RM - the timeout command. And, as I am told, the better way to do a timed on then off cycle for a valve is:
Thanks all!
That is not "better," and it's also not what I suggested (it was closer to what you had originally), but it should be about the same aside from not canceling on re-trigger. But from your first post, it's not clear to me it's even what you want. How does button 2 cancel this? As written, it won't, and a key difference from before is that pressing button 1 again now won't reset this timer but will just add another.
If you go back to "Wait for events" and use "timeout" (not delay; these are different) and use a wait for the button 2 event instead of just "elapsed time," I think you'll get something like what you described originally. (A wait for a "real" event with a timeout is basically the same as a wait for event for elapsed time, except it will proceed if the event happens first.) If that's not what you want anymore, this works too! But I didn't want you to be misled.
That's what I was thinking! Glad you have something that works.