Holiday lights color rotate


#1

1) Give a description of the problem
Trying to create a “holiday lights” piston, similar to bangali’s holiday lights piston, that rotates between colors, but behaves somewhat differently. I’m having trouble getting the basic “twinkle” effect I’m going for.

2) What is the expected behavior?
Each light should turn on to a random color in the list, then wait between 1 and 3 seconds, and then change to a new color in the list. Repeat this behavior for as long as the virtual switch is on. This should result in a “color twinkle” effect.

3) What is happening/not happening?
It mostly works as expected, except each light sometimes turns off instead of switching to another color. Also sometimes the lights are dimmer than expected. I’d also like to make sure each light chooses a NEW color each time. I.e., if the light is currently blue, then next time, only choose between red and white – don’t choose blue again. This is not currently implemented.

**4) Post a Green Snapshot of the piston

5) Attach any logs (From ST IDE and by turning logging level to Full)
2/3/2018, 9:07:56 PM +477ms
+1ms ╔Received event [Home].time = 1517717276221 with a delay of 256ms
+216ms ║RunTime Analysis CS > 22ms > PS > 65ms > PE > 129ms > CE
+220ms ║Runtime (42145 bytes) successfully initialized in 65ms (v0.2.102.20180116) (218ms)
+222ms ║╔Execution stage started
+224ms ║╚Execution stage complete. (2ms)
+226ms ╚Event processed successfully (226ms)
2/3/2018, 9:07:55 PM +987ms
+1ms ╔Received event [Holiday Lights].switch = off with a delay of 101ms
+187ms ║RunTime Analysis CS > 17ms > PS > 92ms > PE > 78ms > CE
+190ms ║Runtime (42140 bytes) successfully initialized in 92ms (v0.2.102.20180116) (188ms)
+191ms ║╔Execution stage started
+195ms ║║Cancelling statement #5’s schedules…
+201ms ║║Executed virtual command setVariable (4ms)
+210ms ║║Comparison (boolean) true is (boolean) false = false (2ms)
+211ms ║║Condition #11 evaluated false (8ms)
+212ms ║║Condition group #8 evaluated false (state did not change) (9ms)
+218ms ║║Comparison (enum) off changes_to (string) on = false (1ms)
+219ms ║║Cancelling condition #19’s schedules…
+220ms ║║Condition #19 evaluated false (6ms)
+221ms ║║Cancelling condition #18’s schedules…
+221ms ║║Condition group #18 evaluated false (state changed) (7ms)
+223ms ║╚Execution stage complete. (33ms)
+224ms ╚Event processed successfully (224ms)
2/3/2018, 9:07:44 PM +438ms
+1ms ╔Received event [Home].time = 1517717265571 with a delay of -1133ms
+235ms ║RunTime Analysis CS > 27ms > PS > 104ms > PE > 104ms > CE
+238ms ║Runtime (42143 bytes) successfully initialized in 104ms (v0.2.102.20180116) (236ms)
+240ms ║╔Execution stage started
+292ms ║║Executed virtual command setVariable (4ms)
+298ms ║║Cancelling statement #22’s schedules…
+326ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (13ms)
+327ms ║║Executed [Hue color 1 (Stair Display)].setColor (16ms)
+338ms ║║Cancelling statement #30’s schedules…
+345ms ║║Executed virtual command waitRandom (1ms)
+346ms ║║Waiting for 1928ms
+2284ms ║║Executed virtual command setVariable (4ms)
+2289ms ║║Cancelling statement #22’s schedules…
+2311ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (10ms)
+2313ms ║║Executed [Hue color 2 (Stair Display)].setColor (12ms)
+2322ms ║║Cancelling statement #30’s schedules…
+2328ms ║║Executed virtual command waitRandom (1ms)
+2329ms ║║Waiting for 1125ms
+3464ms ║║Executed virtual command setVariable (4ms)
+3468ms ║║Cancelling statement #22’s schedules…
+3491ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #000000, hue:0, saturation:0, level:0]]) (11ms)
+3492ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (13ms)
+3507ms ║║Comparison (enum) on is (string) on = true (2ms)
+3509ms ║║Condition #26 evaluated true (13ms)
+3510ms ║║Condition group #20 evaluated true (state did not change) (15ms)
+3520ms ║║Cancelling statement #30’s schedules…
+3526ms ║║Executed virtual command waitRandom (0ms)
+3527ms ║║Waiting for 1171ms
+4708ms ║║Executed virtual command setVariable (3ms)
+4712ms ║║Cancelling statement #22’s schedules…
+4729ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (7ms)
+4730ms ║║Executed [Hue color 1 (Stair Display)].setColor (9ms)
+4742ms ║║Cancelling statement #30’s schedules…
+4749ms ║║Executed virtual command waitRandom (1ms)
+4750ms ║║Waiting for 1504ms
+6264ms ║║Executed virtual command setVariable (4ms)
+6269ms ║║Cancelling statement #22’s schedules…
+6288ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (7ms)
+6289ms ║║Executed [Hue color 2 (Stair Display)].setColor (10ms)
+6299ms ║║Cancelling statement #30’s schedules…
+6305ms ║║Executed virtual command waitRandom (1ms)
+6306ms ║║Waiting for 1967ms
+8285ms ║║Executed virtual command setVariable (3ms)
+8290ms ║║Cancelling statement #22’s schedules…
+8312ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #000000, hue:0, saturation:0, level:0]]) (8ms)
+8313ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (11ms)
+8331ms ║║Comparison (enum) on is (string) on = true (3ms)
+8333ms ║║Condition #26 evaluated true (15ms)
+8335ms ║║Condition group #20 evaluated true (state did not change) (18ms)
+8347ms ║║Cancelling statement #30’s schedules…
+8355ms ║║Executed virtual command waitRandom (0ms)
+8356ms ║║Waiting for 1162ms
+9528ms ║║Executed virtual command setVariable (4ms)
+9532ms ║║Cancelling statement #22’s schedules…
+9548ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (6ms)
+9549ms ║║Executed [Hue color 1 (Stair Display)].setColor (8ms)
+9558ms ║║Cancelling statement #30’s schedules…
+9564ms ║║Executed virtual command waitRandom (0ms)
+9565ms ║║Requesting a wake up for Sat, Feb 3 2018 @ 9:07:56 PM MST (in 2.217s)
+9572ms ║╚Execution stage complete. (9333ms)
+9574ms ║Setting up scheduled job for Sat, Feb 3 2018 @ 9:07:56 PM MST (in 2.21s)
+9581ms ╚Event processed successfully (9581ms)
2/3/2018, 9:07:34 PM +394ms
+0ms ╔Received event [Home].time = 1517717254807 with a delay of -414ms
+380ms ║RunTime Analysis CS > 19ms > PS > 288ms > PE > 74ms > CE
+383ms ║Runtime (42141 bytes) successfully initialized in 288ms (v0.2.102.20180116) (382ms)
+384ms ║╔Execution stage started
+421ms ║║Executed virtual command setVariable (3ms)
+440ms ║║Cancelling statement #22’s schedules…
+461ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (11ms)
+462ms ║║Executed [Hue color 2 (Stair Display)].setColor (13ms)
+469ms ║║Cancelling statement #30’s schedules…
+474ms ║║Executed virtual command waitRandom (1ms)
+477ms ║║Waiting for 2191ms
+2677ms ║║Executed virtual command setVariable (3ms)
+2680ms ║║Cancelling statement #22’s schedules…
+2701ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (11ms)
+2702ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (12ms)
+2716ms ║║Comparison (enum) on is (string) on = true (3ms)
+2718ms ║║Condition #26 evaluated true (13ms)
+2719ms ║║Condition group #20 evaluated true (state did not change) (15ms)
+2728ms ║║Cancelling statement #30’s schedules…
+2732ms ║║Executed virtual command waitRandom (1ms)
+2734ms ║║Waiting for 2432ms
+5174ms ║║Executed virtual command setVariable (3ms)
+5178ms ║║Cancelling statement #22’s schedules…
+5198ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (10ms)
+5199ms ║║Executed [Hue color 1 (Stair Display)].setColor (12ms)
+5207ms ║║Cancelling statement #30’s schedules…
+5212ms ║║Executed virtual command waitRandom (1ms)
+5213ms ║║Waiting for 2063ms
+7284ms ║║Executed virtual command setVariable (3ms)
+7287ms ║║Cancelling statement #22’s schedules…
+7301ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (6ms)
+7302ms ║║Executed [Hue color 2 (Stair Display)].setColor (8ms)
+7310ms ║║Cancelling statement #30’s schedules…
+7315ms ║║Executed virtual command waitRandom (1ms)
+7316ms ║║Waiting for 1184ms
+8510ms ║║Executed virtual command setVariable (4ms)
+8514ms ║║Cancelling statement #22’s schedules…
+8529ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (7ms)
+8530ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (9ms)
+8542ms ║║Comparison (enum) on is (string) on = true (2ms)
+8543ms ║║Condition #26 evaluated true (10ms)
+8545ms ║║Condition group #20 evaluated true (state did not change) (11ms)
+8553ms ║║Cancelling statement #30’s schedules…
+8558ms ║║Executed virtual command waitRandom (1ms)
+8559ms ║║Requesting a wake up for Sat, Feb 3 2018 @ 9:07:45 PM MST (in 2.617s)
+8565ms ║╚Execution stage complete. (8181ms)
+8567ms ║Setting up scheduled job for Sat, Feb 3 2018 @ 9:07:45 PM MST (in 2.611s)
+8576ms ╚Event processed successfully (8577ms)
2/3/2018, 9:07:22 PM +444ms
+1ms ╔Received event [Home].time = 1517717243355 with a delay of -911ms
+186ms ║RunTime Analysis CS > 25ms > PS > 96ms > PE > 65ms > CE
+189ms ║Runtime (42139 bytes) successfully initialized in 96ms (v0.2.102.20180116) (187ms)
+190ms ║╔Execution stage started
+229ms ║║Executed virtual command setVariable (3ms)
+233ms ║║Cancelling statement #22’s schedules…
+253ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (11ms)
+253ms ║║Executed [Hue color 2 (Stair Display)].setColor (12ms)
+261ms ║║Cancelling statement #30’s schedules…
+265ms ║║Executed virtual command waitRandom (1ms)
+266ms ║║Waiting for 2628ms
+2902ms ║║Executed virtual command setVariable (3ms)
+2906ms ║║Cancelling statement #22’s schedules…
+2930ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (11ms)
+2931ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (13ms)
+2946ms ║║Comparison (enum) on is (string) on = true (1ms)
+2947ms ║║Condition #26 evaluated true (13ms)
+2949ms ║║Condition group #20 evaluated true (state did not change) (14ms)
+2958ms ║║Cancelling statement #30’s schedules…
+2963ms ║║Executed virtual command waitRandom (1ms)
+2964ms ║║Waiting for 1269ms
+4241ms ║║Executed virtual command setVariable (2ms)
+4244ms ║║Cancelling statement #22’s schedules…
+4262ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (10ms)
+4263ms ║║Executed [Hue color 1 (Stair Display)].setColor (12ms)
+4270ms ║║Cancelling statement #30’s schedules…
+4275ms ║║Executed virtual command waitRandom (0ms)
+4275ms ║║Waiting for 2098ms
+6381ms ║║Executed virtual command setVariable (3ms)
+6384ms ║║Cancelling statement #22’s schedules…
+6397ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (6ms)
+6398ms ║║Executed [Hue color 2 (Stair Display)].setColor (8ms)
+6406ms ║║Cancelling statement #30’s schedules…
+6410ms ║║Executed virtual command waitRandom (1ms)
+6411ms ║║Waiting for 1902ms
+8323ms ║║Executed virtual command setVariable (4ms)
+8327ms ║║Cancelling statement #22’s schedules…
+8349ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (7ms)
+8350ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (9ms)
+8364ms ║║Comparison (enum) on is (string) on = true (2ms)
+8366ms ║║Condition #26 evaluated true (13ms)
+8367ms ║║Condition group #20 evaluated true (state did not change) (14ms)
+8377ms ║║Cancelling statement #30’s schedules…
+8383ms ║║Executed virtual command waitRandom (1ms)
+8384ms ║║Waiting for 1325ms
+9720ms ║║Executed virtual command setVariable (4ms)
+9723ms ║║Cancelling statement #22’s schedules…
+9737ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (6ms)
+9738ms ║║Executed [Hue color 1 (Stair Display)].setColor (8ms)
+9746ms ║║Cancelling statement #30’s schedules…
+9751ms ║║Executed virtual command waitRandom (1ms)
+9752ms ║║Requesting a wake up for Sat, Feb 3 2018 @ 9:07:34 PM MST (in 2.61s)
+9758ms ║╚Execution stage complete. (9568ms)
+9759ms ║Setting up scheduled job for Sat, Feb 3 2018 @ 9:07:34 PM MST (in 2.605s)
+9767ms ╚Event processed successfully (9767ms)
2/3/2018, 9:07:12 PM +433ms
+0ms ╔Received event [Home].time = 1517717233127 with a delay of -695ms
+154ms ║RunTime Analysis CS > 26ms > PS > 61ms > PE > 68ms > CE
+157ms ║Runtime (42139 bytes) successfully initialized in 61ms (v0.2.102.20180116) (156ms)
+159ms ║╔Execution stage started
+202ms ║║Executed virtual command setVariable (3ms)
+206ms ║║Cancelling statement #22’s schedules…
+231ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (7ms)
+232ms ║║Executed [Hue color 1 (Stair Display)].setColor (16ms)
+241ms ║║Cancelling statement #30’s schedules…
+253ms ║║Executed virtual command waitRandom (7ms)
+254ms ║║Waiting for 2526ms
+2789ms ║║Executed virtual command setVariable (3ms)
+2793ms ║║Cancelling statement #22’s schedules…
+2809ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (6ms)
+2810ms ║║Executed [Hue color 2 (Stair Display)].setColor (8ms)
+2819ms ║║Cancelling statement #30’s schedules…
+2825ms ║║Executed virtual command waitRandom (1ms)
+2826ms ║║Waiting for 2952ms
+5789ms ║║Executed virtual command setVariable (2ms)
+5793ms ║║Cancelling statement #22’s schedules…
+5813ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (5ms)
+5814ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (7ms)
+5827ms ║║Comparison (enum) on is (string) on = true (1ms)
+5828ms ║║Condition #26 evaluated true (11ms)
+5829ms ║║Condition group #20 evaluated true (state did not change) (12ms)
+5839ms ║║Cancelling statement #30’s schedules…
+5845ms ║║Executed virtual command waitRandom (2ms)
+5846ms ║║Waiting for 2541ms
+8396ms ║║Executed virtual command setVariable (3ms)
+8399ms ║║Cancelling statement #22’s schedules…
+8414ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #000000, hue:0, saturation:0, level:0]]) (5ms)
+8415ms ║║Executed [Hue color 1 (Stair Display)].setColor (8ms)
+8424ms ║║Cancelling statement #30’s schedules…
+8430ms ║║Executed virtual command waitRandom (1ms)
+8432ms ║║Requesting a wake up for Sat, Feb 3 2018 @ 9:07:23 PM MST (in 2.49s)
+8438ms ║╚Execution stage complete. (8280ms)
+8440ms ║Setting up scheduled job for Sat, Feb 3 2018 @ 9:07:23 PM MST (in 2.482s)
+8450ms ╚Event processed successfully (8450ms)
2/3/2018, 9:07:02 PM +99ms
+0ms ╔Received event [Home].time = 1517717222734 with a delay of -635ms
+151ms ║RunTime Analysis CS > 18ms > PS > 75ms > PE > 57ms > CE
+153ms ║Runtime (42139 bytes) successfully initialized in 75ms (v0.2.102.20180116) (152ms)
+154ms ║╔Execution stage started
+189ms ║║Executed virtual command setVariable (3ms)
+192ms ║║Cancelling statement #22’s schedules…
+207ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (7ms)
+208ms ║║Executed [Hue color 2 (Stair Display)].setColor (9ms)
+215ms ║║Cancelling statement #30’s schedules…
+220ms ║║Executed virtual command waitRandom (0ms)
+220ms ║║Waiting for 2842ms
+3071ms ║║Executed virtual command setVariable (2ms)
+3074ms ║║Cancelling statement #22’s schedules…
+3091ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (6ms)
+3092ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (8ms)
+3107ms ║║Comparison (enum) on is (string) on = true (2ms)
+3108ms ║║Condition #26 evaluated true (13ms)
+3109ms ║║Condition group #20 evaluated true (state did not change) (14ms)
+3119ms ║║Cancelling statement #30’s schedules…
+3123ms ║║Executed virtual command waitRandom (0ms)
+3124ms ║║Waiting for 1605ms
+4737ms ║║Executed virtual command setVariable (2ms)
+4740ms ║║Cancelling statement #22’s schedules…
+4757ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FF0000, hue:0, saturation:100, level:50]]) (6ms)
+4758ms ║║Executed [Hue color 1 (Stair Display)].setColor (8ms)
+4766ms ║║Cancelling statement #30’s schedules…
+4770ms ║║Executed virtual command waitRandom (0ms)
+4771ms ║║Waiting for 2848ms
+7629ms ║║Executed virtual command setVariable (2ms)
+7632ms ║║Cancelling statement #22’s schedules…
+7647ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (6ms)
+7648ms ║║Executed [Hue color 2 (Stair Display)].setColor (8ms)
+7657ms ║║Cancelling statement #30’s schedules…
+7662ms ║║Executed virtual command waitRandom (1ms)
+7663ms ║║Waiting for 1351ms
+9026ms ║║Executed virtual command setVariable (4ms)
+9030ms ║║Cancelling statement #22’s schedules…
+9044ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (5ms)
+9046ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (7ms)
+9059ms ║║Comparison (enum) on is (string) on = true (2ms)
+9061ms ║║Condition #26 evaluated true (12ms)
+9063ms ║║Condition group #20 evaluated true (state did not change) (13ms)
+9072ms ║║Cancelling statement #30’s schedules…
+9078ms ║║Executed virtual command waitRandom (0ms)
+9079ms ║║Requesting a wake up for Sat, Feb 3 2018 @ 9:07:13 PM MST (in 1.948s)
+9088ms ║╚Execution stage complete. (8933ms)
+9090ms ║Setting up scheduled job for Sat, Feb 3 2018 @ 9:07:13 PM MST (in 1.939s)
+9114ms ╚Event processed successfully (9113ms)
2/3/2018, 9:06:52 PM +731ms
+1ms ╔Received event [Holiday Lights].switch = on with a delay of 67ms
+127ms ║RunTime Analysis CS > 12ms > PS > 62ms > PE > 52ms > CE
+129ms ║Runtime (42146 bytes) successfully initialized in 62ms (v0.2.102.20180116) (127ms)
+130ms ║╔Execution stage started
+136ms ║║Cancelling statement #5’s schedules…
+141ms ║║Executed virtual command setVariable (3ms)
+151ms ║║Comparison (boolean) true is (boolean) false = false (2ms)
+152ms ║║Condition #11 evaluated false (8ms)
+153ms ║║Condition group #8 evaluated false (state did not change) (10ms)
+160ms ║║Comparison (enum) on changes_to (string) on = true (1ms)
+162ms ║║Cancelling condition #19’s schedules…
+163ms ║║Condition #19 evaluated true (7ms)
+164ms ║║Cancelling condition #18’s schedules…
+165ms ║║Condition group #18 evaluated true (state changed) (10ms)
+167ms ║║Cancelling statement #27’s schedules…
+178ms ║║Executed physical command [Hue color 1 (Stair Display)].on() (6ms)
+179ms ║║Executed [Hue color 1 (Stair Display)].on (6ms)
+185ms ║║Executed physical command [Hue color 2 (Stair Display)].on() (5ms)
+186ms ║║Executed [Hue color 2 (Stair Display)].on (6ms)
+193ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].on() (5ms)
+194ms ║║Executed [Hue Color Flood 1 (Stair Main)].on (6ms)
+201ms ║║Executed physical command [Hue color 1 (Stair Display)].setLevel([80]) (4ms)
+202ms ║║Executed [Hue color 1 (Stair Display)].setLevel (6ms)
+208ms ║║Executed physical command [Hue color 2 (Stair Display)].setLevel([80]) (4ms)
+208ms ║║Executed [Hue color 2 (Stair Display)].setLevel (5ms)
+214ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setLevel([80]) (4ms)
+215ms ║║Executed [Hue Color Flood 1 (Stair Main)].setLevel (5ms)
+224ms ║║Comparison (enum) on is (string) on = true (2ms)
+225ms ║║Cancelling condition #26’s schedules…
+226ms ║║Condition #26 evaluated true (8ms)
+227ms ║║Cancelling condition #20’s schedules…
+228ms ║║Condition group #20 evaluated true (state changed) (11ms)
+236ms ║║Cancelling statement #30’s schedules…
+241ms ║║Executed virtual command waitRandom (1ms)
+245ms ║║Waiting for 2943ms
+3196ms ║║Executed virtual command setVariable (2ms)
+3199ms ║║Cancelling statement #22’s schedules…
+3210ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (4ms)
+3211ms ║║Executed [Hue color 1 (Stair Display)].setColor (5ms)
+3217ms ║║Cancelling statement #30’s schedules…
+3222ms ║║Executed virtual command waitRandom (0ms)
+3222ms ║║Waiting for 1496ms
+4725ms ║║Executed virtual command setVariable (3ms)
+4728ms ║║Cancelling statement #22’s schedules…
+4739ms ║║Executed physical command [Hue color 2 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (4ms)
+4740ms ║║Executed [Hue color 2 (Stair Display)].setColor (6ms)
+4747ms ║║Cancelling statement #30’s schedules…
+4751ms ║║Executed virtual command waitRandom (1ms)
+4751ms ║║Waiting for 1347ms
+6106ms ║║Executed virtual command setVariable (3ms)
+6109ms ║║Cancelling statement #22’s schedules…
+6120ms ║║Executed physical command [Hue Color Flood 1 (Stair Main)].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (4ms)
+6121ms ║║Executed [Hue Color Flood 1 (Stair Main)].setColor (5ms)
+6129ms ║║Comparison (enum) on is (string) on = true (1ms)
+6130ms ║║Condition #26 evaluated true (7ms)
+6131ms ║║Condition group #20 evaluated true (state did not change) (8ms)
+6138ms ║║Cancelling statement #30’s schedules…
+6142ms ║║Executed virtual command waitRandom (1ms)
+6142ms ║║Waiting for 2458ms
+8606ms ║║Executed virtual command setVariable (1ms)
+8609ms ║║Cancelling statement #22’s schedules…
+8621ms ║║Executed physical command [Hue color 1 (Stair Display)].setColor([[hex: #0000FF, hue:67, saturation:100, level:50]]) (4ms)
+8622ms ║║Executed [Hue color 1 (Stair Display)].setColor (5ms)
+8630ms ║║Cancelling statement #30’s schedules…
+8635ms ║║Executed virtual command waitRandom (1ms)
+8636ms ║║Requesting a wake up for Sat, Feb 3 2018 @ 9:07:02 PM MST (in 1.366s)
+8641ms ║╚Execution stage complete. (8511ms)
+8643ms ║Setting up scheduled job for Sat, Feb 3 2018 @ 9:07:02 PM MST (in 1.361s)
+8651ms ╚Event processed successfully (8651ms)


#2

on mobile so quick response here - getting a twinkle effect to work consistently for more than a couple minutes at a time is likely to have everything else on the hub crawl to a stop.


#3

Thanks for the response bangali. How is this different from your holiday lights piston? When I had yours running, it looked like it was changing each light’s level every 1 second.

From the logs, it looks like when a light turns off, it’s actually trying to set the color to black for some reason. Also not sure why it’s setting level 50 or 100, instead of 80 like I told it to.


#4

depends on the frequency but think it changes level every few seconds. have had complains from folks that after a while everything else on the hub slows to a crawl. just trying to pass that on.

on mobile so will check and respond later.


#5

from a quick look at the piston seems like count colors is not set to zero before adding up the number of colors.


#7

thanks, that looks like it solved the issue with lights turning off!


#8

Hi, Just wondering if you ever got a final piston. Would love to use it.


#9

Setup:
I have a bunch of phillips HUE lights outside of my home. I want a piston that runs year round and automatically handles holiday lighting for me, yet will go to white when it is no longer a holiday or if I toggle the light switch in the event someone comes to my door.

Problem:
I have created a piston based on the holiday lights found on this forum. No matter what day it is the thing acts like it is veterans day.

What I need it to do:

  1. Based on the defined holidays control the lighting as defined by colors, fade, rotation. That part seems to work
  2. Any time I change the porch light state set the lights to white for X seconds. This is for when someone comes to my door I want to interrupt the colored lights for a period of time, say 30 seconds to a minute.
  3. When it is not a holiday set the lights back to white and don’t mess with them (fading, etc).

What I DON’t need it to do:

  1. I don’t need it to control turning lights on/off. Smartthings is already great at doing that


#10

You should post this in it’s own post.