1) Give a description of the problem
When one of my camera detects motion, Blue Iris sends a command to fire the piston shown below. What should happen is the piston fires, the lights turn on and the siren sounds, the 5 minute countdown begins, and then the lights turn off after 5 minutes. I temporarily set the variable turnPatioLightsOn to false because Blue Iris was detecting motion when the lights were turned off after 5 minutes and it was firing the piston again. This resulted in an endless loop of On -> Off –> On again. So the variable gets set to false and then I set it to true again once the lights have gone off.
If works fine unless Blue Iris detects motion during the countdown and sends the command to fire the piston. In the first screenshot below you can see the wait counting down. If I step in front of the camera during the countdown, Blue Iris sends the command to fire the piston. But instead of ignoring the command based on the first if statement, the countdown seems to be canceled and the piston finishes without executing any additional commands.
Wait has been executed and I can see it counting down in the trace:
Camera detects motion during the wait, command is sent to fire the piston. Instead of evaluating the first if statement and determining nothing should be done, the immediately piston ends:
2) What is the expected behavior?
If motion is detected during the 5-minute countdown, the piston would be triggered but do nothing because the first if statement should evaluate to false based on the fact turnPatioLightsOn is false.
3) What is happening/not happening?
If the piston is re-triggered during the countdown, it should ignore everything and just continue counting down. Instead the piston says “my work is done here” and stops.
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
There are two logs here. One when the piston is counting down and another showing what happens when motion is detected again during the countdown.
11/25/2017, 11:25:41 AM +911ms
+1ms ╔Received event [Home].execute = [IP Address Redacted] with a delay of 110ms
+150ms ║RunTime Analysis CS > 18ms > PS > 74ms > PE > 58ms > CE
+166ms ║Runtime (43594 bytes) successfully initialized in 74ms (v0.2.0fe.20171109) (164ms)
+167ms ║╔Execution stage started
+182ms ║║Comparison (enum) on is (string) on = true (2ms)
+183ms ║║Condition #21 evaluated true (10ms)
+189ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+190ms ║║Cancelling condition #26’s schedules…
+191ms ║║Condition #26 evaluated false (7ms)
+192ms ║║Cancelling condition #1’s schedules…
+193ms ║║Condition group #1 evaluated false (state changed) (20ms)
+200ms ║║Comparison (boolean) false is (boolean) false = true (2ms)
+201ms ║║Condition #43 evaluated true (6ms)
+202ms ║║Condition group #40 evaluated true (state did not change) (7ms)
+205ms ║║Cancelling statement #41’s schedules…
+212ms ║║Calculating (string) Patio camera detected motion on + (string) Sat, Nov 25 2017 @ 11:25:42 AM MST >> (string) Patio camera detected motion on Sat, Nov 25 2017 @ 11:25:42 AM MST
+215ms ║║Calculating (string) Patio camera detected motion on Sat, Nov 25 2017 @ 11:25:42 AM MST + (string) . >> (string) Patio camera detected motion on Sat, Nov 25 2017 @ 11:25:42 AM MST.
+236ms ║║Executed virtual command sendPushNotification (17ms)
+240ms ║╚Execution stage complete. (74ms)
+241ms ║Setting up scheduled job for Sat, Nov 25 2017 @ 11:27:27 AM MST (in 105.11s)
+260ms ╚Event processed successfully (260ms)
11/25/2017, 11:22:26 AM +876ms
+1ms ╔Received event [Home].execute = [IP Address Redacted] with a delay of 138ms
+137ms ║RunTime Analysis CS > 17ms > PS > 50ms > PE > 70ms > CE
+146ms ║Runtime (43596 bytes) successfully initialized in 50ms (v0.2.0fe.20171109) (145ms)
+147ms ║╔Execution stage started
+161ms ║║Comparison (enum) on is (string) on = true (2ms)
+162ms ║║Condition #21 evaluated true (9ms)
+167ms ║║Comparison (boolean) true is (boolean) true = true (2ms)
+168ms ║║Condition #26 evaluated true (5ms)
+169ms ║║Condition group #1 evaluated true (state did not change) (17ms)
+172ms ║║Cancelling statement #27’s schedules…
+176ms ║║Executed virtual command setVariable (1ms)
+228ms ║║Executed physical command [null].speak([The patio camera has detected motion.]) (45ms)
+229ms ║║Executed [LANnoucer].speak (47ms)
+233ms ║║Executed virtual command [LANnoucer].wait (0ms)
+234ms ║║Requesting a wake up for Sat, Nov 25 2017 @ 11:22:29 AM MST (in 2.0s)
+258ms ║║Executed physical command [Left Most Patio Light].refresh() (17ms)
+259ms ║║Executed [Left Most Patio Light].refresh (18ms)
+278ms ║║Executed physical command [Left Patio Light].refresh() (16ms)
+278ms ║║Executed [Left Patio Light].refresh (17ms)
+297ms ║║Executed physical command [Right Most Patio Light].refresh() (16ms)
+298ms ║║Executed [Right Most Patio Light].refresh (18ms)
+316ms ║║Executed physical command [Right Patio Light].refresh() (15ms)
+317ms ║║Executed [Right Patio Light].refresh (17ms)
+327ms ║║Executed virtual command [Left Most Patio Light].saveStateLocally (7ms)
+335ms ║║Executed virtual command [Left Patio Light].saveStateLocally (6ms)
+343ms ║║Executed virtual command [Right Most Patio Light].saveStateLocally (8ms)
+351ms ║║Executed virtual command [Right Patio Light].saveStateLocally (7ms)
+354ms ║║Executed virtual command [Left Most Patio Light, Left Patio Light, Right Most Patio Light, Right Patio Light].wait (0ms)
+356ms ║║Requesting a wake up for Sat, Nov 25 2017 @ 11:22:27 AM MST (in 0.25s)
+372ms ║║Executed virtual command [Patio Lights].saveStateLocally (6ms)
+376ms ║║Executed virtual command [Patio Lights].wait (1ms)
+377ms ║║Requesting a wake up for Sat, Nov 25 2017 @ 11:22:27 AM MST (in 0.5s)
+381ms ║║Cancelling statement #22’s schedules…
+385ms ║║Executed virtual command wait (0ms)
+386ms ║║Requesting a wake up for Sat, Nov 25 2017 @ 11:27:27 AM MST (in 300.0s)
+391ms ║║Fast executing schedules, waiting for 215ms to sync up
+649ms ║║Executed physical command [Left Most Patio Light].setLevel([50]) (17ms)
+650ms ║║Executed [Left Most Patio Light].setLevel (18ms)
+666ms ║║Executed physical command [Left Patio Light].setLevel([50]) (15ms)
+667ms ║║Executed [Left Patio Light].setLevel (17ms)
+687ms ║║Executed physical command [Right Most Patio Light].setLevel([50]) (19ms)
+687ms ║║Executed [Right Most Patio Light].setLevel (19ms)
+705ms ║║Executed physical command [Right Patio Light].setLevel([50]) (15ms)
+705ms ║║Executed [Right Patio Light].setLevel (17ms)
+709ms ║║Executed virtual command [Left Most Patio Light, Left Patio Light, Right Most Patio Light, Right Patio Light].wait (1ms)
+710ms ║║Requesting a wake up for Sat, Nov 25 2017 @ 11:22:27 AM MST (in 0.3s)
+716ms ║║Fast executing schedules, waiting for 162ms to sync up
+959ms ║║Executed physical command [Patio Lights].setLevel([100]) (59ms)
+960ms ║║Executed [Patio Lights].setLevel (60ms)
+963ms ║║Fast executing schedules, waiting for 48ms to sync up
+1052ms ║║Executed physical command [Left Most Patio Light].setLevel([100]) (19ms)
+1052ms ║║Executed [Left Most Patio Light].setLevel (20ms)
+1074ms ║║Executed physical command [Left Patio Light].setLevel([100]) (20ms)
+1075ms ║║Executed [Left Patio Light].setLevel (21ms)
+1092ms ║║Executed physical command [Right Most Patio Light].setLevel([100]) (16ms)
+1093ms ║║Executed [Right Most Patio Light].setLevel (18ms)
+1100ms ║║Skipped execution of physical command [Right Patio Light].setLevel([100]) because it would make no change to the device. (6ms)
+1100ms ║║Executed [Right Patio Light].setLevel (6ms)
+1104ms ║║Fast executing schedules, waiting for 1131ms to sync up
+2288ms ║║Executed physical command [null].siren() (39ms)
+2289ms ║║Executed [LANnoucer].siren (41ms)
+2292ms ║╚Execution stage complete. (2145ms)
+2294ms ║Setting up scheduled job for Sat, Nov 25 2017 @ 11:27:27 AM MST (in 298.093s)
+2337ms ╚Event processed successfully (2337ms)
Clear Full