1) Give a description
I’m trying to create a piston when I turn on any light(s) in my house it will change the light temperature and level of the light(s) that was turned on. If a light is already on it won’t change the color or level unless the variable is updated.
2) What is the expected behavior?
This piston works pretty well when one light is turned on at a time.
3) What is happening/not happening?
There are two problems: Frist, when I turn a group of lights most of the time there is a large delay for the last light (Usually a semaphore of 10 seconds). Second, when I turn on a group of lights sometimes a light won’t change to the @Hosue_Light_Temp or @House_Light_Brightness variable that is set.
I’m trying to write the code to be as fast as possible with little delay. I’m open to suggestions to improve this code or if there is a better way to write it.
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
+0ms ╔Received event [RGB Bulb 3].switch = on with a delay of 94ms
+10248ms ║Piston waited at a semaphore for 10063ms
+10250ms ║Runtime (45798 bytes) successfully initialized in 10119ms (v0.2.101.20171227) (10249ms)
+10251ms ║╔Execution stage started
+10305ms ║╚Execution stage complete. (54ms)
+10306ms ╚Event processed successfully (10306ms)
1/12/2018, 1:38:34 PM +413ms
+2ms ╔Received event [RGB Bulb 2].switch = on with a delay of 164ms
+251ms ║Runtime (45731 bytes) successfully initialized in 113ms (v0.2.101.20171227) (249ms)
+252ms ║╔Execution stage started
+353ms ║║Executed [RGB Bulb 2].setColorTemperature (30ms)
+371ms ║║Executed [RGB Bulb 2].setLevel (16ms)
+497ms ║╚Execution stage complete. (244ms)
+498ms ╚Event processed successfully (497ms)
1/12/2018, 1:38:33 PM +425ms
+2ms ╔Received event [RGB Bulb 1].switch = on with a delay of 179ms
+254ms ║Runtime (45741 bytes) successfully initialized in 104ms (v0.2.101.20171227) (252ms)
+255ms ║╔Execution stage started
+385ms ║║Executed [RGB Bulb 3].setColorTemperature (31ms)
+407ms ║║Executed [RGB Bulb 3].setLevel (20ms)
+491ms ║╚Execution stage complete. (236ms)
+492ms ╚Event processed successfully (492ms)`