Fading multiple Lutron Caseta dimmers at same time


#1

1) Give a description of the problem
Have motion detection routine that turns on outdoor lights to max and then fades them down

2) What is the expected behavior?
On Motion, turn 3 dimmers to 100%, then slowly fade back to original setting (slow fade important to not trigger motion again)

3) What is happening/not happening?
I capture the original setting of each dimmer to three variables. On motion, it works great and everything goes to 100% brightness. However when motion is done, the slow fades cause dimmers to end up at wrong value, they go from 100 down to 15 and then back to 50. All them end up at 50 even though my Garage light is starting at 15%. I tried changing fade timing and it didn’t make difference. I tried a single dimmer and that works fine each time. Wondering what i am doing wrong. Thank you.

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

2/28/2018, 10:53:52 PM +755ms
+1ms	╔Starting piston... (v0.3.000.20180224)
+332ms	║╔Subscribing to devices...
+348ms	║║Subscribing to Front Door Ring.motion...
+432ms	║║Subscribing to FrontGarageLights...
+434ms	║║Subscribing to FrontPorchPotLights...
+435ms	║║Subscribing to FrontRoofPotLights...
+435ms	║║Subscribing to FrontDoorLampDinner...
+436ms	║╚Finished subscribing (116ms)
+472ms	║Comparison (integer) 50 is_greater_than (integer) 1 = true (2ms)
+549ms	║Comparison (time) 82433229 is_between (datetime) 1519859040000 .. (datetime) 1519818900000 = true (5ms)
+550ms	║Time restriction check passed
+563ms	║Cancelling condition #11's schedules...
+574ms	║Comparison (time) 82433319 is_between (datetime) 1519859040000 .. (datetime) 1519818900000 = true (6ms)
+575ms	║Time restriction check passed
+588ms	║Cancelling condition #9's schedules...
+598ms	╚Piston successfully started (596ms)
2/28/2018, 10:44:06 PM +403ms
+1ms	╔Received event [Home].time = 1519875847253 with a delay of -850ms
+152ms	║RunTime Analysis CS > 14ms > PS > 47ms > PE > 90ms > CE
+154ms	║Runtime (44951 bytes) successfully initialized in 47ms (v0.3.000.20180224) (153ms)
+155ms	║╔Execution stage started
+177ms	║║Executed physical command [FrontGarageLights].setLevel([50]) (16ms)
+180ms	║║Fast executing schedules, waiting for 679ms to sync up
+878ms	║║Executed physical command [FrontPorchPotLights].setLevel([50]) (14ms)
+879ms	║║Fast executing schedules, waiting for 3ms to sync up
+900ms	║║Executed physical command [FrontRoofPotLights].setLevel([50]) (13ms)
+901ms	║║Fast executing schedules, waiting for 48ms to sync up
+967ms	║║Executed physical command [FrontGarageLights].setLevel([50]) (12ms)
+984ms	║║Executed physical command [FrontPorchPotLights].setLevel([50]) (12ms)
+1002ms	║║Executed physical command [FrontRoofPotLights].setLevel([50]) (12ms)
+1031ms	║║Calculating (string) 15 + (string) >> (string) 15
+1034ms	║║Calculating (string) 15 + (string) 50 >> (string) 15 50
+1037ms	║║Calculating (string) 15 50 + (string) >> (string) 15 50
+1040ms	║║Calculating (string) 15 50 + (string) 50 >> (string) 15 50 50
+1057ms	║║Executed virtual command [FrontGarageLights, FrontPorchPotLights, FrontRoofPotLights].sendPushNotification (13ms)
+1060ms	║╚Execution stage complete. (905ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

I forgot to mention that i need to use the slow fade otherwise the Lutron dimmers fade too quickly and trigger motion event in Ring (and whole thing keeps going in a loop all night:)


#3

First thoughts are you could try re-writing it with something like this:

When Motion changes to inactive
Then
With location wait 2 minutes
Async With Bulb one fade to xx in yy seconds
Async With Bulb two…
Async With Bulb three…

That way you don’t have 3 fade commands trying to run serially and possibly setting the incorrect level to multiple bulbs.


#4

Here is what I am doing with my Lutron Switches and Ring for motion (as well as door locks etc)

If you look at lines 60 - End
Motion is the Ring, door lock is my front door lock and the lights are all Lutron Caseta (one controlling porch lights outside, one entrance hall light internally) … I’ve not had issues with the lights triggering motion circles you’ve mentioned


#5

I am a bit of a newbie - how would i do the async calls to the three dimmers? I agree, i think Lutron can’t handle the three simultaneous hits and gets confused.


#6

I figured out the advanced options and set the bottom of to a sync. Same result… do I have to put each dimmer call into separate block?


#7

Yes… if you controll them all over in one block they all get sent the same commands.

You need a block for each bulb.


#8

i am a newbie - can’t figure out how to create a bunch of blocks and make them async. If anyone has an example i’d love to see it.


#9

Click on the “With” to Edit the Action. Then select the cog, and change the Execution mode.


#10

That test code worked awesome - no issues with dimmers hitting wrong values… However i’m really struggling on how to add another IF block over and above (need a block that detects motion, turns everything to 100%). Then I need that sample block down below to execute when motion stops. Webcore is super powerful!


#11

Just click ‘add a statement’ outside of your existing IF statement.


#12

Ok got it working… added block at bottom and then moved it up top.

Only thing not working for me is the integration into the DSC alarm device. I wanted to add condition whereby if DSC is “armed” it would do a few more things with the lights vs. if we are home. The DSC device variable in Webcore shows “switch” as the attribute and it is “off” at all times even if I arm. Anybody get this working properly. Thank you again!