Color Cycling is Freezing


#1

1) Give a description of the problem
I have 4 lights in my living room. All Sengled RGBW BR30 bulbs and I am trying to get them to randomly cycle through colors to give a color/twinkling effect.

2) What is the expected behaviour?
I trigger the Virtual Switch and it ensures that the 4 lights are on and then begins a random color cycle for each not stopping until the Switch is triggered to off. Then when I trigger the switch off the lights return to their normal color.

3) What is happening/not happening?
Everything is working fine and then just stops after about 20 seconds. After this time the switch off does not work either. I am not sure if I am just overwhelming something or if there is a timeout I am missing. I am fairly new to all of this and did some digging but coming up empty.

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full

+0ms ╔Received event [Home].test = 1586831455299 with a delay of 1ms
+96ms ║RunTime Analysis CS > 22ms > PS > 46ms > PE > 28ms > CE
+99ms ║Runtime (41303 bytes) successfully initialized in 46ms (v0.3.110.20191009) (97ms)
+101ms ║╔Execution stage started
+113ms ║║Condition #16 evaluated false (7ms)
+115ms ║║Condition group #15 evaluated false (state did not change) (9ms)
+124ms ║║Condition #50 evaluated false (5ms)
+125ms ║║Condition group #49 evaluated false (state did not change) (7ms)
+129ms ║╚Execution stage complete. (29ms)
+130ms ╚Event processed successfully (130ms)

#2

Ultimately I am trying to do this so a 3 year old cooped up in her house can have fun dancing to music and not drive me insane so any help is appreciated.


#3

I am a bit tied up at the moment, but I am thinking something basic like this:

repeat (normal, not async)
   Bulb1 Set color to random
   wait random 1-3 seconds
   Bulb2 Set color to random
   wait random 1-3 seconds
   Bulb3 Set color to random
   wait random 1-3 seconds
   Bulb4 Set color to random
   wait random 1-3 seconds
end repeat

I love your honesty!


#4

I noticed from your log that you started the piston with the TEST button.

Did you trigger the piston with your Switch 1 switch by changing it to ON?

I suspect that your WAIT statements may have caused your piston to re-evaluate the Switch 1 status. I am wondering…after a WAIT, does the Switch 1 changes to ON evaluate to true? I wonder what would happen if you changed the trigger to Switch 1 IS ON.

I am still personally struggling with understanding the “Changes to ON” versus “IS ON”. How long does “CHANGES to ON” remain true? As long as the switch is ON? So ignore this post if my thoughts are erroneous.


#5

This is a good thought… i always assumed CHANGES TO ON would trigger better than IS ON, but that is a good thought


#6

This is a great starting point, I need to work to make them cycle faster. Thanks for your help.


#7

I can confirm that it remains true for at least 8 hours. (likely much longer)
I have two posts here showing details…


#8

Good catch, @Pantheon. This type of piston should be tested with the actual trigger, not the test button.


One more observation I just noticed:
I would change line 72 to a condition, instead of a trigger. IE:
... Until Switch 1 IS off
(the other two references to Switch 1 should remain a trigger)


#9

Ah yes, thanks for reminding me of those posts. I read them then, and promptly forgot them. Sorry for digging up solved questions. :smile: