Wait statement not working


#1

I have a piston to do a action then wait x seconds then do another action then wait x seconds, then do another action and so on. However, it just doesn’t seem to work. It seems to always execute only the last action. Am I not using the wait statement correctly? I am using to send commands to my A/C but want to wait between the commands to allow the A/C to receive the command before proceeding to next command


#2

piston pic?


#3

Ooops ok here is a piston pic


#4

Ha! I came here for the same issue and this was the top post. :slight_smile:
It starts the timer, but as soon as I close the door the timer stops.
I guess I should also mention that this piston is setup in Hubitat.

Here’s mine.


#5

This one is easier than the first post, click the with then the cog icon, change the task cancellation policy to never.


#6

Do you get anything in the ide log?


#7

Will do. Thanks!


#8

What happens if you adjust the time to something longer, maybe 10 seconds or so? Just thinking maybe your thermostat is not reacting fast enough within the 3 seconds.


#9

This is a good idea. I can tell you that I always set my cooling and heating setpoints within the same piston. When doing this, I also have the piston send a ‘Refresh’ command to the thermostat and then after 25 seconds, I check the thermostat’s settings versus the expected results. I do this in a loop until the expected setpoints and results are equal - or until (5) unsuccessful attempts. It then notifies me.

All thermostats are different, and even my setpoint changes may not actually require the full 25 seconds before registering on my thermostat (CT-100). It may be that the setpoint changes happen quickly but it takes a long time for the thermostat to report the results back to ST. In any case, after multiple tests, I concluded that my thermostat requires that long to consistently make the setpoint changes and report the updated results back to ST.

In other words, although the OP’s thermostat may not require 25 seconds, there is a good chance that 3 seconds may be too short.


#10

Did you get this to work? I’m having the same issue. Here is my piston.


#11

Have you tried changing Task Cancellation Policy (TCP) to Never?
At 1:46 the rule will become false so the tasks will cancel. Your wait until 2:00 will stop so therefore your light will not turn off.

To set TCP, click on the ‘with’, click on the settings cog and change TCP to never.


#12

Thank you very much. I’m moved from CoRE to webCoRE and some of these things are new to me. I’ll see if that fixes it tomorrow. I had another one that also had the same issue. Do you have any advice for this one?


#13

How about.
IF
Time is between 7am and 7pm
THEN
WITH
Pump
DO
Set speed to 2
ELSE
Set speed to 0.


#14

You don’t have any triggers…no little lightning bolts. Try a timer instead of an if.