Capture and restore attributes


#1

Hi All!
My Lights are not behaving correctly. Im trying to capture the state of lights (for regular bulbs im just trying to get level and on/off states. for hue bubs im trying to see if they are in color temperature or hue saturation mode, in addition to level and switch).

i have tried using a simple capture and restore attributes but that never works as i want it. i have since tried to add better logic to store the on /off and colormode states into variables instead of local/global stores, and then depending on colormode capture certain attributes. after all of this, i want some actions on the lights (flash, change color, etc) which are dependent on the current mode (away,home,night). once finished i want to restore the attributes, and return them to the previous state.

Color lights (phillips hue) dont return to their previous state (with attribute restore) nor do they turn off if they were off before. Lights stored in Lights_non_colour variable turn on when they shouldnt (ie when mode is home) and do not turn off when they should. they do restore level but not on/off state.

1/31/2019, 10:45:57 AM +103ms
+0ms ╔Received event [Home].time = 1548949555556 with a delay of 1546ms
+161ms ║RunTime Analysis CS > 21ms > PS > 91ms > PE > 49ms > CE
+164ms ║Runtime (56772 bytes) successfully initialized in 91ms (v0.3.109.20181207) (163ms)
+165ms ║╔Execution stage started
+233ms ║║Skipping task 111 because of mode restrictions
+234ms ║║Skipping task 112 because of mode restrictions
+237ms ║╚Execution stage complete. (73ms)
+239ms ╚Event processed successfully (238ms)
1/31/2019, 10:45:48 AM +538ms
+1ms ╔Received event [Home].time = 1548949539231 with a delay of 9307ms
+198ms ║RunTime Analysis CS > 38ms > PS > 104ms > PE > 55ms > CE
+201ms ║Runtime (56774 bytes) successfully initialized in 104ms (v0.3.109.20181207) (199ms)
+203ms ║╔Execution stage started
+2012ms ║║Executed physical command [Lamp Colour].setLevel([100]) (1800ms)
+2091ms ║║Executed physical command [RL].setLevel([100]) (67ms)
+2189ms ║║Executed physical command [RR].setLevel([100]) (89ms)
+2260ms ║║Executed physical command [Tall Colour].setLevel([100]) (61ms)
+2342ms ║║Executed physical command [Dining Color].setLevel([24]) (72ms)
+2460ms ║║Executed physical command [Dining Color].on() (107ms)
+2562ms ║║Executed physical command [FC Colour].setLevel([24]) (90ms)
+2679ms ║║Executed physical command [FC Colour].on() (102ms)
+2769ms ║║Executed physical command [FL Colour].setLevel([24]) (81ms)
+2873ms ║║Executed physical command [FL Colour].on() (91ms)
+2979ms ║║Executed physical command [FR Colour].setLevel([24]) (98ms)
+3088ms ║║Executed physical command [FR Colour].on() (102ms)
+3167ms ║║Executed physical command [Hallway Colour].setLevel([24]) (72ms)
+3262ms ║║Executed physical command [Hallway Colour].on() (88ms)
+3338ms ║║Executed physical command [Lamp Colour].setLevel([99]) (67ms)
+3422ms ║║Executed physical command [Lamp Colour].on() (76ms)
+3491ms ║║Executed physical command [RL].setLevel([99]) (61ms)
+3605ms ║║Executed physical command [RL].on() (108ms)
+3685ms ║║Executed physical command [RR].setLevel([99]) (70ms)
+3770ms ║║Executed physical command [RR].on() (77ms)
+3882ms ║║Executed physical command [Tall Colour].setLevel([50]) (105ms)
+3984ms ║║Executed physical command [Tall Colour].on() (94ms)
+4058ms ║║Executed virtual command [Dining Color, FC Colour, FL Colour, FR Colour, Hallway Colour, Lamp Colour, RL, RR, Tall Colour].wait (1ms)
+4060ms ║║Requesting a wake up for Thu, Jan 31 2019 @ 10:45:53 AM EST (in 1.0s)
+4065ms ║║Fast executing schedules, waiting for 996ms to sync up
+5240ms ║║Executed physical command [Dining Color].setColorTemperature([2000]) (109ms)
+5241ms ║║Executed [Dining Color].setColorTemperature (112ms)
+5339ms ║║Executed physical command [FC Colour].setColorTemperature([2000]) (96ms)
+5340ms ║║Executed [FC Colour].setColorTemperature (98ms)
+5452ms ║║Executed physical command [FL Colour].setColorTemperature([2000]) (110ms)
+5454ms ║║Executed [FL Colour].setColorTemperature (113ms)
+5536ms ║║Executed physical command [FR Colour].setColorTemperature([2000]) (79ms)
+5537ms ║║Executed [FR Colour].setColorTemperature (81ms)
+5635ms ║║Executed physical command [Hallway Colour].setColorTemperature([2000]) (95ms)
+5636ms ║║Executed [Hallway Colour].setColorTemperature (98ms)
+5722ms ║║Executed physical command [Lamp Colour].setColorTemperature([2000]) (83ms)
+5723ms ║║Executed [Lamp Colour].setColorTemperature (86ms)
+5808ms ║║Executed physical command [RL].setColorTemperature([2000]) (83ms)
+5809ms ║║Executed [RL].setColorTemperature (85ms)
+5903ms ║║Executed physical command [RR].setColorTemperature([2000]) (92ms)
+5904ms ║║Executed [RR].setColorTemperature (94ms)
+6010ms ║║Executed physical command [Tall Colour].setColorTemperature([2000]) (104ms)
+6012ms ║║Executed [Tall Colour].setColorTemperature (106ms)
+6016ms ║║Executed virtual command [Dining Color, FC Colour, FL Colour, FR Colour, Hallway Colour, Lamp Colour, RL, RR, Tall Colour].wait (1ms)
+6018ms ║║Requesting a wake up for Thu, Jan 31 2019 @ 10:45:55 AM EST (in 1.0s)
+6022ms ║╚Execution stage complete. (5820ms)
+6024ms ║Setting up scheduled job for Thu, Jan 31 2019 @ 10:45:55 AM EST (in 1s)
+6033ms ╚Event processed successfully (6033ms)
1/31/2019, 10:45:40 AM +123ms
+0ms ╔Received event [Home].time = 1548949532729 with a delay of 7393ms
+206ms ║RunTime Analysis CS > 24ms > PS > 123ms > PE > 59ms > CE
+209ms ║Runtime (57774 bytes) successfully initialized in 123ms (v0.3.109.20181207) (207ms)
+210ms ║╔Execution stage started
+2445ms ║║Executed physical command [Dining Color].setLevel([50]) (2219ms)
+2531ms ║║Executed physical command [FC Colour].setLevel([50]) (63ms)
+2607ms ║║Executed physical command [FL Colour].setLevel([50]) (61ms)
+2692ms ║║Executed physical command [FR Colour].setLevel([50]) (68ms)
+2760ms ║║Executed physical command [Hallway Colour].setLevel([50]) (52ms)
+2832ms ║║Executed physical command [Lamp Colour].setLevel([50]) (57ms)
+2908ms ║║Executed physical command [RL].setLevel([50]) (60ms)
+3025ms ║║Executed physical command [RR].setLevel([50]) (85ms)
+3111ms ║║Executed physical command [Tall Colour].setLevel([50]) (65ms)
+3183ms ║║Executed physical command [Dining Color].setLevel([100]) (56ms)
+3256ms ║║Executed physical command [FC Colour].setLevel([100]) (56ms)
+3337ms ║║Executed physical command [FL Colour].setLevel([100]) (68ms)
+3411ms ║║Executed physical command [FR Colour].setLevel([100]) (60ms)
+3482ms ║║Executed physical command [Hallway Colour].setLevel([100]) (58ms)
+3557ms ║║Executed physical command [Lamp Colour].setLevel([100]) (62ms)
+3641ms ║║Executed physical command [RL].setLevel([100]) (71ms)
+3720ms ║║Executed physical command [RR].setLevel([100]) (66ms)
+3803ms ║║Executed physical command [Tall Colour].setLevel([100]) (71ms)
+3876ms ║║Executed physical command [Dining Color].setLevel([50]) (59ms)
+3957ms ║║Executed physical command [FC Colour].setLevel([50]) (68ms)
+4052ms ║║Executed physical command [FL Colour].setLevel([50]) (81ms)
+4126ms ║║Executed physical command [FR Colour].setLevel([50]) (63ms)
+4217ms ║║Executed physical command [Hallway Colour].setLevel([50]) (79ms)
+4302ms ║║Executed physical command [Lamp Colour].setLevel([50]) (72ms)
+4375ms ║║Executed physical command [RL].setLevel([50]) (62ms)
+4443ms ║║Executed physical command [RR].setLevel([50]) (56ms)
+4518ms ║║Executed physical command [Tall Colour].setLevel([50]) (64ms)
+4593ms ║║Executed physical command [Dining Color].setLevel([100]) (64ms)
+4656ms ║║Executed physical command [FC Colour].setLevel([100]) (52ms)
+4730ms ║║Executed physical command [FL Colour].setLevel([100]) (63ms)
+4791ms ║║Executed physical command [FR Colour].setLevel([100]) (50ms)
+4857ms ║║Executed physical command [Hallway Colour].setLevel([100]) (56ms)
+5057ms ║║Executed virtual command [Bed White, Kitchen, Washroom].setVariable (4ms)
+5064ms ║║Executed virtual command [Bed White, Kitchen, Washroom].setVariable (3ms)
+5073ms ║║Executed virtual command [Bed White, Kitchen, Washroom].setVariable (4ms)
+5082ms ║║Executed virtual command [Bed White, Kitchen, Washroom].setVariable (4ms)
+5090ms ║╚Execution stage complete. (4880ms)
+5103ms ║Setting up scheduled job for Thu, Jan 31 2019 @ 10:45:39 AM EST (in 1s), with 22 more jobs pending
+5112ms ╚Event processed successfully (5113ms)
1/31/2019, 10:45:32 AM +181ms
+1ms ╔Received event [Home].time = 1548949520408 with a delay of 11772ms
+222ms ║RunTime Analysis CS > 29ms > PS > 109ms > PE > 84ms > CE
+226ms ║Runtime (57775 bytes) successfully initialized in 109ms (v0.3.109.20181207) (224ms)
+227ms ║╔Execution stage started
+1989ms ║║Executed physical command [Bed White].off() (1592ms)
+1991ms ║║Executed [Bed White].off (1594ms)
+1999ms ║║Skipped execution of physical command [Kitchen].off([]) because it would make no change to the device. (3ms)
+2000ms ║║Executed [Kitchen].off (7ms)
+2007ms ║║Skipped execution of physical command [Washroom].off([]) because it would make no change to the device. (3ms)
+2009ms ║║Executed [Washroom].off (5ms)
+2014ms ║║Executed virtual command [Bed White, Kitchen, Washroom].wait (1ms)
+2017ms ║║Requesting a wake up for Thu, Jan 31 2019 @ 10:45:39 AM EST (in 5.0s)
+4139ms ║║Executed physical command [Dining Color].setLevel([100]) (2076ms)
+4264ms ║║Executed physical command [FC Colour].setLevel([100]) (105ms)
+4422ms ║║Executed physical command [FL Colour].setLevel([100]) (137ms)
+4516ms ║║Executed physical command [FR Colour].setLevel([100]) (69ms)
+4615ms ║║Executed physical command [Hallway Colour].setLevel([100]) (80ms)
+4752ms ║║Executed physical command [Lamp Colour].setLevel([100]) (116ms)
+4875ms ║║Executed physical command [RL].setLevel([100]) (99ms)
+4988ms ║║Executed physical command [RR].setLevel([100]) (88ms)
+5099ms ║║Executed physical command [Tall Colour].setLevel([100]) (90ms)
+5101ms ║╚Execution stage complete. (4873ms)
+5130ms ║Setting up scheduled job for Thu, Jan 31 2019 @ 10:45:32 AM EST (in 1s), with 55 more jobs pending
+5139ms ╚Event processed successfully (5138ms)
1/31/2019, 10:45:20 AM +116ms
+1ms ╔Received event [Home].time = 1548949513985 with a delay of 6131ms
+390ms ║RunTime Analysis CS > 113ms > PS > 225ms > PE > 51ms > CE
+394ms ║Runtime (57775 bytes) successfully initialized in 225ms (v0.3.109.20181207) (392ms)
+396ms ║╔Execution stage started
+7184ms ║║Executed physical command [Dining Color].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (6708ms)
+7186ms ║║Executed [Dining Color].setColor (6712ms)
+7452ms ║║Executed physical command [FC Colour].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (262ms)
+7453ms ║║Executed [FC Colour].setColor (265ms)
+7630ms ║║Executed physical command [FL Colour].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (173ms)
+7631ms ║║Executed [FL Colour].setColor (176ms)
+7794ms ║║Executed physical command [FR Colour].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (160ms)
+7796ms ║║Executed [FR Colour].setColor (162ms)
+7938ms ║║Executed physical command [Hallway Colour].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (139ms)
+7940ms ║║Executed [Hallway Colour].setColor (142ms)
+8093ms ║║Executed physical command [Lamp Colour].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (149ms)
+8094ms ║║Executed [Lamp Colour].setColor (153ms)
+8195ms ║║Executed physical command [RL].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (98ms)
+8197ms ║║Executed [RL].setColor (100ms)
+8340ms ║║Executed physical command [RR].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (140ms)
+8342ms ║║Executed [RR].setColor (142ms)
+8466ms ║║Executed physical command [Tall Colour].setColor([[hex: #008000, hue:33, saturation:100, level:25]]) (120ms)
+8467ms ║║Executed [Tall Colour].setColor (123ms)
+8588ms ║║Executed physical command [Dining Color].setLevel([50]) (100ms)
+8615ms ║║Executed virtual command [Dining Color].flashLevel (136ms)
+8710ms ║║Executed physical command [FC Colour].setLevel([50]) (86ms)
+8714ms ║║Executed virtual command [FC Colour].flashLevel (98ms)
+8797ms ║║Executed physical command [FL Colour].setLevel([50]) (74ms)
+8800ms ║║Executed virtual command [FL Colour].flashLevel (85ms)
+8895ms ║║Executed physical command [FR Colour].setLevel([50]) (87ms)
+8898ms ║║Executed virtual command [FR Colour].flashLevel (96ms)
+9001ms ║║Executed physical command [Hallway Colour].setLevel([50]) (92ms)
+9007ms ║║Executed virtual command [Hallway Colour].flashLevel (107ms)
+9112ms ║║Executed physical command [Lamp Colour].setLevel([50]) (94ms)
+9116ms ║║Executed virtual command [Lamp Colour].flashLevel (107ms)
+9222ms ║║Executed physical command [RL].setLevel([50]) (95ms)
+9225ms ║║Executed virtual command [RL].flashLevel (106ms)
+9331ms ║║Executed physical command [RR].setLevel([50]) (98ms)
+9335ms ║║Executed virtual command [RR].flashLevel (108ms)
+9409ms ║║Executed physical command [Tall Colour].setLevel([50]) (64ms)
+9413ms ║║Executed virtual command [Tall Colour].flashLevel (77ms)
+9415ms ║║Requesting a wake up for Thu, Jan 31 2019 @ 10:45:41 AM EST (in 12.1s)
+9422ms ║╚Execution stage complete. (9026ms)
+9513ms ║Setting up scheduled job for Thu, Jan 31 2019 @ 10:45:20 AM EST (in 1s), with 64 more jobs pending
+9523ms ╚Event processed successfully (9522ms)
1/31/2019, 10:45:10 AM +112ms
+1ms ╔Received event [.Present/Away (Vacation)].presence = present with a delay of 100ms
+149ms ║RunTime Analysis CS > 18ms > PS > 96ms > PE > 35ms > CE
+152ms ║Runtime (56796 bytes) successfully initialized in 96ms (v0.3.109.20181207) (149ms)
+153ms ║╔Execution stage started
+162ms ║║Comparison (enum) present changes = true (1ms)
+164ms ║║Condition #2 evaluated true (4ms)
+165ms ║║Condition group #1 evaluated true (state did not change) (7ms)
+278ms ║║Comparison (enum) off is (string) on = false (2ms)
+281ms ║║Comparison (enum) on is (string) on = true (2ms)
+284ms ║║Comparison (enum) on is (string) on = true (2ms)
+287ms ║║Comparison (enum) on is (string) on = true (2ms)
+290ms ║║Comparison (enum) on is (string) on = true (2ms)
+293ms ║║Comparison (enum) on is (string) on = true (2ms)
+297ms ║║Comparison (enum) on is (string) on = true (2ms)
+300ms ║║Comparison (enum) on is (string) on = true (1ms)
+303ms ║║Comparison (enum) on is (string) on = true (2ms)
+306ms ║║Comparison (enum) off is (string) on = false (2ms)
+309ms ║║Comparison (enum) on is (string) on = true (2ms)
+313ms ║║Comparison (enum) on is (string) on = true (2ms)
+316ms ║║Comparison (enum) on is (string) on = true (1ms)
+319ms ║║Comparison (enum) on is (string) on = true (2ms)
+322ms ║║Comparison (enum) on is (string) on = true (2ms)
+325ms ║║Comparison (enum) on is (string) on = true (2ms)
+329ms ║║Comparison (enum) on is (string) on = true (2ms)
+332ms ║║Comparison (enum) on is (string) on = true (1ms)
+335ms ║║Comparison (enum) off is (string) on = false (2ms)
+350ms ║║Condition #4 evaluated true (182ms)
+351ms ║║Condition group #3 evaluated true (state did not change) (184ms)
+395ms ║║Comparison (string) ct is (string) ct = true (2ms)
+398ms ║║Comparison (string) ct is (string) ct = true (2ms)
+402ms ║║Comparison (string) ct is (string) ct = true (1ms)
+405ms ║║Comparison (string) ct is (string) ct = true (2ms)
+408ms ║║Comparison (string) ct is (string) ct = true (2ms)
+411ms ║║Comparison (string) ct is (string) ct = true (2ms)
+415ms ║║Comparison (string) ct is (string) ct = true (1ms)
+418ms ║║Comparison (string) ct is (string) ct = true (2ms)
+421ms ║║Comparison (string) hs is (string) ct = false (2ms)
+434ms ║║Condition #6 evaluated true (78ms)
+435ms ║║Condition group #5 evaluated true (state did not change) (81ms)
+442ms ║║Cancelling statement #8's schedules...
+458ms ║║Executed virtual command [Dining Color].saveStateGlobally (8ms)
+464ms ║║Cancelling statement #8's schedules...
+478ms ║║Executed virtual command [FC Colour].saveStateGlobally (7ms)
+484ms ║║Cancelling statement #8's schedules...
+498ms ║║Executed virtual command [FL Colour].saveStateGlobally (7ms)
+504ms ║║Cancelling statement #8's schedules...
+518ms ║║Executed virtual command [FR Colour].saveStateGlobally (7ms)
+524ms ║║Cancelling statement #8's schedules...
+537ms ║║Executed virtual command [Hallway Colour].saveStateGlobally (7ms)
+543ms ║║Cancelling statement #8's schedules...
+557ms ║║Executed virtual command [Lamp Colour].saveStateGlobally (7ms)
+563ms ║║Cancelling statement #8's schedules...
+578ms ║║Executed virtual command [RL].saveStateGlobally (8ms)
+584ms ║║Cancelling statement #8's schedules...
+599ms ║║Executed virtual command [RR].saveStateGlobally (7ms)
+607ms ║║Cancelling statement #11's schedules...
+624ms ║║Executed virtual command [Tall Colour].saveStateGlobally (10ms)
+639ms ║║Cancelling statement #115's schedules...
+651ms ║║Executed virtual command [Bed White].saveStateGlobally (5ms)
+662ms ║║Cancelling statement #115's schedules...
+674ms ║║Executed virtual command [Dining L].saveStateGlobally (5ms)
+685ms ║║Cancelling statement #115's schedules...
+698ms ║║Executed virtual command [Dining R].saveStateGlobally (5ms)
+709ms ║║Cancelling statement #115's schedules...
+721ms ║║Executed virtual command [Hallway].saveStateGlobally (5ms)
+733ms ║║Cancelling statement #115's schedules...
+745ms ║║Executed virtual command [Lamp].saveStateGlobally (6ms)
+758ms ║║Cancelling statement #115's schedules...
+769ms ║║Executed virtual command [Storage L].saveStateGlobally (5ms)
+781ms ║║Cancelling statement #115's schedules...
+794ms ║║Executed virtual command [Storage R].saveStateGlobally (5ms)
+805ms ║║Cancelling statement #115's schedules...
+817ms ║║Executed virtual command [Tall Lamp].saveStateGlobally (4ms)
+822ms ║║Cancelling statement #117's schedules...
+841ms ║║Executed virtual command [Dining Color, Dining L, Dining R, FC Colour, FL Colour, FR Colour, Hallway, Hallway Colour, Lamp, Lamp Colour, RL, RR, Storage L, Storage R, Tall Colour, Tall Lamp, Bed White, Kitchen, Washroom].wait (1ms)
+843ms ║║Waiting for 2000ms
+2847ms ║║Cancelling statement #93's schedules...
+2854ms ║║Skipping task 94 because of mode restrictions
+2855ms ║║Skipping task 96 because of mode restrictions
+2857ms ║║Skipping task 113 because of mode restrictions
+2859ms ║║Skipping task 95 because of mode restrictions
+2860ms ║║Skipping task 97 because of mode restrictions
+2862ms ║║Skipping task 98 because of mode restrictions
+2863ms ║║Skipping task 99 because of mode restrictions
+2865ms ║║Skipping task 100 because of mode restrictions
+2870ms ║║Executed virtual command [Dining Color, FC Colour, FL Colour, FR Colour, Hallway Colour, Lamp Colour, RL, RR, Tall Colour].wait (0ms)
+2872ms ║║Requesting a wake up for Thu, Jan 31 2019 @ 10:45:13 AM EST (in 1.0s)
+2878ms ║║Cancelling statement #16's schedules...
+2889ms ║║Skipping task 18 because of mode restrictions
+2890ms ║║Skipping task 20 because of mode restrictions
+2892ms ║║Skipping task 19 because of mode restrictions
+2893ms ║║Skipping task 119 because of mode restrictions
+2895ms ║║Skipping task 120 because of mode restrictions
+2899ms ║║Cancelling statement #121's schedules...
+2919ms ║║Executed virtual command [Dining Color, Dining L, Dining R, FC Colour, FL Colour, FR Colour, Hallway, Hallway Colour, Lamp, Lamp Colour, RL, RR, Storage L, Storage R, Tall Colour, Tall Lamp, Bed White, Kitchen, Washroom].wait (1ms)
+2920ms ║║Waiting for 2000ms
+4927ms ║║Cancelling statement #124's schedules...
+4953ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+5373ms ║║Executed physical command [Dining Color].setColorTemperature([2000]) (419ms)
+5375ms ║║Executed virtual command [Dining Color].loadStateGlobally (438ms)
+5381ms ║║Cancelling statement #124's schedules...
+5406ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+5579ms ║║Executed physical command [FC Colour].setColorTemperature([2000]) (171ms)
+5580ms ║║Executed virtual command [FC Colour].loadStateGlobally (191ms)
+5588ms ║║Cancelling statement #124's schedules...
+5613ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+5699ms ║║Executed physical command [FL Colour].setColorTemperature([2000]) (85ms)
+5700ms ║║Executed virtual command [FL Colour].loadStateGlobally (104ms)
+5706ms ║║Cancelling statement #124's schedules...
+5731ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+5815ms ║║Executed physical command [FR Colour].setColorTemperature([2000]) (83ms)
+5817ms ║║Executed virtual command [FR Colour].loadStateGlobally (102ms)
+5822ms ║║Cancelling statement #124's schedules...
+5847ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+5925ms ║║Executed physical command [Hallway Colour].setColorTemperature([2000]) (76ms)
+5926ms ║║Executed virtual command [Hallway Colour].loadStateGlobally (96ms)
+5932ms ║║Cancelling statement #124's schedules...
+5957ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+6036ms ║║Executed physical command [Lamp Colour].setColorTemperature([2000]) (78ms)
+6037ms ║║Executed virtual command [Lamp Colour].loadStateGlobally (97ms)
+6043ms ║║Cancelling statement #124's schedules...
+6068ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+6170ms ║║Executed physical command [RL].setColorTemperature([2000]) (100ms)
+6171ms ║║Executed virtual command [RL].loadStateGlobally (119ms)
+6177ms ║║Cancelling statement #124's schedules...
+6203ms ║║Restoring attribute 'colorTemperature' to value '2000' using command setColorTemperature(2000)
+6302ms ║║Executed physical command [RR].setColorTemperature([2000]) (98ms)
+6303ms ║║Executed virtual command [RR].loadStateGlobally (118ms)
+6312ms ║║Cancelling statement #127's schedules...
+6338ms ║║Restoring attribute 'hue' to value '17.0' using command setHue(17.0)
+6447ms ║║Executed physical command [Tall Colour].setHue([17.0]) (107ms)
+6463ms ║║Restoring attribute 'level' to value '50' using command setLevel(50)
+6470ms ║║Skipped execution of physical command [Tall Colour].setLevel([50]) because it would make no change to the device. (5ms)
+6486ms ║║Restoring attribute 'saturation' to value '100' using command setSaturation(100)
+6559ms ║║Executed physical command [Tall Colour].setSaturation([100]) (72ms)
+6560ms ║║Executed virtual command [Tall Colour].loadStateGlobally (240ms)
+6574ms ║║Cancelling statement #130's schedules...
+6627ms ║║Restoring attribute 'level' to value '99' using command setLevel(99)
+6973ms ║║Executed physical command [Bed White].setLevel([99]) (345ms)
+6975ms ║║Executed virtual command [Bed White].loadStateGlobally (393ms)
+6986ms ║║Cancelling statement #130's schedules...
+7010ms ║║Restoring attribute 'level' to value '41' using command setLevel(41)
+7018ms ║║Skipped execution of physical command [Dining L].setLevel([41]) because it would make no change to the device. (7ms)
+7020ms ║║Executed virtual command [Dining L].loadStateGlobally (26ms)
+7030ms ║║Cancelling statement #130's schedules...
+7055ms ║║Restoring attribute 'level' to value '99' using command setLevel(99)
+7063ms ║║Skipped execution of physical command [Dining R].setLevel([99]) because it would make no change to the device. (7ms)
+7065ms ║║Executed virtual command [Dining R].loadStateGlobally (26ms)
+7075ms ║║Cancelling statement #130's schedules...
+7100ms ║║Restoring attribute 'level' to value '99' using command setLevel(99)
+7108ms ║║Skipped execution of physical command [Hallway].setLevel([99]) because it would make no change to the device. (6ms)
+7109ms ║║Executed virtual command [Hallway].loadStateGlobally (25ms)
+7120ms ║║Cancelling statement #130's schedules...
+7144ms ║║Restoring attribute 'level' to value '99' using command setLevel(99)
+7152ms ║║Skipped execution of physical command [Lamp].setLevel([99]) because it would make no change to the device. (6ms)
+7153ms ║║Executed virtual command [Lamp].loadStateGlobally (26ms)
+7164ms ║║Cancelling statement #130's schedules...
+7188ms ║║Restoring attribute 'level' to value '100' using command setLevel(100)
+7194ms ║║Skipped execution of physical command [Storage L].setLevel([100]) because it would make no change to the device. (5ms)
+7195ms ║║Executed virtual command [Storage L].loadStateGlobally (23ms)
+7206ms ║║Cancelling statement #130's schedules...
+7232ms ║║Restoring attribute 'level' to value '100' using command setLevel(100)
+7239ms ║║Skipped execution of physical command [Storage R].setLevel([100]) because it would make no change to the device. (6ms)
+7240ms ║║Executed virtual command [Storage R].loadStateGlobally (26ms)
+7251ms ║║Cancelling statement #130's schedules...
+7276ms ║║Restoring attribute 'level' to value '100' using command setLevel(100)
+7282ms ║║Skipped execution of physical command [Tall Lamp].setLevel([100]) because it would make no change to the device. (5ms)
+7283ms ║║Executed virtual command [Tall Lamp].loadStateGlobally (24ms)
+7288ms ║║Cancelling statement #132's schedules...
+7294ms ║║Executed virtual command [Bed White, Kitchen, Washroom].wait (0ms)
+7295ms ║║Requesting a wake up for Thu, Jan 31 2019 @ 10:45:20 AM EST (in 3.0s)
+7300ms ║╚Execution stage complete. (7148ms)
+7302ms ║Setting up scheduled job for Thu, Jan 31 2019 @ 10:45:13 AM EST (in 1s), with 1 more job pending
+7310ms ╚Event processed successfully (7311ms

Any help is greatly appreciated


#2

Have you tested capture and restore with a single bulb in basic piston?


#3

actually, yes i have. and attribute never work right for me. hence why i had to do the if to check the switch state and if to check colormode


#4

This is a test piston from another thread… you can modify it to fit your test


#5

yeah that never works right. thats where i started


#6

at this point, all i can think of is making an inidividual variable for each bulb for each attribute and setting variables… which… man… is a lot… loooll


#7

Setting statements to asynch means all those statement blocks will execute all at the same time when the piston runs. If you have one capturing and the one restoring, then that will be an issue. This is why I’m suggesting going with the basics.


#8

hmmm. for some reason i thought you were able to breakup into groups of asyncs,

1 async do
2 async do
3 async do
4 do
5 async do
6 async do
where the async on line 5 and 6 wont run until do on line 4 finishes

am i wrong?

and i have tried basic stuff with attributes. it will either set color in the hs space (when it should be a color temp) or set color temp when should be a color (hue/saturation) and it never restores switch correctly


#9

Good question, will have to give it a try


#10

just for sanity i tried your suggestion from the snapashot, only difference was a virtual device for triggers.

does not work correctly. it will not set the bulb back to a color temp if that is where it was, and it misses the color half of the time


#11

What does the test piston look like?


#12

the exact same, except instead of a door contact im using a virtual presence sensor for triggering for testing since i already have one setup. and any other pistons using that sensor are paused.

so if i have the bulb set to warm white or 3000k color temp, it will just change to the last color used (not color temp)

if i have the bulb set to color, it changes to the color before the current color. i have to trigger twice to get it to work. and im giving it more than enough time to update the bulb attributes from the hue bridge before i trigger the first time. i know that hue is a little slow


#13

Not sure what to tell you… I just tried one more test (only one bulb) and it worked just fine. I modified that piston above to the following.


#14

curious: what kind of bulbs are you using?


#15

Plain jane hue color bulb


#16

and are you using hue bridge or directly connected to st ?


#17

Bridge connected. Which reminds me, are you sure you’re not getting some kind of interference on your zigbee network?


#18

no issues, non that i can tell. any in depth way to check?


#19

I try to move my local wifi channel away from the zigbee channel that the ST hub uses.


#20

done that, not to long ago actually due too new routers. never had issues as a result