Overlapping time for unit commands, which priority?

johnmhome

Member
I want to know how OPII handles two separate events that trigger the same unit on for a period of time.

Suppose I have two events like this:

Code:
	TIMED 5:01 PM MTWTFSS
		AND IF NOT AWAY
			THEN H Water pump ON FOR 4 HOURS

and

Code:
	WHEN H Water Pump
			THEN H Water pump ON FOR 2 HOURS

The second case is a button, with a confusingly similar name to the unit, BTW.

So if someone presses the button at 6pm, will the hot water pump run until 8pm (because its timer value overrides the 4 hour setting from 5pm) or will the pump stay on until 9pm because the original 4 hour timed output trumps the later, but shorter time.
 
Try thinking of the "ON FOR X HOURS" as "TURN THE UNIT ON, THEN SET THE COUNTDOWN TIMER TO X". After the command executes the timer will be set to "X" regardless of its previous value.
 
Great. Thanks for clarifying.

I was hoping the OPII would let the unit stay on for the command with the longest time - at least that's what I'd want in this case.

Looks like I need some more complex code that will let the unit remain on for a longer time, even if set shorter by another command.
 
John,

Actually, Fred's answer was not quite correct. If a unit is already "on for time x", any subsequent "on for time y" command can only extend the time remaining. It will not reduce the time. For a quick test, turn a unit on for 10 minutes. Then turn the same unit on for 5 minutes. If you check the status you'll see that the timer is still at 10 minutes. If instead you start by turning the unit on for 5 minutes, then on for 10 minutes, the timer will then again be at 10 minutes.

To set the timer to a shorter time, if desired, you need to send an on command with no time, followed by the timed command.
 
Back
Top