Setting the color and level of a Hue Bulb while off?


#1

1) Give a description of the problem
I need to change the level and color of a Hue RGBW bulb between uses without it turning on. All attempts to do so cause the bulb to come on.

2) What is the expected behavior?
I want the bulb to come on at a level of 30% color Red when I switch my system to Night Mode and then fade to 0% an hour later. The following morning at 6:00 am I want the bulb to fade up from 0% to 100% over 30 minutes with a color of soft white.

3) What is happening/not happening?
I’ve written a couple different pistons attempting to do this but any attempt to change the color while the bulb is off caused it to come on. If I instead set the color as the first Do statement it will come on for a brief moment at the prior color

Is there any way to configure the color or level before the bulb comes on?


#2

Correct. That is the way they work.

No, unfortunately.


#3

Thanks for the reply.

Bit of a bummer. Seems like a design shortcoming that they could easily resolve.


#4

I havent tried this … but if you did a

Set Level 1%
Set Color
Set Level 100%

would that work?


#5

Unfortunately, that doesn’t work.

I set up a test piston to run the two scenarios in succession as follows:

Set Level 0% (also tested 1%)
Set Color Red
Set Level 30%

When the above runs, the light having previously been set to Soft White will flash white then go to 0%, change to red and, then come on at 30%.

It then shuts off as follows

Fade Level to 0% in 30 minutes
Turn Off

If I place a set color statement after the fade the light comes back on at a low-level, changes to white and stays on. Even if I put a Turn Off after that I still have the white flash

The reverse, of course, is happening with the other routine. It I want it to fade up from 0% to 100% soft white but I get a red flash at the start based on it previously having been red.


#6

Not directly - if you are using the stock DTH that SmartThings provides for the Hue Bulbs. Both the setLevel and setColor functions for that DTH call the on function, so you can’t call either without also turning the bulb on.

You can achieve this using custom Hue DTHs, like the ones installed using my Hue B Smart smartapp. It incorporates scenes and Groups as well as bulbs. I use the setToGroup() function of the scene DTH to apply the light states of that scene to any group of hue bulbs. When doing so, the bulbs turn on to the correct level, temperature, and/or color.


#7

Try just set color to red and then set level to 30. You shouldn’t need the set level to 0% (or 1). When you set color to red it will also turn on the light.


#8

I have not played around with fades yet, but I often use color bulbs as a sort of notification for one thing or another. It used to bother me that the color stuck, so if I simply turn on the light later, it is still at the old color.

This is my workaround, and it works brilliantly:

On your night mode, after your hour fade, simply program one last command in your piston:

with
    Color Bulb
do
    Set level to 1%
    Set color to Soft white
    Turn off
end with

This will reset the color, and prepare it for the morning… (and you won’t even notice it happening) Alternatively, you could also use the lines above at the VERY beginning of your morning piston. Basically, you will rarely (if ever) see a wrong color.

Here is an example of one of mine that gets used OFTEN and works great. (You can ignore the first line, since that is my notification Flash) Also, you may not need the pauses, or the double off, but I like the reliability of this…

trash


#9

One way or another, if you set them to one color and want them another, they have to be set that way. Alternatively, if you’re turning them on with a button, the action for that button should, IMHO, when it’s pressed, first set the color, then the brightness. That way you will always have the bulbs in the color you want. Otherwise, you run the risk of them being the wrong color.


#10

I agree with you @Ryan780 100%.
My suggestion is just to work around that limitation.

So in your example, I would:

Set level to 1%
Set color to YourChoice
Set level to where you want it

It does add about a quarter of a second to the command, but at least you won’t see the wrong color


#11

Exactly…I like what you suggest about having a routine do it. But to be safe, have it also come on the command. You don’t know who was going in there and screwing with it (if you don’t live alone). If you do live alone and someone was screwing with it you have bigger problems I guess. :stuck_out_tongue:


#12

My method for that is to have each color command “clean up” after itself…
So it basically ‘resets’ to my preferred color after any color notifications.

(like the example I gave 4 posts back)

You are right though. If someone else manually changes the color without using a piston to do so, the color will not be reset unless the extra code I mentioned is placed at the beginning of the new piston. I have a different method that I use for this (but it also works after any power outages) I made a simulated switch called “Reset”… and when I say “Alexa, turn on reset” all my colors return to my favorite color & brightness. Works like a charm


#13

I like that…but you don’t actually have to create a virtual device you know (i’m trying to cut down on mine since it’s starting to take a while for the ST app to load on my phone). You can use IFTTT and create a custom command and then send that to ST with WebHooks. So, you’d tell IFTTT the phrase like 'Alexa, reset all my bulbs." and then send that to WebCore with webhooks. I use that for a bunch of processes like these. Then you don’t get into the problem of having to clean up the device’s status and you don’t have the silly virtual device hogging up space. Just another way to skin the cat. :cat2: :sunglasses:


#14

One of the things I love about webCoRE… Sooo many ways to skin a cat!

I do a few commands with IfTTT, but I hate the forced expression, “Alexa, trigger blah-blah”, and I found the response time much faster with simulated switches. As an added bonus, many of my switches acts like a variable, so other pistons will check to see if a certain simulated switch is on or off, and act accordingly.

It’s a bit ironic I guess… I am a huge fan of IfTTT, yet I only use it as a last resort…

As far as keeping my simulated switches organized, I simply prefix the “Device Network Id” with a letter “V” (ie: VReset) so they stay grouped together at the bottom.

I admit though, the only time I open the ST app on my phone these days is to add a new device to webCoRE.

Oh and I also have a piston run each day at 5AM to reset most of my simulated switches. Just in case something is out of whack.


#15

I didn’t realize that you had to say trigger with alexa. That’s silly. I use google home and you can use any phrase you want. For a while I had it set up to do some fun stuff with commands like “Hey google, it’s party time.” and stuff like that. See, another reason google is better. hehe.

I have been going into it more since i’ve been working with some things I’ve never used before. Just automated almost all my blinds in the house…working on the vertical ones last. And so, to save time i just used the ST app.


#16

Google Home is on my wish list, but I am currently knee deep in the Alexa Echo-system. I do want one though for the rare occasions that Alexa lets me down.

After all my research, I think Google Home dominates for media (TV) controls via Chromecast, but I think Alexa is still much farther advanced when it comes to all other smart home features. (and I don’t really watch TV anyways)

Some people like how Google tries to guess what you mean when you say a phrase, but I personally like the precision that I get with Alexa.

Translation:
Alexa requires more precise commands, but you get precise results
Google Home is ‘looser’ in what you can say, but it also misinterprets quite a bit what your intentions are


#17

Yup, I’d agree with that.


#18

for some bulbs there is a way to control the fade on / off and level change time. i am not sure if hue supports that. but if it does it helps a lot if you set the fade on and/or level change transition time to 0 ms. the turning on / color change / then setting to the new level is much less disruptive to the eye and can even be imperceptible if you are not actually focused on the bulb.

just something you might want to check.