Help with motion/lights piston


#1

This piston is giving me a few problems and I’m hoping y’all can help me figure it out.

(A) - The piston doesn’t reliably fire. For example, I just went in to the room and nothing happened. Not sure why - this seems pretty straight forward.

(B) - The piston fires with the lights @ 20% and never @ 80%.

© - The piston fires @ 20% outside of SUNSET to SUNRISE. Why?

The piston should work as follows:

  • if [ time is between sunset and sunrise ] AND [ motion detector changes to active ] ; then set ‘is_time = 1’

  • if [ ‘is_time = 1’ ] AND [ time is between sunset and 11:00PM ] AND [ lights are off ] ; then turn the lights on to 80%.

  • if [ ‘is_time = 1’ AND [ time is between 11:00PM and sunrise ] AND [ lights are off ] ; then turn lights on to 20%

  • if [ motion detector changes to inactive ] ; wait 5 minutes, fade out lights.

Thanks, everyone, for the help. I appreciate it.

Lots of logs below.

9/18/2017, 8:32:59 PM +67ms
+1ms	╔Received event [Jarvis].time = 1505781180074 with a delay of -1007ms
+188ms	║RunTime Analysis CS > 29ms > PS > 49ms > PE > 109ms > CE
+199ms	║Runtime (42107 bytes) successfully initialized in 49ms (v0.2.0e7.20170906) (198ms)
+200ms	║╔Execution stage started
+252ms	║║Executed physical command [Hue White - Anne's night table].setLevel([0]) (47ms)
+253ms	║║Fast executing schedules, waiting for 766ms to sync up
+1112ms	║║Executed physical command [Hue White - Jim's night table].setLevel([0]) (87ms)
+1168ms	║║Executed physical command [Hue White - Anne's night table].setLevel([0]) (49ms)
+1234ms	║║Executed physical command [Hue White - Jim's night table].setLevel([0]) (59ms)
+1482ms	║╚Execution stage complete. (1282ms)
+1491ms	╚Event processed successfully (1491ms)
9/18/2017, 8:27:59 PM +800ms
+2ms	╔Received event [Iris Motion Sensor - Master Bedroom].motion = inactive with a delay of 587ms
+158ms	║RunTime Analysis CS > 14ms > PS > 47ms > PE > 97ms > CE
+166ms	║Runtime (42125 bytes) successfully initialized in 47ms (v0.2.0e7.20170906) (164ms)
+166ms	║╔Execution stage started
+208ms	║║Comparison (time) 73679971 is_between (time) 1505776020000 .. (time) 1505731620000 = true (4ms)
+209ms	║║Time restriction check passed
+210ms	║║Condition #6 evaluated true (38ms)
+215ms	║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+216ms	║║Cancelling condition #8's schedules...
+216ms	║║Condition #8 evaluated false (6ms)
+217ms	║║Cancelling condition #7's schedules...
+217ms	║║Condition group #7 evaluated false (state changed) (7ms)
+217ms	║║Cancelling condition #1's schedules...
+218ms	║║Condition group #1 evaluated false (state changed) (47ms)
+219ms	║║Cancelling statement #2's schedules...
+224ms	║║Executed virtual command setVariable (2ms)
+228ms	║║Comparison (boolean) false is (boolean) true = false (1ms)
+229ms	║║Cancelling condition #19's schedules...
+229ms	║║Condition #19 evaluated false (3ms)
+229ms	║║Condition group #16 evaluated false (state did not change) (4ms)
+233ms	║║Comparison (boolean) false is (boolean) true = false (1ms)
+234ms	║║Cancelling condition #27's schedules...
+235ms	║║Condition #27 evaluated false (3ms)
+235ms	║║Condition group #24 evaluated false (state did not change) (4ms)
+241ms	║║Comparison (enum) inactive changes_to (string) inactive = true (0ms)
+242ms	║║Cancelling condition #13's schedules...
+242ms	║║Condition #13 evaluated true (5ms)
+255ms	║║Comparison (integer) 1 is_greater_than (integer) 0 = true (1ms)
+256ms	║║Condition #15 evaluated true (13ms)
+256ms	║║Condition group #14 evaluated true (state did not change) (13ms)
+257ms	║║Cancelling condition #10's schedules...
+257ms	║║Condition group #10 evaluated true (state changed) (20ms)
+259ms	║║Cancelling statement #11's schedules...
+272ms	║║Skipped execution of physical command [Hue White - Anne's night table].setLevel([1]) because it would make no change to the device. (5ms)
+275ms	║║Executed virtual command [Hue White - Anne's night table].fadeLevel (13ms)
+286ms	║║Skipped execution of physical command [Hue White - Jim's night table].setLevel([1]) because it would make no change to the device. (7ms)
+287ms	║║Executed virtual command [Hue White - Jim's night table].fadeLevel (11ms)
+287ms	║║Requesting a wake up for Mon, Sep 18 2017 @ 8:33:00 PM EDT (in 300.1s)
+291ms	║╚Execution stage complete. (125ms)
+293ms	║Setting up scheduled job for Mon, Sep 18 2017 @ 8:33:00 PM EDT (in 299.982s), with 4 more jobs pending
+338ms	╚Event processed successfully (338ms)
9/18/2017, 8:27:28 PM +478ms
+2ms	╔Received event [Iris Motion Sensor - Master Bedroom].motion = active with a delay of 228ms
+166ms	║RunTime Analysis CS > 14ms > PS > 52ms > PE > 100ms > CE
+177ms	║Runtime (42129 bytes) successfully initialized in 52ms (v0.2.0e7.20170906) (175ms)
+178ms	║╔Execution stage started
+221ms	║║Comparison (time) 73648661 is_between (time) 1505776020000 .. (time) 1505731620000 = true (4ms)
+221ms	║║Time restriction check passed
+222ms	║║Condition #6 evaluated true (39ms)
+228ms	║║Comparison (enum) active changes_to (string) active = true (1ms)
+228ms	║║Cancelling condition #8's schedules...
+229ms	║║Condition #8 evaluated true (6ms)
+229ms	║║Cancelling condition #7's schedules...
+230ms	║║Condition group #7 evaluated true (state changed) (8ms)
+230ms	║║Cancelling condition #1's schedules...
+231ms	║║Condition group #1 evaluated true (state changed) (48ms)
+232ms	║║Cancelling statement #4's schedules...
+237ms	║║Executed virtual command setVariable (3ms)
+242ms	║║Comparison (boolean) true is (boolean) true = true (1ms)
+243ms	║║Cancelling condition #19's schedules...
+243ms	║║Condition #19 evaluated true (4ms)
+249ms	║║Comparison (time) 73648722 is_between (time) 1505776020000 .. (time) 82800000 = true (4ms)
+250ms	║║Time restriction check passed
+251ms	║║Condition #21 evaluated true (7ms)
+265ms	║║Comparison (integer) 1 is_equal_to (integer) 0 = false (1ms)
+266ms	║║Comparison (integer) 1 is_equal_to (integer) 0 = false (1ms)
+267ms	║║Condition #23 evaluated false (16ms)
+268ms	║║Condition group #22 evaluated false (state did not change) (17ms)
+268ms	║║Condition group #20 evaluated false (state did not change) (25ms)
+269ms	║║Condition group #16 evaluated false (state did not change) (30ms)
+273ms	║║Comparison (boolean) true is (boolean) true = true (1ms)
+274ms	║║Cancelling condition #27's schedules...
+274ms	║║Condition #27 evaluated true (4ms)
+280ms	║║Comparison (time) 73648753 is_between (time) 82800000 .. (time) 1505731620000 = false (4ms)
+281ms	║║Condition #29 evaluated false (6ms)
+282ms	║║Condition group #28 evaluated false (state did not change) (8ms)
+282ms	║║Condition group #24 evaluated false (state did not change) (12ms)
+289ms	║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+289ms	║║Cancelling condition #13's schedules...
+290ms	║║Condition #13 evaluated false (6ms)
+290ms	║║Cancelling condition #10's schedules...
+291ms	║║Condition group #10 evaluated false (state changed) (6ms)
+294ms	║╚Execution stage complete. (116ms)
+301ms	╚Event processed successfully (301ms)
9/18/2017, 8:26:59 PM +453ms
+1ms	╔Received event [Iris Motion Sensor - Master Bedroom].motion = inactive with a delay of 226ms
+150ms	║RunTime Analysis CS > 9ms > PS > 47ms > PE > 93ms > CE
+158ms	║Runtime (42124 bytes) successfully initialized in 47ms (v0.2.0e7.20170906) (157ms)
+159ms	║╔Execution stage started
+196ms	║║Comparison (time) 73619616 is_between (time) 1505776020000 .. (time) 1505731620000 = true (5ms)
+196ms	║║Time restriction check passed
+197ms	║║Condition #6 evaluated true (34ms)
+201ms	║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+202ms	║║Cancelling condition #8's schedules...
+202ms	║║Condition #8 evaluated false (4ms)
+203ms	║║Cancelling condition #7's schedules...
+203ms	║║Condition group #7 evaluated false (state changed) (5ms)
+203ms	║║Cancelling condition #1's schedules...
+204ms	║║Condition group #1 evaluated false (state changed) (42ms)
+205ms	║║Cancelling statement #2's schedules...
+210ms	║║Executed virtual command setVariable (2ms)
+214ms	║║Comparison (boolean) false is (boolean) true = false (1ms)
+215ms	║║Cancelling condition #19's schedules...
+215ms	║║Condition #19 evaluated false (3ms)
+216ms	║║Condition group #16 evaluated false (state did not change) (4ms)
+326ms	║║Comparison (boolean) false is (boolean) true = false (1ms)
+327ms	║║Cancelling condition #27's schedules...
+327ms	║║Condition #27 evaluated false (109ms)
+328ms	║║Condition group #24 evaluated false (state did not change) (111ms)
+334ms	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+335ms	║║Cancelling condition #13's schedules...
+336ms	║║Condition #13 evaluated true (6ms)
+348ms	║║Comparison (integer) 1 is_greater_than (integer) 0 = true (0ms)
+348ms	║║Condition #15 evaluated true (11ms)
+349ms	║║Condition group #14 evaluated true (state did not change) (12ms)
+350ms	║║Cancelling condition #10's schedules...
+350ms	║║Condition group #10 evaluated true (state changed) (20ms)
+352ms	║║Cancelling statement #11's schedules...
+390ms	║║Executed physical command [Hue White - Anne's night table].setLevel([1]) (31ms)
+391ms	║║Executed virtual command [Hue White - Anne's night table].fadeLevel (36ms)
+424ms	║║Executed physical command [Hue White - Jim's night table].setLevel([1]) (30ms)
+426ms	║║Executed virtual command [Hue White - Jim's night table].fadeLevel (35ms)
+427ms	║║Requesting a wake up for Mon, Sep 18 2017 @ 8:31:59 PM EDT (in 300.1s)
+431ms	║╚Execution stage complete. (273ms)
+432ms	║Setting up scheduled job for Mon, Sep 18 2017 @ 8:31:59 PM EDT (in 299.958s), with 4 more jobs pending
+448ms	╚Event processed successfully (448ms)
9/18/2017, 8:25:56 PM +803ms
+1ms	╔Received event [Iris Motion Sensor - Master Bedroom].motion = active with a delay of 531ms
+153ms	║RunTime Analysis CS > 13ms > PS > 39ms > PE > 100ms > CE
+160ms	║Runtime (42129 bytes) successfully initialized in 39ms (v0.2.0e7.20170906) (159ms)
+160ms	║╔Execution stage started
+202ms	║║Comparison (time) 73556968 is_between (time) 1505776020000 .. (time) 1505731620000 = true (5ms)
+202ms	║║Time restriction check passed
+203ms	║║Condition #6 evaluated true (38ms)
+208ms	║║Comparison (enum) active changes_to (string) active = true (1ms)
+209ms	║║Cancelling condition #8's schedules...
+209ms	║║Condition #8 evaluated true (5ms)
+210ms	║║Cancelling condition #7's schedules...
+210ms	║║Condition group #7 evaluated true (state changed) (6ms)
+211ms	║║Cancelling condition #1's schedules...
+211ms	║║Condition group #1 evaluated true (state changed) (46ms)
+213ms	║║Cancelling statement #4's schedules...
+218ms	║║Executed virtual command setVariable (3ms)
+222ms	║║Comparison (boolean) true is (boolean) true = true (1ms)
+223ms	║║Cancelling condition #19's schedules...
+223ms	║║Condition #19 evaluated true (3ms)
+230ms	║║Comparison (time) 73557027 is_between (time) 1505776020000 .. (time) 82800000 = true (4ms)
+230ms	║║Time restriction check passed
+231ms	║║Condition #21 evaluated true (7ms)
+242ms	║║Comparison (integer) 1 is_equal_to (integer) 0 = false (1ms)
+244ms	║║Comparison (integer) 1 is_equal_to (integer) 0 = false (0ms)
+244ms	║║Condition #23 evaluated false (12ms)
+245ms	║║Condition group #22 evaluated false (state did not change) (13ms)
+245ms	║║Condition group #20 evaluated false (state did not change) (21ms)
+246ms	║║Condition group #16 evaluated false (state did not change) (27ms)
+250ms	║║Comparison (boolean) true is (boolean) true = true (1ms)
+251ms	║║Cancelling condition #27's schedules...
+251ms	║║Condition #27 evaluated true (3ms)
+258ms	║║Comparison (time) 73557055 is_between (time) 82800000 .. (time) 1505731620000 = false (4ms)
+259ms	║║Condition #29 evaluated false (7ms)
+259ms	║║Condition group #28 evaluated false (state did not change) (7ms)
+260ms	║║Condition group #24 evaluated false (state did not change) (13ms)
+266ms	║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+266ms	║║Cancelling condition #13's schedules...
+267ms	║║Condition #13 evaluated false (5ms)
+267ms	║║Cancelling condition #10's schedules...
+268ms	║║Condition group #10 evaluated false (state changed) (7ms)
+269ms	║╚Execution stage complete. (109ms)
+275ms	╚Event processed successfully (275ms)

#2

Instead of checking the dimmers to be at 0% try checking if the switch is off instead

Edit: one thing to note is that anytime you’re motion goes inactive and your lights are on they will fade to off in 5 minutes no matter what time of day


#3

Thanks for the heads up on the “switch” as opposed to guessing based on level. I’ve made the change and I’ll find out tonight how that works.

I have the other issue of the piston firing at weird times (like during the day) - I just found that the webCoRE console seems to think it’s night time. Did I do something that caused that? If so, where do I undo it?

Night Mode


#4

Not quite sure I know what you mean. But make sure your location is properly set in the ST IDE. You should be able to move you pin around in the ST app settings on your phone. Save it. Move it back and save.


#5

I checked and double checked. Location is fine - and I’m pretty sure “Night” mode wouldn’t necessarily affect time based automations.

What’s causing the lights to come on @ 20% during the day? I’ve been over the code more than a few times - but I’m open to the idea that I’m missing it because I’m seeing what I expect to see, not what’s actually there.


#6

Do you have any logs. Also can you post up the current photo of the piston you are using.

The night is your current location mode. Not necessarily the time


#7

See below. Thanks so much for the help. It is really appreciated. Also - the lights just came on - and while it was CLOSE to sunset, it hadn’t yet arrived.

Edit: Good news is that the lights came up to the programmed 80% immediately after sunset.

Piston:

Logs:
9/19/2017, 7:02:59 PM +758ms
+1ms ╔Received event [Iris Motion Sensor - Master Bedroom].motion = inactive with a delay of 1025ms
+256ms ║RunTime Analysis CS > 17ms > PS > 39ms > PE > 200ms > CE
+266ms ║Runtime (42424 bytes) successfully initialized in 39ms (v0.2.0e8.20170918) (263ms)
+266ms ║╔Execution stage started
+305ms ║║Comparison (time) 68580028 is_between (time) 1505862360000 … (time) 1505818080000 = false (4ms)
+307ms ║║Condition #6 evaluated false (36ms)
+307ms ║║Condition group #1 evaluated false (state did not change) (37ms)
+309ms ║║Cancelling statement #2’s schedules…
+313ms ║║Executed virtual command setVariable (3ms)
+317ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+318ms ║║Condition #19 evaluated false (3ms)
+318ms ║║Condition group #16 evaluated false (state did not change) (3ms)
+322ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+323ms ║║Condition #27 evaluated false (3ms)
+323ms ║║Condition group #24 evaluated false (state did not change) (3ms)
+329ms ║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+330ms ║║Cancelling condition #13’s schedules…
+330ms ║║Condition #13 evaluated true (5ms)
+341ms ║║Comparison (integer) 1 is_greater_than (integer) 0 = true (1ms)
+342ms ║║Condition #15 evaluated true (11ms)
+342ms ║║Condition group #14 evaluated true (state did not change) (12ms)
+343ms ║║Cancelling condition #10’s schedules…
+343ms ║║Condition group #10 evaluated true (state changed) (18ms)
+344ms ║║Cancelling statement #11’s schedules…
+363ms ║║Skipped execution of physical command [Hue White - Anne’s night table].setLevel([1]) because it would make no change to the device. (11ms)
+364ms ║║Executed virtual command [Hue White - Anne’s night table].fadeLevel (17ms)
+373ms ║║Skipped execution of physical command [Hue White - Jim’s night table].setLevel([1]) because it would make no change to the device. (6ms)
+374ms ║║Executed virtual command [Hue White - Jim’s night table].fadeLevel (10ms)
+375ms ║║Requesting a wake up for Tue, Sep 19 2017 @ 7:08:00 PM EDT (in 300.1s)
+378ms ║╚Execution stage complete. (112ms)
+380ms ║Setting up scheduled job for Tue, Sep 19 2017 @ 7:08:00 PM EDT (in 299.984s), with 4 more jobs pending
+395ms ╚Event processed successfully (395ms)
9/19/2017, 7:01:47 PM +272ms
+1ms ╔Received event [Iris Motion Sensor - Master Bedroom].motion = active with a delay of 1038ms
+165ms ║RunTime Analysis CS > 20ms > PS > 50ms > PE > 95ms > CE
+176ms ║Runtime (42418 bytes) successfully initialized in 50ms (v0.2.0e8.20170918) (174ms)
+176ms ║╔Execution stage started
+219ms ║║Comparison (time) 68507453 is_between (time) 1505862360000 … (time) 1505818080000 = false (4ms)
+220ms ║║Condition #6 evaluated false (38ms)
+220ms ║║Condition group #1 evaluated false (state did not change) (39ms)
+222ms ║║Cancelling statement #2’s schedules…
+226ms ║║Executed virtual command setVariable (3ms)
+230ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+231ms ║║Condition #19 evaluated false (3ms)
+231ms ║║Condition group #16 evaluated false (state did not change) (3ms)
+235ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+236ms ║║Condition #27 evaluated false (3ms)
+237ms ║║Condition group #24 evaluated false (state did not change) (4ms)
+243ms ║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+244ms ║║Cancelling condition #13’s schedules…
+244ms ║║Condition #13 evaluated false (6ms)
+245ms ║║Cancelling condition #10’s schedules…
+245ms ║║Condition group #10 evaluated false (state changed) (7ms)
+248ms ║╚Execution stage complete. (71ms)
+253ms ╚Event processed successfully (253ms)
9/19/2017, 7:01:32 PM +352ms
+1ms ╔Received event [Iris Motion Sensor - Master Bedroom].motion = inactive with a delay of 1034ms
+161ms ║RunTime Analysis CS > 19ms > PS > 49ms > PE > 94ms > CE
+168ms ║Runtime (42423 bytes) successfully initialized in 49ms (v0.2.0e8.20170918) (166ms)
+169ms ║╔Execution stage started
+210ms ║║Comparison (time) 68492525 is_between (time) 1505862360000 … (time) 1505818080000 = false (5ms)
+211ms ║║Condition #6 evaluated false (38ms)
+211ms ║║Condition group #1 evaluated false (state did not change) (38ms)
+213ms ║║Cancelling statement #2’s schedules…
+409ms ║║Executed virtual command setVariable (195ms)
+413ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+414ms ║║Condition #19 evaluated false (3ms)
+414ms ║║Condition group #16 evaluated false (state did not change) (3ms)
+418ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+419ms ║║Condition #27 evaluated false (3ms)
+419ms ║║Condition group #24 evaluated false (state did not change) (3ms)
+426ms ║║Comparison (enum) inactive changes_to (string) inactive = true (0ms)
+426ms ║║Cancelling condition #13’s schedules…
+427ms ║║Condition #13 evaluated true (6ms)
+438ms ║║Comparison (integer) 1 is_greater_than (integer) 0 = true (1ms)
+439ms ║║Condition #15 evaluated true (12ms)
+440ms ║║Condition group #14 evaluated true (state did not change) (12ms)
+440ms ║║Cancelling condition #10’s schedules…
+440ms ║║Condition group #10 evaluated true (state changed) (19ms)
+442ms ║║Cancelling statement #11’s schedules…
+457ms ║║Skipped execution of physical command [Hue White - Anne’s night table].setLevel([1]) because it would make no change to the device. (6ms)
+458ms ║║Executed virtual command [Hue White - Anne’s night table].fadeLevel (13ms)
+471ms ║║Skipped execution of physical command [Hue White - Jim’s night table].setLevel([1]) because it would make no change to the device. (5ms)
+472ms ║║Executed virtual command [Hue White - Jim’s night table].fadeLevel (14ms)
+473ms ║║Requesting a wake up for Tue, Sep 19 2017 @ 7:06:32 PM EDT (in 300.1s)
+476ms ║╚Execution stage complete. (307ms)
+478ms ║Setting up scheduled job for Tue, Sep 19 2017 @ 7:06:32 PM EDT (in 299.98s), with 4 more jobs pending
+492ms ╚Event processed successfully (492ms)
9/19/2017, 7:00:00 PM +280ms
+1ms ╔Received event [Iris Motion Sensor - Master Bedroom].motion = active with a delay of 1027ms
+142ms ║RunTime Analysis CS > 16ms > PS > 29ms > PE > 96ms > CE
+152ms ║Runtime (42418 bytes) successfully initialized in 29ms (v0.2.0e8.20170918) (151ms)
+153ms ║╔Execution stage started
+193ms ║║Comparison (time) 68400437 is_between (time) 1505862360000 … (time) 1505818080000 = false (4ms)
+194ms ║║Condition #6 evaluated false (37ms)
+194ms ║║Condition group #1 evaluated false (state did not change) (38ms)
+195ms ║║Cancelling statement #2’s schedules…
+199ms ║║Executed virtual command setVariable (2ms)
+204ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+205ms ║║Condition #19 evaluated false (2ms)
+205ms ║║Condition group #16 evaluated false (state did not change) (4ms)
+209ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+210ms ║║Condition #27 evaluated false (3ms)
+210ms ║║Condition group #24 evaluated false (state did not change) (4ms)
+215ms ║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+216ms ║║Cancelling condition #13’s schedules…
+216ms ║║Condition #13 evaluated false (4ms)
+217ms ║║Cancelling condition #10’s schedules…
+217ms ║║Condition group #10 evaluated false (state changed) (5ms)
+219ms ║╚Execution stage complete. (66ms)
+225ms ╚Event processed successfully (225ms)
9/19/2017, 6:59:39 PM +790ms
+1ms ╔Received event [Iris Motion Sensor - Master Bedroom].motion = inactive with a delay of 1069ms
+164ms ║RunTime Analysis CS > 22ms > PS > 47ms > PE > 95ms > CE
+172ms ║Runtime (42423 bytes) successfully initialized in 47ms (v0.2.0e8.20170918) (170ms)
+173ms ║╔Execution stage started
+345ms ║║Comparison (time) 68379968 is_between (time) 1505862360000 … (time) 1505818080000 = false (5ms)
+346ms ║║Condition #6 evaluated false (169ms)
+346ms ║║Condition group #1 evaluated false (state did not change) (169ms)
+348ms ║║Cancelling statement #2’s schedules…
+353ms ║║Executed virtual command setVariable (2ms)
+357ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+358ms ║║Condition #19 evaluated false (3ms)
+358ms ║║Condition group #16 evaluated false (state did not change) (4ms)
+362ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+363ms ║║Condition #27 evaluated false (3ms)
+363ms ║║Condition group #24 evaluated false (state did not change) (3ms)
+370ms ║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+371ms ║║Cancelling condition #13’s schedules…
+371ms ║║Condition #13 evaluated true (6ms)
+384ms ║║Comparison (integer) 1 is_greater_than (integer) 0 = true (1ms)
+385ms ║║Condition #15 evaluated true (13ms)
+385ms ║║Condition group #14 evaluated true (state did not change) (13ms)
+386ms ║║Cancelling condition #10’s schedules…
+387ms ║║Condition group #10 evaluated true (state changed) (21ms)
+388ms ║║Cancelling statement #11’s schedules…
+439ms ║║Executed physical command [Hue White - Anne’s night table].setLevel([1]) (45ms)
+440ms ║║Executed virtual command [Hue White - Anne’s night table].fadeLevel (48ms)
+482ms ║║Executed physical command [Hue White - Jim’s night table].setLevel([1]) (40ms)
+483ms ║║Executed virtual command [Hue White - Jim’s night table].fadeLevel (43ms)
+483ms ║║Requesting a wake up for Tue, Sep 19 2017 @ 7:04:40 PM EDT (in 300.1s)
+487ms ║╚Execution stage complete. (314ms)
+489ms ║Setting up scheduled job for Tue, Sep 19 2017 @ 7:04:40 PM EDT (in 299.951s), with 4 more jobs pending
+570ms ╚Event processed successfully (569ms)
9/19/2017, 6:59:01 PM +918ms
+1ms ╔Received event [Iris Motion Sensor - Master Bedroom].motion = active with a delay of 410ms
+158ms ║RunTime Analysis CS > 30ms > PS > 38ms > PE > 89ms > CE
+164ms ║Runtime (42417 bytes) successfully initialized in 38ms (v0.2.0e8.20170918) (162ms)
+165ms ║╔Execution stage started
+207ms ║║Comparison (time) 68342087 is_between (time) 1505862360000 … (time) 1505818080000 = false (6ms)
+208ms ║║Condition #6 evaluated false (39ms)
+208ms ║║Condition group #1 evaluated false (state did not change) (39ms)
+210ms ║║Cancelling statement #2’s schedules…
+216ms ║║Executed virtual command setVariable (3ms)
+220ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+221ms ║║Condition #19 evaluated false (3ms)
+221ms ║║Condition group #16 evaluated false (state did not change) (3ms)
+225ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+225ms ║║Condition #27 evaluated false (2ms)
+226ms ║║Condition group #24 evaluated false (state did not change) (3ms)
+231ms ║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+232ms ║║Cancelling condition #13’s schedules…
+232ms ║║Condition #13 evaluated false (5ms)
+233ms ║║Cancelling condition #10’s schedules…
+233ms ║║Condition group #10 evaluated false (state changed) (6ms)
+234ms ║╚Execution stage complete. (69ms)
+240ms ╚Event processed successfully (240ms)


#8

Make sure the trace toggle is on. It will help visually identify the flow of your piston.

image


#9

Also all those logs are showing that Time between sunset was false. So any lights that came on were a result of your If statement on line 68. As noted above having trace enabled will help you visually see what is going on in the piston during evaluation. Blue bar means some event caused evaluation. Green means it evaluated true. Red means it evaluated false. And if the bar remains grey then it did not evaluate that at all.


#10

Trace is now enabled. I must have turned it off inadvertently.

re: the “if” statement @ 68 - that turns lights off, not on. Or am I missing something?

Regardless, I’ll sit tight and wait for tomorrow morning - this time with Trace on.

Thanks again for the help. Really do appreciate it.


#11

Even when lights are off they still are still set a the level of whatever they turned off as. This is why I steered you away from checking the level and more towards the switch state.

So to test this. I created this piston. If time is any then fade my office lights to 0% over 10 seconds. I like to use time is any because I can just hit the test button and let it run! Anyway, the office lights were off. Pressed test and they came on then started to fade. Even after the action completed the first time pressing it again brought my lights up and then proceeded to fade.

So without some type of condition attached to that if statement on line 68 it will always turn your lights on and then fade them over the next 5 minutes.

Also this piston from post 2 was a revamped version of yours. Cleaned it up and ditched the variable.