Caddx Plug-in Occupancy Motion?

I am in the process of moving all of my automation from my JDS Stargate to a Vera 3 unit, and have also moved my Caddx NX-8e connection over to the Vera. I’m sure this has been discussed previously, and I’ve done a light search of the forum, but I’m looking to replicate an action that I did on my Stargate with Vera.

I would like to have a timer that gets reset every time motion is detected, and when the timer gets to zero, an action such as turning off lights will occur.

An example is that I have all my basement lights (man cave / theater) set on a 20 minute timer, where if there is no motion in that time, my stargate will send out a command to turn off the lights.

Would someone point me in the direction of how I might accomplish this, as I’m not fully up to speed with the programming yet for the Vera, even though I’ve got 32 Caddx sensors, 3 Schlage locks, 1 thermostat, 3 Somfy motorized shades, 4 rollertrol motorized shades, and 38 Zwave light switches and growing.

Many thanks in advance!

Use the PLEG plug-in. See the “PLEG Basics” document in the programming forum, program logic sub-forum, on how to work with timestamps.
It will take some time to learn, but it is really the core tool to give you customize-able behavior in Vera…

Example PLEG use, in this case my home office with a 10 minute time to turn off and dimmer set to 70% and a one-hour reset if the light is triggered on or off manually…

Triggers:

OfficeFanLightsOff Office Fan Lights is turned off
OfficeFanLightsOn Office Fan Lights is turned on
OfficeOccupancy Office Occupancy is tripped

Conditions:

OfficeFanLightsOffViaAuto No (OfficeNeedsFanLightsOff; OfficeFanLightsOff < 30)
OfficeNeedsFanLightsOn No OfficeOccupancy and OfficeFanLightsOff and (OfficeFanLightsOffViaAuto or (OfficeFanLightsOff ; Now > 60:00))
OfficeFanLightsOnViaAuto No (OfficeNeedsFanLightsOn; OfficeFanLightsOn < 30)
OfficeNeedsFanLightsOff No OfficeFanLightsOn and (OfficeFanLightsOnViaAuto or (OfficeFanLightsOn ; Now > 60:00)) and (OfficeOccupancy ; Now > 10:00)

Actions:

Actions for Condition: OfficeNeedsFanLightsOff

Device Actions:

Immediate

Device Action Arguments
Office Fan Lights SetLoadLevelTarget newLoadlevelTarget=0
Actions for Condition: OfficeNeedsFanLightsOn

Device Actions:

Immediate

Device Action Arguments
Office Fan Lights SetLoadLevelTarget newLoadlevelTarget=70

I agree PLEG it. Start with the PDF PLEG basics.

Then post in the PLEG section for help.

Thank you all very much! I’ll download the plug-in now and take a look.

Also see the HomeCare plugin for a similar idea.