Capture/Restore attributes not working


#1

1) Give a description of the problem
Using the Capture attributes and the Restore attributes is not working. Lights turn on just fine, but when restoring, nothing happens. Lights do not return to state of capture.

2) What is the expected behavior?
Lights to return to the state of capture.

3) What is happening/not happening?
Lights do not return to the state of capture.

**4) Post a Green Snapshot of the piston![image|45x37]

Can anyone see anything wrong with the above?

Thank you


#2

Ok, I understand the screen print changing names of the bulbs.

I understand “RGB Bulb”…

I don’t understand the “White Bulb” and “Dimmer”, because they are the exact same bulbs. They are all Sengled Element Classic bulbs.

So, why the different names?

Thank you


#3

Try to be specific in the restoring what you captured (level and switch).


#4

Thank you, I don’t know how I missed that.

But… even after adding level and switch, the lights did not return to previous state. They all stayed on.


#5

Here is the log from the second piston above:

1/27/2019, 11:24:30 AM +972ms
+1ms ╔Received event [Emergency Lights Active].contact = closed with a delay of 64ms
+295ms ║RunTime Analysis CS > 16ms > PS > 260ms > PE > 18ms > CE
+297ms ║Runtime (42454 bytes) successfully initialized in 260ms (v0.3.109.20181207) (295ms)
+299ms ║╔Execution stage started
+309ms ║║Comparison (enum) closed changes_to (string) closed = true (1ms)
+311ms ║║Cancelling condition #2’s schedules…
+312ms ║║Condition #2 evaluated true (7ms)
+314ms ║║Cancelling condition #1’s schedules…
+315ms ║║Condition group #1 evaluated true (state changed) (11ms)
+318ms ║║Cancelling statement #3’s schedules…
+341ms ║║Executed virtual command [Den Light].loadStateLocally (1ms)
+345ms ║║Executed virtual command [Garage Light 1].loadStateLocally (1ms)
+348ms ║║Executed virtual command [Garage Light 2].loadStateLocally (2ms)
+352ms ║║Executed virtual command [Garage Light 3].loadStateLocally (2ms)
+356ms ║║Executed virtual command [Garage Light 4].loadStateLocally (2ms)
+360ms ║║Executed virtual command [Garage Light 5].loadStateLocally (2ms)
+364ms ║║Executed virtual command [Garage Light 6].loadStateLocally (1ms)
+368ms ║║Executed virtual command [Garage Light 7].loadStateLocally (1ms)
+371ms ║║Executed virtual command [Garage Light 8].loadStateLocally (2ms)
+375ms ║║Executed virtual command [Hall Light].loadStateLocally (2ms)
+460ms ║║Executed virtual command [Laundry Room Light 1].loadStateLocally (2ms)
+465ms ║║Executed virtual command [Laundry Room Light 2].loadStateLocally (2ms)
+469ms ║║Executed virtual command [LivLamp 1a].loadStateLocally (1ms)
+473ms ║║Executed virtual command [LivLamp 1b].loadStateLocally (1ms)
+477ms ║║Executed virtual command [LivLamp 2a].loadStateLocally (1ms)
+481ms ║║Executed virtual command [LivLamp 2b].loadStateLocally (1ms)
+485ms ║║Executed virtual command [Mina’s Light].loadStateLocally (1ms)
+488ms ║║Executed virtual command [Neal Ceiling 1].loadStateLocally (2ms)
+492ms ║║Executed virtual command [Neal Ceiling 2].loadStateLocally (2ms)
+496ms ║║Executed virtual command [Neal Ceiling 3].loadStateLocally (2ms)
+500ms ║║Executed virtual command [Neal Lamp 1].loadStateLocally (2ms)
+504ms ║║Executed virtual command [Neal Lamp 2].loadStateLocally (1ms)
+507ms ║║Executed virtual command [Neal Lamp 3].loadStateLocally (1ms)
+511ms ║║Executed virtual command [Neal Lamp 4].loadStateLocally (2ms)
+515ms ║║Executed virtual command [Oven Light].loadStateLocally (2ms)
+519ms ║║Executed virtual command [Rec Room Light 1].loadStateLocally (1ms)
+522ms ║║Executed virtual command [Rec Room Light 2].loadStateLocally (1ms)
+526ms ║║Executed virtual command [Rec Room Light 3].loadStateLocally (2ms)
+530ms ║║Executed virtual command [Small Lamp].loadStateLocally (1ms)
+534ms ║║Executed virtual command [Todd Ceiling Light 1].loadStateLocally (1ms)
+537ms ║║Executed virtual command [Todd Ceiling Light 2].loadStateLocally (2ms)
+541ms ║║Executed virtual command [Todd Ceiling Light 3].loadStateLocally (2ms)
+545ms ║║Executed virtual command [Todd Ceiling Light 4].loadStateLocally (1ms)
+548ms ║╚Execution stage complete. (250ms)
+549ms ╚Event processed successfully (549ms)
1/27/2019, 11:22:23 AM +107ms
+2ms ╔Received event [Emergency Lights Active].contact = open with a delay of 141ms
+504ms ║RunTime Analysis CS > 34ms > PS > 441ms > PE > 29ms > CE
+508ms ║Runtime (42450 bytes) successfully initialized in 441ms (v0.3.109.20181207) (504ms)
+509ms ║╔Execution stage started
+522ms ║║Comparison (enum) open changes_to (string) closed = false (1ms)
+524ms ║║Cancelling condition #2’s schedules…
+525ms ║║Condition #2 evaluated false (8ms)
+527ms ║║Cancelling condition #1’s schedules…
+528ms ║║Condition group #1 evaluated false (state changed) (12ms)
+531ms ║╚Execution stage complete. (23ms)
+532ms ╚Event processed successfully (532ms)


#6

I don’t know if it matters but your local state has an @ sign used for global variables, try it without.


#7

I will try that, thank you!


#8

Still no change…

New log:

1/27/2019, 12:40:39 PM +365ms
+1ms ╔Received event [Emergency Lights Active].contact = closed with a delay of 204ms
+892ms ║RunTime Analysis CS > 23ms > PS > 844ms > PE > 25ms > CE
+894ms ║Runtime (42452 bytes) successfully initialized in 844ms (v0.3.109.20181207) (892ms)
+895ms ║╔Execution stage started
+907ms ║║Comparison (enum) closed changes_to (string) closed = true (1ms)
+909ms ║║Cancelling condition #2’s schedules…
+910ms ║║Condition #2 evaluated true (8ms)
+911ms ║║Cancelling condition #1’s schedules…
+913ms ║║Condition group #1 evaluated true (state changed) (11ms)
+916ms ║║Cancelling statement #3’s schedules…
+941ms ║║Executed virtual command [Den Light].loadStateLocally (2ms)
+946ms ║║Executed virtual command [Garage Light 1].loadStateLocally (1ms)
+950ms ║║Executed virtual command [Garage Light 2].loadStateLocally (2ms)
+954ms ║║Executed virtual command [Garage Light 3].loadStateLocally (2ms)
+959ms ║║Executed virtual command [Garage Light 4].loadStateLocally (1ms)
+963ms ║║Executed virtual command [Garage Light 5].loadStateLocally (2ms)
+967ms ║║Executed virtual command [Garage Light 6].loadStateLocally (1ms)
+972ms ║║Executed virtual command [Garage Light 7].loadStateLocally (2ms)
+977ms ║║Executed virtual command [Garage Light 8].loadStateLocally (3ms)
+982ms ║║Executed virtual command [Hall Light].loadStateLocally (1ms)
+986ms ║║Executed virtual command [Laundry Room Light 1].loadStateLocally (2ms)
+990ms ║║Executed virtual command [Laundry Room Light 2].loadStateLocally (1ms)
+995ms ║║Executed virtual command [LivLamp 1a].loadStateLocally (1ms)
+999ms ║║Executed virtual command [LivLamp 1b].loadStateLocally (2ms)
+1003ms ║║Executed virtual command [LivLamp 2a].loadStateLocally (1ms)
+1008ms ║║Executed virtual command [LivLamp 2b].loadStateLocally (2ms)
+1012ms ║║Executed virtual command [Mina’s Light].loadStateLocally (2ms)
+1017ms ║║Executed virtual command [Neal Ceiling 1].loadStateLocally (1ms)
+1021ms ║║Executed virtual command [Neal Ceiling 2].loadStateLocally (2ms)
+1025ms ║║Executed virtual command [Neal Ceiling 3].loadStateLocally (2ms)
+1030ms ║║Executed virtual command [Neal Lamp 1].loadStateLocally (1ms)
+1034ms ║║Executed virtual command [Neal Lamp 2].loadStateLocally (2ms)
+1039ms ║║Executed virtual command [Neal Lamp 3].loadStateLocally (1ms)
+1043ms ║║Executed virtual command [Neal Lamp 4].loadStateLocally (2ms)
+1047ms ║║Executed virtual command [Oven Light].loadStateLocally (2ms)
+1052ms ║║Executed virtual command [Rec Room Light 1].loadStateLocally (1ms)
+1056ms ║║Executed virtual command [Rec Room Light 2].loadStateLocally (2ms)
+1060ms ║║Executed virtual command [Rec Room Light 3].loadStateLocally (2ms)
+1065ms ║║Executed virtual command [Small Lamp].loadStateLocally (1ms)
+1069ms ║║Executed virtual command [Todd Ceiling Light 1].loadStateLocally (2ms)
+1073ms ║║Executed virtual command [Todd Ceiling Light 2].loadStateLocally (1ms)
+1078ms ║║Executed virtual command [Todd Ceiling Light 3].loadStateLocally (1ms)
+1082ms ║║Executed virtual command [Todd Ceiling Light 4].loadStateLocally (2ms)
+1085ms ║╚Execution stage complete. (190ms)
+1087ms ╚Event processed successfully (1086ms)
1/27/2019, 12:40:09 PM +193ms
+1ms ╔Received event [Emergency Lights Active].contact = open with a delay of 69ms
+555ms ║RunTime Analysis CS > 18ms > PS > 335ms > PE > 202ms > CE
+558ms ║Runtime (42449 bytes) successfully initialized in 335ms (v0.3.109.20181207) (556ms)
+559ms ║╔Execution stage started
+569ms ║║Comparison (enum) open changes_to (string) closed = false (1ms)
+571ms ║║Condition #2 evaluated false (6ms)
+572ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+575ms ║╚Execution stage complete. (17ms)
+576ms ╚Event processed successfully (576ms)
1/27/2019, 12:39:17 PM +226ms
+1ms ╔Starting piston… (v0.3.109.20181207)
+1096ms ║╔Subscribing to devices…
+1193ms ║║Subscribing to Emergency Lights Active.contact…
+1861ms ║║Subscribing to Den Light…
+1863ms ║║Subscribing to Garage Light 1…
+1865ms ║║Subscribing to Garage Light 2…
+1866ms ║║Subscribing to Garage Light 3…
+1868ms ║║Subscribing to Garage Light 4…
+1872ms ║║Subscribing to Garage Light 5…
+1874ms ║║Subscribing to Garage Light 6…
+1876ms ║║Subscribing to Garage Light 7…
+1878ms ║║Subscribing to Garage Light 8…
+1879ms ║║Subscribing to Hall Light…
+1881ms ║║Subscribing to Laundry Room Light 1…
+1883ms ║║Subscribing to Laundry Room Light 2…
+1884ms ║║Subscribing to LivLamp 1a…
+1886ms ║║Subscribing to LivLamp 1b…
+1887ms ║║Subscribing to LivLamp 2a…
+1889ms ║║Subscribing to LivLamp 2b…
+1891ms ║║Subscribing to Mina’s Light…
+1892ms ║║Subscribing to Neal Ceiling 1…
+1894ms ║║Subscribing to Neal Ceiling 2…
+1896ms ║║Subscribing to Neal Ceiling 3…
+1897ms ║║Subscribing to Neal Lamp 1…
+1899ms ║║Subscribing to Neal Lamp 2…
+1900ms ║║Subscribing to Neal Lamp 3…
+1902ms ║║Subscribing to Neal Lamp 4…
+1904ms ║║Subscribing to Oven Light…
+1905ms ║║Subscribing to Rec Room Light 1…
+1907ms ║║Subscribing to Rec Room Light 2…
+1908ms ║║Subscribing to Rec Room Light 3…
+1910ms ║║Subscribing to Small Lamp…
+1912ms ║║Subscribing to Todd Ceiling Light 1…
+1913ms ║║Subscribing to Todd Ceiling Light 2…
+1915ms ║║Subscribing to Todd Ceiling Light 3…
+1916ms ║║Subscribing to Todd Ceiling Light 4…
+1918ms ║╚Finished subscribing (841ms)
+1960ms ║Cancelling condition #2’s schedules…
+1962ms ║Cancelling condition #1’s schedules…
+1999ms ╚Piston successfully started (1999ms)


#9

Are they all rgb bulbs? Try it with a dumbed down version using one or two bulbs for now then capture the H, S, and L values.


#10

There are 3 RGB bulbs in the list; 1 is a daylight/soft white; and the rest are exactly the same (same make and model).

I will create a test using just a few of the ones that are exactly the same. Then I’ll add an RGB, and see what happens. Then I’ll add the daylight/soft white light, and see what happens.

Thank you, again!


#11

Here is more detail about the bulbs I have:

3 Lights:
Sengled Element Multicolor (RGBW, 2700K to 6500K, Dim)

1 Light:
Sengled Element Plus (2700K to 6500K, Dim)

The rest:
Sengled Element Classic (2700K, Dim)


#12

I tested with just 2 of the “Sengled Element Classic (2700K, Dim)” bulbs.

Same results. Lights come on, but do not return to Captured State.


#13

I tested with just 1 of the “Sengled Element Multicolor (RGBW, 2700K to 6500K, Dim)” and added Hue to the capture.

Light came one, but instead of returning to Capture State, it changed the bulb to Daylight, where it was previously Soft White and Off.


#14

Should there be a symbol in front of the Variable Name? Like # or $

You said @ was for global…is there one for local?

***** I’ve reached the maximum number of replies a user can have on their first day ??? *****

I think this is counting from first post, not first day… I joined Friday night…today is Sunday…

Cannot post yet… I hope you see this…

I changed this from 2 pistons (one for ON, one for OFF) to 1 piston with 2 IFs, as in your example.

This fixed the issue!!!

Thank you so much!!

Does this mean that the Capture and Restore must be in the same piston?


#15

I’m going to try it with one of my hue bulbs.


#16

This one I tested on one hue bulb.


Need help with capture and restore
#17

Regarding the variable names, in capture/restore, names are optional but for other uses within webcore, global variables have @ prefix, system variables have $ and locals have none.

Edit: See if you can post now.


#18

I changed this from 2 pistons (one for ON, one for OFF) to 1 piston with 2 IFs, as in your example.

This fixed the issue!!!

Thank you so much!!

Does this mean that the Capture and Restore must be in the same piston?


#19

Yes, if the restore variable is local. For a two piston setup then you’d have to store in global.