Recurrent Turn Off with PLTS

Hello,

I plan to add a Remotec Z-Wave Air Condition to IR extender to my system.

Since this device does not know the status of the Air Conditioner (because the AC can be turned on/off with its original remote controller), I would like to do the following:

If no movement was detected by the motion sensor for 1 hour - send a “turn off” command to the Air Conditioner every hour.

While doing this scenario once is covered in the Master Bath Auto Off example, I am not sure (and couldn’t find) how to make this happen every hour (while still there is no movement).
In other words:

[ul][li]if no motion was detected for 1 hour - turn off AC.[/li]
[li]if no motion was detected for 2 hours - turn off AC.[/li]
[li]if no motion was detected for 3 hours - turn off AC.[/li]
[li]And so on…[/li][/ul]

Any assistance would be appreciated.

You can easily do this with PLEG

Schedule:
OneHourTimer: On Interval 1HR, Off, Interval 1 min

Input Trigger:
Motion Motion Detected

Condition:
AutoOff OneHourTimer and (Motion; OneHourTimer > 1:00:00)

Add your Turn Off command to the AutoOff action.

[quote=“RichardTSchaefer, post:2, topic:185150”]You can easily do this with PLEG

Schedule:
OneHourTimer: On Interval 1HR, Off, Interval 1 min

Input Trigger:
Motion Motion Detected

Condition:
AutoOff OneHourTimer and (Motion; OneHourTimer > 1:00:00)

Add your Turn Off command to the AutoOff action.[/quote]

This is a nice solution - thank you!

One more question: Will the first Turn Off command take place 1 hour after the last motion, or the first time the OneHourTimer schedule takes place, after more than 1 hour of no motion?

For example:

Let’s assume the OneHourTimer takes place at every round hour (i.e. midnight, 01:00am, 02:00am, etc.).
If the last Motion was detected at 02:30am, will the first TurnOff command (i.e. AutoOff condition) be triggered at 03:30am (1 hour of no motion) or at 04:00am (1.5 hours of no motion)?

My understanding is that the AutoOff condition will be evaluated any time there is a motion and every one hour, per the OneHourTimer schedule.

At the motion time (02:30am) and at the 03:00am OneHourTimer schedule, the expression “(Motion; OneHourTimer > 1:00:00)” is false, so the Turn Off command will not be executed.
Since there is nothing that causes the expression to be evaluated at 03:30am, the next time it will be evaluated is at the 04:00am OneHourTimer schedule, which is 1.5 hours of no motion (instead of 1 hour of no motion).

Am I missing here anything?

This will only send commands on the HOUR (i.e. 1:00:00, 2:00:00, 3:00:00, …)

If you want the other behavior:

You can use a restartable one hour timer that is triggered on motion and the timer itself expiring.

i.e.
Schedule:
OneHour: On - Self Retrigger, Off Interval 1 Hour

Input Trigger:
Motion

Conditions:
MotionTrigger Motion
AutoOff !OneHour

Both Conditions have an action to Start the OneHourTimer
AutoOff also has an action to send the off command.

Thanks!