Lights and Motion Sensor

Hi!

I have been searching and trying to get my scene setup using 3 Hue lights and a motion sensor.
What I am trying to achieve is to have the lights come on when motion is detecting motion and if its night. I also want the lights to come on during “Night” when we normally would sleep as guide lights with a low load level. (this I haven’t even started on yet since I am struggling to get the basic one working.

I have 3 conditions:

cAutoOFF_HWU - tHUC1LightOn and tLHUC1 and tLHUC2 and !sTimer_HWU and !tItsNight and (tHUC1LightOn and tLHUC1 and tLHUC2; !sTimer_HWU) and (!tHUC1LightOn and !tLHUC1and !tLHUC2; tHUC1LightOn and tLHUC1 and tLHUC2 > 10)

cAutoOn_HWU1 - !tHUC1LightOn or !tLHUC1 or !tLHUC2 and tItsNight and tHWU_Motion and (!tHUC1LightOn or !tLHUC1 or !tLHUC2; tHWU_Motion > 10)

cKeepOn_HWU - (tHUC1LightOn or tLHUC1 or tLHUC2 and tHWU_Motion and (tHUC1LightOn or tLHUC1 or tLHUC2; tHWU_Motion)) or cAutoOn_HWU1

I have the same config for another light and motion sensor that works perfect but it is only one light so I don’t have the “or” to look at each light.

I am sure I misunderstood the syntax but I can’t get my head around it.

Well mbrihed,

Without delving to far into the logic of the conditions, I’ll say that first you should check out these two subjects according to what I’ve read in the PLEG documentation:

  1. Sequence expressions should not contain expressions (for example: (tHUC1LightOn and tLHUC1 and tLHUC2; !sTimer_HWU)).
  2. NOT has precedence over AND which has precedence over OR (I would advise to check your logic around that and use parenthesis where necessary)