Hey guys, trying a simple PLEG to get started. Basically I want to turn lamps on if they are not already on (they’re on a schedule) and if movement is detected. I’ll make it a bit more complex once I get this first bit started?like making sure they only come on at night and turn off after 10 minutes (basically this is a “go to the bathroom in the middle of the night” scene)
What I’ve done is as follows:
Triggers
Name Description
MotionDetected Lounge Motion is tripped
Device Properties
Name Device Name Device Variable
LampsOn Lounge Lamps Status
Conditions
Name Expression
c1 MotionDetected AND (LampsOn=0; NOW)
Actions
Actions for Condition: c1
Immediate
Device Action Arguments
Lounge Lamps SetLoadLevelTarget newLoadlevelTarget=100
Thanks in advance for any assistance!
(LampsOn=0; NOW)
This is illegal syntax … I am not sure what you are trying to accomplish with this.
- There is no = operator … there is an == Operator.
- A Sequence Expression can not reference an expression … LampsOn=0 … Expressions do not have a timestamp … only input variables and conditions have a timestamp.
Maybe you meant:
c1 MotionDetected AND (LampsOn==0)
Thanks Richard, I have altered the condition expression to:
c1 MotionDetected AND (LampsOn==0)
It doesn’t work, and when I run a report it gives me “Error getting status of: LampsOn”
Since the lamps aren’t being turned off (I.e. Status change), I thought I had to put he NOW there somewhere but I’ve obviously misunderstood this. Where should the NOW go?
Thanks for your patience with a newbie?hopefully once I get through the fundamentals it’ll start to make sense to me.
I would have sworn I had, but when I tried it tonight it worked as expected. Thanks for your help!