Condition is always true, what am I missing?

ConnorLightON5Min MBRFrenchDoorOpen or ConnorDoorOpen true 2014-02-19 11:56:50.970 2014-02-19 11:44:44.785 _ConnorLightOff !MBRFrenchDoorOpen and (MBRFrenchDoorOpen; !MBRFrenchDoorOpen < 10) or !ConnorDoorOpen and (ConnorDoorOpen; !ConnorDoorOpen < 10) true 2014-02-19 12:52:05.260 0

So the idea is, if I open Connor’s door (or the doors from our MBR going into his room), his light comes on and starts a 5 minute timer. However, if the door is opened for less than 10 seconds (i.e. just peeking), the light should immediately turn back off again when the door is closed.

With the way this condition is written, once the logic in the second condition becomes true, it stays true. I don’t know what change I should make to have it reset after each “peek”.

I know this shouldn’t be so complicated, but my mind obviously wan’t made to do this kind of thinking.

Add a Trigger for the controlled light and use that in your Conditions:

Triggers
ConnorLight Conner Light is turned on

Conditions
ConnorLightON5Min !ConnerLight and (MBRFrenchDoorOpen or ConnorDoorOpen)
ConnorLightOff ConnerLight and ( !MBRFrenchDoorOpen and (MBRFrenchDoorOpen; !MBRFrenchDoorOpen < 10)
or !ConnorDoorOpen and (ConnorDoorOpen; !ConnorDoorOpen < 10) )

God I wish my brain worked just a little bit like yours… Thanks Rex. I’ll try and report back. Connor is cutting wood right now, so it’ll be a bit.

God I wish my brain worked just a little bit like yours...
Trust me. You really wouldn't like that. ;D

When a light is dimmed up to, say 30%, is that considered “on”? Or what constitutes a change in state from on to off, or vice versa?

I’m getting really weird ramping up and down now with this latest iteration.

[code]Connor’s Light Sequcence

Device ID: 642014-02-19 17:34:42.472 PLC Version: 5.91

Triggers

Name Description State Last True Last False
ConnorDoorOpen Connor’s Door Sensor is tripped false 2014-02-19 17:20:43.459 2014-02-19 17:21:54.478
MBRFrenchDoorOpen Master Bedroom French Doors is tripped false 2014-02-19 17:16:57.898 2014-02-19 17:18:17.918
ConnorLightOn Plug-in C (Connor’s Light) is turned on false 2014-02-19 17:21:37.864 2014-02-19 17:22:11.554
Conditions

Name Expression State Last True Last False
ConnorLightON5Min !ConnorLightON and (MBRFrenchDoorOpen or ConnorDoorOpen) false 2014-02-19 17:21:34.426 2014-02-19 17:21:37.866
ConnorLightOff ConnorLightOn and (!MBRFrenchDoorOpen and (MBRFrenchDoorOpen; !MBRFrenchDoorOpen < 10) or !ConnorDoorOpen and (ConnorDoorOpen; !ConnorDoorOpen < 10)) false 2014-02-19 17:20:31.964 2014-02-19 17:20:38.910
Actions

Actions for Condition: ConnorLightON5Min

Immediate

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=40
Delay 35

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=60
Delay 04:00

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=0
Actions for Condition: ConnorLightOff

Immediate

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=0[/code]

When a light is dimmed up to, say 30%, is that considered "on"? Or what constitutes a change in state from on to off, or vice versa?
You didn't say you were using dimmers. Some dimmers don't update the device's [b]Status[/b] variable so you may not get reliable triggers.

You could try using a Device Property for LoadLevelStatus rather than the turned on trigger:

Device Properties
ConnorLight Conner Light LoadLevelStatus

Conditions
ConnorLightON5Min (ConnerLight == 0) and (MBRFrenchDoorOpen or ConnorDoorOpen)
ConnorLightOff (ConnerLight > 0) and ( !MBRFrenchDoorOpen and (MBRFrenchDoorOpen; !MBRFrenchDoorOpen < 10)
or !ConnorDoorOpen and (ConnorDoorOpen; !ConnorDoorOpen < 10) )

[code]Triggers

Name Description State Last True Last False
ConnorDoorOpen Connor’s Door Sensor is tripped false 2014-02-19 17:20:43.459 2014-02-19 17:21:54.478
MBRFrenchDoorOpen Master Bedroom French Doors is tripped false 2014-02-19 17:16:57.898 2014-02-19 17:18:17.918
Device Properties

Name Device Name Device Variable Value Last Change Previous Change
ConnorLight Plug-in C (Connor’s Light) LoadLevelStatus false 0 0
Conditions

Name Expression State Last True Last False
ConnorLightON5Min (ConnorLight == 0) and (MBRFrenchDoorOpen or ConnorDoorOpen) false 2014-02-19 17:21:34.426 2014-02-19 17:21:37.866
ConnorLightOff (ConnorLight > 0) and (!MBRFrenchDoorOpen and (MBRFrenchDoorOpen; !MBRFrenchDoorOpen < 10) or !ConnorDoorOpen and (ConnorDoorOpen; !ConnorDoorOpen < 10)) false 2014-02-19 17:20:31.964 2014-02-19 17:20:38.910
Actions

Actions for Condition: ConnorLightON5Min

Immediate

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=40
Delay 35

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=60
Delay 04:00

Device Action Arguments
Plug-in C (Connor’s Light) SetLoadLevelTarget newLoadlevelTarget=0
[/code]

Thanks. It’s doing the same thing. As though there are other triggers and actions at play. Is there an easy way to get an overview to see what hooks might be controlling a given device without scrolling through the entire log?

Here’s an UPDATED copy of the debug code…

Manual Scroll 50 02/19/14 18:14:06.707 luup_log:64: PLEG-64:Initialize:Restart <0x2ba49680> 50 02/19/14 18:14:06.711 luup_log:64: PLEG-64:Entry:NOW <0x2ba49680> 50 02/19/14 18:14:06.719 luup_log:64: PLEG-64:WatchProperties:ConnorLight: 67:urn:upnp-org:serviceId:Dimming1:LoadLevelStatus <0x2ba49680> 50 02/19/14 18:14:06.723 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightON5Min Trigger:nil Result:false <0x2ba49680> 50 02/19/14 18:14:06.728 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightOff Trigger:nil Result:false <0x2ba49680> 50 02/19/14 18:14:06.729 luup_log:64: PLEG-64:TriggerCondition:None <0x2ba49680> 06 02/19/14 18:14:06.729 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: None now: None #hooks: 0 upnp: 0 v:0xb730e0/NONE duplicate:1 <0x2ba49680> 06 02/19/14 18:14:06.729 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1392851460 now: 1392851646 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2ba49680> 50 02/19/14 18:14:06.730 luup_log:64: PLEG-64:SweepDB:NOW <0x2ba49680> 50 02/19/14 18:14:06.742 luup_log:64: PLEG-64:CheckRegistration:Subsequent:-343306746 <0x2ba49680> 50 02/19/14 18:14:06.743 luup_log:64: PLEG-64:Registration:Registered: false $0$12345678$9 <0x2ba49680> 50 02/19/14 18:14:06.743 luup_log:64: PLEG-64:Registration:PLC[36]: 3 PLEG#: 4 PLTS#: 1 <0x2ba49680> 50 02/19/14 18:14:16.101 luup_log:64: PLEG-64:DelayedEval:Tripped :0=1 <0x2d249680> 50 02/19/14 18:14:16.102 luup_log:64: PLEG-64:DelayedEval:Tripped :0=1 <0x2d249680> 50 02/19/14 18:14:16.102 luup_log:64: PLEG-64:WatchProperties:Old: 0 New: 0 <0x2d249680> 50 02/19/14 18:14:40.320 luup_log:64: PLEG-64:TriggerPropertyUpdate:Tripped <0x2ee63680> 50 02/19/14 18:14:40.321 luup_log:64: PLEG-64:TPU:Tripped :1=1 <0x2ee63680> 50 02/19/14 18:14:40.321 luup_log:64: PLEG-64:TriggerPropertyUpdate:Name:ConnorDoorOpen State:true Device:40 <0x2ee63680> 50 02/19/14 18:14:40.322 luup_log:64: PLEG-64:EvalConditions:Multi Trigger:ConnorDoorOpen <0x2ee63680> 50 02/19/14 18:14:40.331 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightON5Min Trigger:ConnorDoorOpen Result:true <0x2ee63680> 50 02/19/14 18:14:40.332 luup_log:64: PLEG-64:TriggerCondition:ConnorLightON5Min <0x2ee63680> 06 02/19/14 18:14:40.333 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: None now: ConnorLightON5Min #hooks: 0 upnp: 0 v:0xb730e0/NONE duplicate:0 <0x2ee63680> 06 02/19/14 18:14:40.333 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1392851646 now: 1392851680 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2ee63680> 08 02/19/14 18:14:40.334 JobHandler_LuaUPnP::HandleActionRequest device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC action: RunAction <0x2ee63680> 50 02/19/14 18:14:40.341 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightOff Trigger:ConnorDoorOpen Result:false <0x2ee63680> 50 02/19/14 18:14:40.343 luup_log:64: PLEG-64:SaveDB:{{name = 'ConnorDoorOpen', state = true, seq = 1392851680.3214, oseq = 1392851470.7662},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = true, seq = 1392851680.3317, oseq = 1392851460.1164},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} <0x2ee63680> 06 02/19/14 18:14:40.344 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name = 'ConnorDoorOpen', state = false, seq = 1392851454.243, oseq = 1392851470.7662},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851454.2457, oseq = 1392851460.1164},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} now: {{name = 'ConnorDoorOpen', state = true, seq = 1392851680.3214, oseq = 1392851470.7662},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = true, seq = 1392851680.3317, oseq = 1392851460.1164},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} #hooks: 0 upnp: 0 v:0xadf160/NONE duplicate:0 <0x2ee63680> 50 02/19/14 18:14:40.345 luup_log:64: PLEG-64:RunNext:Condition:ConnorLightON5Min Index:1 <0x2b316000> 50 02/19/14 18:14:40.346 luup_log:64: PLEG-64:SaveActionDB:{ConnorLightON5Min= {Start ='1392851680', Next = 2},} <0x2b316000> 06 02/19/14 18:14:40.347 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ActionsMap was: {} now: {ConnorLightON5Min= {Start ='1392851680', Next = 2},} #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2b316000> 50 02/19/14 18:14:47.289 luup_log:64: PLEG-64:TriggerPropertyUpdate:Tripped <0x2ee63680> 50 02/19/14 18:14:47.290 luup_log:64: PLEG-64:TPU:Tripped :0=1 <0x2ee63680> 50 02/19/14 18:14:47.290 luup_log:64: PLEG-64:TriggerPropertyUpdate:Name:ConnorDoorOpen State:false Device:40 <0x2ee63680> 50 02/19/14 18:14:47.291 luup_log:64: PLEG-64:EvalConditions:Multi Trigger:ConnorDoorOpen <0x2ee63680> 50 02/19/14 18:14:47.294 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightON5Min Trigger:ConnorDoorOpen Result:false <0x2ee63680> 50 02/19/14 18:14:47.300 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightOff Trigger:ConnorDoorOpen Result:false <0x2ee63680> 50 02/19/14 18:14:47.300 luup_log:64: PLEG-64:TriggerCondition:None <0x2ee63680> 06 02/19/14 18:14:47.301 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: ConnorLightON5Min now: None #hooks: 0 upnp: 0 v:0xb730e0/NONE duplicate:0 <0x2ee63680> 06 02/19/14 18:14:47.301 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1392851680 now: 1392851687 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2ee63680> 50 02/19/14 18:14:47.303 luup_log:64: PLEG-64:SaveDB:{{name = 'ConnorDoorOpen', state = false, seq = 1392851680.3214, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} <0x2ee63680> 06 02/19/14 18:14:47.304 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name = 'ConnorDoorOpen', state = true, seq = 1392851680.3214, oseq = 1392851470.7662},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = true, seq = 1392851680.3317, oseq = 1392851460.1164},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} now: {{name = 'ConnorDoorOpen', state = false, seq = 1392851680.3214, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} #hooks: 0 upnp: 0 v:0xadf160/NONE duplicate:0 <0x2ee63680> 50 02/19/14 18:14:50.834 luup_log:64: PLEG-64:PropertyUpdate:ConnorLight: from:0 to:40 <0x2bc49680> 50 02/19/14 18:14:50.837 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightON5Min Trigger:ConnorLight Result:false <0x2bc49680> 50 02/19/14 18:14:50.873 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightOff Trigger:ConnorLight Result:true <0x2bc49680> 50 02/19/14 18:14:50.876 luup_log:64: PLEG-64:TriggerCondition:ConnorLightOff <0x2bc49680> 06 02/19/14 18:14:50.876 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: None now: ConnorLightOff #hooks: 0 upnp: 0 v:0xb730e0/NONE duplicate:0 <0x2bc49680> 06 02/19/14 18:14:50.887 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1392851687 now: 1392851690 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc49680> 08 02/19/14 18:14:50.887 JobHandler_LuaUPnP::HandleActionRequest device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC action: RunAction <0x2bc49680> 50 02/19/14 18:14:50.890 luup_log:64: PLEG-64:SaveDB:{{name = 'ConnorDoorOpen', state = false, seq = 1392851680.3214, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = true, seq = 1392851690.8752, oseq = 1392851314.7619},{name = 'ConnorLight', state = '40', seq = 1392851690.8345, oseq = 1392851494.514},} <0x2bc49680> 06 02/19/14 18:14:50.890 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name = 'ConnorDoorOpen', state = false, seq = 1392851680.3214, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = false, seq = 1392851313.4019, oseq = 1392851314.7619},{name = 'ConnorLight', state = '0', seq = 1392851494.514, oseq = 1392851490.4035},} now: {{name = 'ConnorDoorOpen', state = false, seq = 1392851680.3214, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = true, seq = 1392851690.8752, oseq = 1392851314.7619},{name = 'ConnorLight', state = '40', seq = 1392851690.8345, oseq = 1392851494.514},} #hooks: 0 upnp: 0 v:0xadf160/NONE duplicate:0 <0x2bc49680> 50 02/19/14 18:14:50.892 luup_log:64: PLEG-64:RunNext:Condition:ConnorLightOff Index:1 <0x2b316000> 50 02/19/14 18:14:50.892 luup_log:64: PLEG-64:SaveActionDB:{ConnorLightON5Min= {Start ='1392851680', Next = 2},} <0x2b316000> 06 02/19/14 18:14:50.905 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ActionsMap was: {ConnorLightON5Min= {Start ='1392851680', Next = 2},} now: {ConnorLightON5Min= {Start ='1392851680', Next = 2},} #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2b316000> 50 02/19/14 18:14:55.791 luup_log:64: PLEG-64:TriggerPropertyUpdate:Tripped <0x2ee63680> 50 02/19/14 18:14:55.791 luup_log:64: PLEG-64:TPU:Tripped :1=1 <0x2ee63680> 50 02/19/14 18:14:55.792 luup_log:64: PLEG-64:TriggerPropertyUpdate:Name:ConnorDoorOpen State:true Device:40 <0x2ee63680> 50 02/19/14 18:14:55.796 luup_log:64: PLEG-64:EvalConditions:Multi Trigger:ConnorDoorOpen <0x2ee63680> 50 02/19/14 18:14:55.799 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightON5Min Trigger:ConnorDoorOpen Result:false <0x2ee63680> 50 02/19/14 18:14:55.816 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightOff Trigger:ConnorDoorOpen Result:false <0x2ee63680> 50 02/19/14 18:14:55.817 luup_log:64: PLEG-64:TriggerCondition:None <0x2ee63680> 06 02/19/14 18:14:55.817 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: ConnorLightOff now: None #hooks: 0 upnp: 0 v:0xb730e0/NONE duplicate:0 <0x2ee63680> 06 02/19/14 18:14:55.818 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1392851690 now: 1392851695 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2ee63680> 50 02/19/14 18:14:55.819 luup_log:64: PLEG-64:SaveDB:{{name = 'ConnorDoorOpen', state = true, seq = 1392851695.7921, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = false, seq = 1392851690.8752, oseq = 1392851695.8167},{name = 'ConnorLight', state = '40', seq = 1392851690.8345, oseq = 1392851494.514},} <0x2ee63680> 06 02/19/14 18:14:55.820 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name = 'ConnorDoorOpen', state = false, seq = 1392851680.3214, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = true, seq = 1392851690.8752, oseq = 1392851314.7619},{name = 'ConnorLight', state = '40', seq = 1392851690.8345, oseq = 1392851494.514},} now: {{name = 'ConnorDoorOpen', state = true, seq = 1392851695.7921, oseq = 1392851687.2905},{name = 'MBRFrenchDoorOpen', state = false, seq = 1392851285.6831, oseq = 1392851314.6901},{name = 'ConnorLightON5Min', state = false, seq = 1392851680.3317, oseq = 1392851687.2943},{name = 'ConnorLightOff', state = false, seq = 1392851690.8752, oseq = 1392851695.8167},{name = 'ConnorLight', state = '40', seq = 1392851690.8345, oseq = 1392851494.514},} #hooks: 0 upnp: 0 v:0xadf160/NONE duplicate:0 <0x2ee63680> 50 02/19/14 18:14:57.394 luup_log:64: PLEG-64:PropertyUpdate:ConnorLight: from:40 to:0 <0x2bc49680> 50 02/19/14 18:14:57.397 luup_log:64: PLEG-64:EvalConditions:Condition:ConnorLightON5Min Trigger:ConnorLight Result:true <0x2bc49680> 50 02/19/14 18:14:57.398 luup_log:64: PLEG-64:TriggerCondition:ConnorLightON5Min <0x2bc49680> 06 02/19/14 18:14:57.398 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: None now: ConnorLightON5Min #hooks: 0 upnp: 0 v:0xb730e0/NONE duplicate:0 <0x2bc49680> 06 02/19/14 18:14:57.399 Device_Variable::m_szValue_set device: 64 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1392851695 now: 1392851697 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc49680> 08 02/19/14 18:14:57.399 JobHandler_LuaUPnP::HandleActionRequest device: 64 service: urn:rts-services-com:serviceId:ProgramLogicC action: RunAction <0x2bc49680>

You cannot combine delayed actions that change the dimming level with an action that sets it to zero when you take a peek. The delayed actions cannot be stopped once they’ve been initiated so they will fire and re-trigger the ConnerLightOff condition. This is what is causing the ramping.

Instead of using delayed actions, use a Self-Trigger schedule as a timer. Start the timer in the ConnorLightON5Min action when you turn the lamp on. Then add a term to turn the lamp off when the timer stops.

Something like:

Schedules
Timer5M On: Self-Trigger Off: Interval 5 Minutes

Conditions
ConnorLightOn (ConnorLight == 0) and (MBRFrenchDoorOpen or ConnorDoorOpen)
ConnorLightOff (ConnorLight > 0) and ((!MBRFrenchDoorOpen and (MBRFrenchDoorOpen; !MBRFrenchDoorOpen < 10)) or (!ConnorDoorOpen
and (ConnorDoorOpen; !ConnorDoorOpen < 10)) or (!Timer5M and (ConnerLightOn; !Timer5M)) )

Actions
ConnerLightOn ConnorLight SetLoadLevelTarget newLoadlevelTarget=40
PLEG StartTimer timerName=Timer5M
ConnorLightOff ConnorLight SetLoadLevelTarget newLoadlevelTarget=0

If you must have the dimmer level stepping up, you would need to use a State Variable to allow multiple timer stages. There is explained in PLEG Basics.

I’m trying to wrap my head around this without it exploding. I’ve read, and re-read the PLEG Basics PDF, and am taking baby-steps to get the timer functionality understood.

To keep from waking Connor, I’m now working with my kitchen light using a very basic timer function just to make sure I understand how it works.

[code]Triggers

Name Description State Last True Last False
KitchenLightOn Kitchen Light is turned on true 2014-02-20 23:17:04.877 2014-02-20 23:15:38.167

Schedules

Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last On Last Off
timer1min Self ReTrigger None Interval 60 None false 2014-02-20 23:17:04.890 2014-02-20 23:18:04.100

Conditions

Name Expression State Last True Last False
LightON KitchenLightOn true 2014-02-20 23:17:04.878 2014-02-20 23:15:38.168
AutoOff5Min KitchenLightOn and (KitchenLightOn; !timer1min) false 2014-02-20 23:15:36.820 2014-02-20 23:15:38.169

Actions

Actions for Condition: AutoOff5Min

Immediate

Device Action Arguments
Kitchen Light SetTarget newTargetValue=0

Actions for Condition: LightON

Immediate

Device Action Arguments
Kitchen Light Timer StartTimer timerName=timer1min intervalTime=60
[/code]

I’ve set the 1 min timer, and it triggers as soon as the light is turned on. However, despite it showing TRUE for the initial 60 seconds, when it expires, it does not make the second condition (AutoOff5Min) come true. I’m using essentially the same example as in the PLEG Basic PDF, with the !Timer equating to timer expired.

If I remove the “!”, the AutoOff5Min condition validates immediately when the light is turned on - which you would expect. So, it appears that the !timer1min isn’t equating to timer expiring.

What am I missing?

Once I get this fully under wraps, I’ll start implementing it into the Connor room routine.

Your Condition is missing a vital term. Try:

AutoOff5Min KitchenLightOn and !timer1min and (KitchenLightOn; !timer1min)

Unless you want to be able to restart the timer, as you would if you were using a motion-sensor as a trigger, you can change timer1min to Self Trigger instead of Self ReTrigger. It isn’t hurting anything to leave it as it is, though. Just be aware that it could be restarted if the trigger re-occurs while it is running.

That did the trick. My scenario is that if I turn my kitchen light on, I want it to turn off in one hour. But, if I’m still in the kitchen, and my time is about to expire, I’d like to just toggle the regular wall switch once to get it to come on for another 45 minutes. So I think the self-retrigger is ideal.

But what would be neat is if I could have the light blink off for a second or two, maybe 5 minutes before the timer expires. Kind of like a warning.

Unfortunately, with the way I’ve set this up, no matter how I make the light blink, it’ll restart the timer. Seems to be an either-or situation, unless there’s another logical way to approach it.

In fact, seems that most everything I’m trying to do, I find that one “scene” is always triggering unintended consequences for another. I need to get more practice with ALL of the ways to accomplish a given routine so that I can avoid the conflicts.

But what would be neat is if I could have the light blink off for a second or two, maybe 5 minutes before the timer expires. Kind of like a warning.
This is certainly possible if you are prepared to delve into PLEG's State Variable facility. You can use this in combination with the optional [b]intervalTime[/b] parameter of the [b]StartTimer[/b] action to step through the various stages (states). Essentially you would add an interim state between on and auto-off that fires the warning actions. There is an example of how to use State Variables with a varying timer at the end of PLEG Basics.
In fact, seems that most everything I'm trying to do, I find that one "scene" is always triggering unintended consequences for another. I need to get more practice with ALL of the ways to accomplish a given routine so that I can avoid the conflicts.
It is often difficult to predict all the undesirable scenarios that will happen. Sometimes you just have to wait until they occur and then add some logic to prevent them. ;D