Override lux trigger lighting with manual input


#1

1) Give a description of the problem
(I have a two pistons that trigger a few interior lights when a lux sensor goes above or below a value. I want to have my inputs from my phone, override the piston to either keep said lights on or off)

2) What is the expected behaviour?
(To override my “lux trigger on” and “lux trigger off” pistons with my inputs from my phone)

3) What is happening/not happening?
(If i want only certain lights on or off, the piston will turn the lights on or off respectively. I want to be able to override the piston when toggling lights on or off)

4) Post a Green Snapshot of the pistonimage
(

)

5) Attach logs after turning logging level to Full
(12/16/2019, 2:05:18 PM +258ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2116 with a delay of 85ms
+218ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 3521.525s)
+230ms ╚Event processed successfully (230ms)
12/16/2019, 2:03:43 PM +845ms
+2ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2310 with a delay of 131ms
+274ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 3615.882s)
+290ms ╚Event processed successfully (290ms)
12/16/2019, 2:01:55 PM +854ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2419 with a delay of 133ms
+1075ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 3723.071s)
+1088ms ╚Event processed successfully (1088ms)
12/16/2019, 1:51:57 PM +835ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2515 with a delay of 135ms
+444ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4321.722s)
+456ms ╚Event processed successfully (457ms)
12/16/2019, 1:50:12 PM +350ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2140 with a delay of 133ms
+270ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4427.381s)
+280ms ╚Event processed successfully (280ms)
12/16/2019, 1:49:48 PM +293ms
+2ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 1766 with a delay of 105ms
+1389ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4450.319s)
+1402ms ╚Event processed successfully (1402ms)
12/16/2019, 1:49:00 PM +630ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 1445 with a delay of 132ms
+263ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4499.108s)
+276ms ╚Event processed successfully (275ms)
12/16/2019, 1:48:41 PM +746ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 1530 with a delay of 68ms
+446ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4517.809s)
+457ms ╚Event processed successfully (457ms)
12/16/2019, 1:47:47 PM +789ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 1693 with a delay of 70ms
+208ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4572.004s)
+258ms ╚Event processed successfully (257ms)
12/16/2019, 1:47:41 PM +368ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 1862 with a delay of 135ms
+268ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4578.365s)
+279ms ╚Event processed successfully (279ms)
12/16/2019, 1:47:34 PM +986ms
+2ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2068 with a delay of 149ms
+265ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4584.75s)
+276ms ╚Event processed successfully (276ms)
12/16/2019, 1:47:25 PM +680ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2274 with a delay of 62ms
+1301ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4593.02s)
+1314ms ╚Event processed successfully (1314ms)
12/16/2019, 1:46:45 PM +551ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2503 with a delay of 69ms
+182ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4634.268s)
+194ms ╚Event processed successfully (194ms)
12/16/2019, 1:44:29 PM +182ms
+1ms ╔Received event [Fibaro Motion Sensor ZW5].illuminance = 2649 with a delay of 137ms
+230ms ║Setting up scheduled job for Mon, Dec 16 2019 @ 3:04:00 PM CST (in 4770.589s)
+241ms ╚Event processed successfully (241ms)Preformatted text)


#2

You can create a Simulated Switch called “Override”

Then, in the piston:

IF illuminance drops below X  <-- Trigger
   and
   Override is off            <-- Condition
      Then turn on light
END IF

This way, if Override is off, the piston works as normal… But if you turn on Override, the piston will not touch the light.


#3

Perfect, I’ll do that then. I appreciate the help, I never knew how simulated switches and virtual switches worked until now. Thanks!


#4

If anyone has a similar need for a piston, this works really well. Essentially it turns a number of lights on, unless I override it with the simulated switch “Lux Override Switch”, when the illuminance drops below a value. It then does the opposite, with a one minute buffer to turn the lights off. I believe you could do this with the Weather Station 2.0 virtual device if you don’t have a physical device that reads illuminance, because that states lux values as well.)


#5

Just my two cents:

I would change the SimSwitch to an IF condition, as shown earlier… instead of as “ONLY WHEN”…

My logic is because with ONLY WHEN, it might not schedule properly if the switch is in the wrong position at the last time it ran.

In other words, if the Switch is ON when the piston runs at 2PM, it might not schedule a wakeup at 10:32 the next day, because at that time, the switch invalidates the piston.

If you code this way, it only checks the switch after the trigger fires. (so you will get much more consistent results)


#6

That makes total sense. Changed the piston. So far so good today, thanks again!