Can?t find the answer, motion sensor + light + time

Hi everyone!
i?ll searched this forum for the answer, and i found a bunch of answer but i can?t understand it anyway :slight_smile:
Maybe i?m to stupid to use this controller. ;D

Ok here to the question.
I?ll got a motion sensor that i want to control a wall plug between lets say 01:00 to 07:00.

so how do i do?

This is how i think i?ll should do, but don’t really know how to perform it.
A scene with a schedule to control the arming and disarming of the motion sensor between the times i wrote.
and then a scene to turn on the light when the armed sensor tripps, i want the light to be on for 1 minute, and the if the sensor tripps again, it?ll go on for a minute again. It?s seems really simple.
I tried to do it in the ordinary logic with 2 scenes and yes it works, but the sensor never got disarmed in the morning. And after what i understand i can’t do this with the logic without som Luua code, or am i wrong? Or Pleg

I have read the Conditional scene execution a bunch of times. But i can?t understand if i should use the time period to arm and disarm the sensor. Or should i use to scenes, 1 for arm and 1 for disarm?

Thanks for all help i can get ::slight_smile:

If you do this with Scenes an NO LUA code you will need 3 scenes

  1. Arm at 1:00
  2. Disarm at 7:00
  3. Armed and Tripped Turns on the light and turns off after 1 minute.
    [hr]
    OR your can do this with PLEG (need PLC plugin as well)

Define an Input Schedule called: Schedule
Schedule On at 1:00PM Off at 7:00PM

Define an Input Trigger called: Motion
Motion When Motion Device is tripped

Define a condition named: AutoOn
AutoOn Motion and Schedule

Add actions to the condition AutoOn Immediate … turn on the light … delayed 1 minute … turn off the light.

Thanks, So simple. I haven?t got the logic thinking right yet :slight_smile:

But i must ask one thing more, in the PLEG scene you showed me.
Am i?m totally off i that scene doesn’t arm and disarm the sensor?

Thanks once again.

No You can arm and disarm the sensor with a single scene.

Actually you can … You can arm it and with a delayed action you can disarm it.
But lately … Vera restarts so often … when it does … any delayed action get discarded … so you might end up with the sensor staying armed.