Fade Hue, Saturation, and Level at the same time?


#1

Hello, I am trying to fade three Philips Hue lights to a specific color over the period of two minutes. In order to do this it appears I have to set the Hue, Saturation, and Level as individual actions because I want to fade them.

I am able to get the correct outcome, but it takes six minutes. Instead of running all three actions at the same time, its running one a time despite me setting the “with” to to “async”.

Is there something I’m missing?

Thanks!

Scott


#2

ASYNC only does something when there is a WAIT. Otherwise, each line (command) is executed in sequence, and the next command does not begin until the current command finishes.


#3

How can I run the three fade commands at the same time? Do I need to add a 1 second wait or am I doing this completely wrong?


#4

Please don’t take this the wrong way, but even with a single fade, I try to avoid them whenever possible!! They bog down the system, impact other pistons, and prevent any changes to that device once it begin.

Attempting to run three fades is something that I would never wish upon my greatest enemy!!
(which is actually 9 fades using 3 devices)


That being said, a much more reliable method is to use set instead of the fade.

IE:

Set HSL to 2, 25, 6
Wait 30 seconds
Set HSL to 4, 50, 12
Wait 30 seconds
Set HSL to 6, 75, 18
Wait 30 seconds
Set HSL to 8, 100, 25

Yes, I know, it is not as smooth visually, but the code execution will be infinitely more reliable for you, and it only sends out 4 commands instead of more than 300


#5

Up for a bit of Edu-tainment?

I just thought of a silly analogy that might help explain my aversion to fades.
(which basically sends new commands every couple of seconds)


Can you imagine how your shift at work would go if your boss paid you a penny every second throughout your shift? You’d barely get one penny into your pocket before he was handing you another. You wouldn’t be able to get any work accomplished, because all of your time would be spent dealing with the penny that you were just handed.

Hang tight… It gets worse…

Now imagine if that boss had to pay three employees that way… Running back and forth between coworkers, and handing out a penny to each of them every second!?! It would literally take him every bit of concentration trying to keep up, and yet, it’s a completely unrealistic task for him.

The phones might go unanswered, normal duties would take ages (or be ignored), and many of the coins would not even make it to your pocket. (or the boss would cheat and stuff a handful of pennies into your hand all at once)

Basically, until the shift is over, it’s a recipe for disaster…


In this analogy, the “boss” is your ST hub, the “employees” are your bulbs, the “pennies” are the small incremental commands being sent, and the “phone/duties” are other pistons or automations.


#6

Haha that is a great explanation! Thanks!

So I’m confused as to how I was able to do this so easily using Stringify without issues the past.
In Stringify, it could read all of my “scenes” from Hue, and then I could say “fade to this scene in (1-60) minutes” which made it easy for me to do things like simulate a sunrise/sunset, etc.
Is there any kind of equivalent in WebCoRE?

It’s also odd how apps like iLightShow and Hue Disco are able to flash and fade the lights at such rapid rates yet SmartThings can’t handle fading three lights from white to orange over the course of several minutes without being too taxing/overloading of the system.

I’ve done some searching and came across “Hue B Smart” but that looks like a lot of work to completely remove and re-add all my lights to SmartThings. It says it will create momentary buttons for all my scenes (that’s going to clutter things quickly) but even then it’s still not clear if I can fade to those scenes in more then the standard 1-3 seconds.


#7

So after more and more searching, I ended up taking the painful plunge and changing over to “Hue B Smart”. Installing it was easy, but getting it to recognize my Hue bridge after removing it from SmartThings was a nightmare as no one seems have directions on this process and it turns out that it takes 24 hours before you can re-pair the bridge again, even after doing a factory reset on it. :pensive:

Anyways, I’m connected again, and I’m able to push Hue scenes via WebCoRE now. However I’m still struggling with the transitions. So far the only way I can find to increase the transition time more then the default < 1 sec is to build the scenes using an app called “Hue Lights” (which has possibly the worst UI/UX I have ever seen!) I’m able to build scenes and share them to the bridge so that WebCoRE can see them, but whenever I activate the scenes, the fading is not natural. For example, fading from a bright white to a warm dim orange creates an unnatural pink color in the middle? :frowning_face:

It still boggles my mind how Stringify was able to fade between scenes with just a few drags and drops, yet going this route has caused me to spend weeks of frustration just to get fading light bulbs to work. :stuck_out_tongue_closed_eyes:

If anyone has tips on getting the fades/transition working better (perhaps a different app or method) please let me know before I loose what hair I have left :man_bald:

Thanks,

Scott


#8

I don’t know if you will find this helpful, but I suspect the “best” way to dim is when there is programming inside the bulb that can regulate the constant adjustments.

In other words, finding a bulb that can accept one single command from the hub… at which point, the bulb takes over and adjusts from color X to color Y in Z minutes. (this might have been Stringify’s technique)

I would definitely invest in bulbs with that capability… because personally, I do not want non-stop dimming commands traveling all across my network.


#9

@WCmore - I am using all Philips Hue blubs. I’m pretty sure that is how they work (they take one command and then do the dim) the issue is WebCoRE doesn’t seem to have the capability to do this (it insists on spamming the bulbs with individual commands) while other apps like Stringify worked fine without complexity or issue.


#10

I would think that if you discover what command Stringify was sending, then webCoRE could do the same…


#11

So I looked into this and discovered that Stringify talks directly to Hue, not through SmartThings, so the Live Log didn’t turn anything up. Additionally, the Hue Bridge doesn’t seem to have any user accessible logging. At this point, I’m tempted to buy a Lifx bulb just to see if they behave better with WebCoRE.


#12

Here is an old topic mentioning commands going directly to the Hue hub (bypassing the ST hub), and letting Hue control & fade it’s own devices. Hopefully it helps point you in the right direction.