Color Temp as a "Change Color" function?

I’ve got a bunch of the Lightify Tunable White bulbs in my setup. If I open up each bulb individually, I can change the color temperature. However, any SmartApp that includes “change color” doesn’t see the bulbs. They’re only seen to SmartApps as dimmable.

Obviously, a range of white color temperatures isn’t the same as an RGBW bulb, but in a practical sense is there really any reason to not consider color temperature to be a color change?

It’s not a RGB color change because it’s a different attribute. The two attributes are changed independently, color temperature and RGB color.

It’s up to the author of each smart app/routine to provide the ability to set the two attributes, and many authors were only used to working with Philip Hues, which don’t have temperature controls.

I believe rule machine has either added temperature controls or is going to shortly, so you could take a look at that. It would install as custom code but offers many more control choices than smart lighting does.

This first topic covers how you add custom code.

If that then sounds like something you would be comfortable doing, then

The following topic has the code for rule machine:

It’s not a RGB color change because it’s a different attribute. The two attributes are changed independently, color temperature and RGB color.

It’s up to the author of each smart app/routine to provide the ability to set the two attributes, and many authors were only used to working with Philip Hues, which don’t have color temperature controls.

Also, if the smartapp allows you to group Hues and Ostrams together, you may only see the subset of the attributes that they have in common.

I believe rule machine has either added color temperature controls or is going to shortly, so you could take a look at that. It would install as custom code but offers many more control choices than smart lighting does.

This first topic covers how you use custom code.

If that then sounds like something you would be comfortable doing, then

The following topic has the code for rule machine:

I’m not sure how/if smarttiles uses color temperature, but that might be another option. @tgauchat would know.

2 Likes

The current version of SmartTiles (V5) does not support color controls of any sort due to the limited UI space in the design.

Personally, I’m a big believe in Scenes for Lighting, and thus, I would emphasize that SmartTiles can be an excellent scene activator even in its current form via the Routines Tile or Virtual Switches / Buttons.

Not sure where I’d put this in our priority list, but I would like have a Lighting Scene editor built into SmartTiles someday. Lighting slider dashboards are a common feature of both high-end and low-end UIs…

Here’s the Lighting page of Control4’s App, for example:

I had a twitter conversation last week with @florianz and it sounds like color temperature is on the shortlist for Smart Lighting.

5 Likes

Color temperature is a fairly new capability for the market beginning this year. It’s so new to ST that it still isn’t documented in the capability reference. But hopefully it gets added soon and will start popping up as an option in more apps.

In the interim, I’ve built the below SmartApp/Child Device combo to help you make color temp changes anywhere you can change dim level. The SmartApp creates a Child Virtual Dimmer that will convert a setLevel command to it into a color temperature adjustment for selected lights. For example, say you want to lower the color temp at sunset. You would create a Smart Lighting rule selecting the Child Virtual Dimmer and setting it to a dim level of say 0% (assuming you can choose 0% as a dim level) at sunset, which will in turn change the color temperature of selected bulbs to 2700k.

(Bonus feature is you can use the created Virtual Dimmer directly to change the color temp of multiple bulbs at once.)

You create a new SmartApp with the code from the first link Color Temp via Virtual Dimmer.groovy, and a new devicetype with the code in the 2nd link Color Temp Virtual Dimmer.groovy.

SmartApp

Child DeviceType

3 Likes

We like color temperature bulbs around here :slight_smile:

1 Like

I get this device error in the Logs when I move the slider:

2:39:20 PM:
error groovy.lang.MissingMethodException: No signature of method: script1449257959987635608637.updateTemp() is applicable for  argument types: (java.lang.Integer) values: [5094] Possible solutions: updatedTemp(java.lang.Object) @ line 87

Also on the device list in app I see “${…” instead of a value

1 Like

I thought I could use this with the Amazon echo. For example say alexa dim color 10 to change to 3080k. Or ifttt but ifttt does not even seem to have a dim option. Anyway, this device does not come up as a device that can be shared with the echo. I guess what I really would like is to set a default warmth for the lights and have it stick when the switch is thrown but I figured I could use this as a work around. So is there a way to get this to act like a light bulb for the echo? Thanks and I appreciate the work you do to help out the community.

It might be because it doesn’t have Seitch capability. It looks like there’s a type conversion bug that stops it from working anyway. I’ll look into both now that I can test it better. Hopefully tomorrow for an update.

I set this up away from home and figured it would work, but you are correct it is currently not working so first things first I suppose. I will mention that a Simulated Switch I added does come up in the echo app to select so maybe there is a way. These white color bulbs need some love :wink: . I like being able to set a custom white balance as I can’t stand 2700k it reminds me of grandmas house or some old run down gas station. If you are going to use 2700k maybe add in a random bulb blinking option so it really reminds me of some old gas station. lol just joking well sorta I know there are some 2700k lovers around so its all in good fun.

P.S. To clarify these lights do work with the Amazon Echo in the fact they can be turned on/off and dimmed. If your program created a device I can link to the Echo then I could then change the white balance via voice command. I would name the device “color” and tell the echo to dim color to whatever level. So your program is really the only option to do this as there is no work around I know of.

Looks like the type conversion was just a typo in the devicetype. I fixed that and it works correctly now. I also added Switch capability and the Echo was able to see it.

In my testing trying to set the dim level via the Echo didn’t work correctly though and I don’t know why. Echo accepts the verbal command, but for some reason it’s being passed as a relative change to dim level and not an absolute value like for other dimmable devices. The result is it sends level 0 and the color temp always goes to 2700.

Edited: Ok it does seem to work. Maybe I had picked a bad name for the bulb. I had better luck saying “Turn (bulb name) to X percent”.

That was quick :slight_smile: . Do you have a link? I usually say set (name) to x percent as well. Although I wonder if you even need to say the word percent?

I just tested and you don’t need to say the word percent. So I could say . “alexa turn color to 10” . That sounds somewhat normal.

Same links as above. Just updated the github files.

Good luck!

So the changer is working although I have not tried it with my echo yet. I noticed when I exit from changing the light color that its says “sorry, but there was an unexpected error”. I checked the log files and the best I could come up with is
"debug summaryData: [[icon:indicator-dot-gray, iconColor:#878787, value:Unconfigured]] - [[icon:indicator-dot-gray, value:Unconfigured, iconColor:#878787]]

I don’t know if this is from your smartapp or not. but I figured I would mention it.

Edit: Seems this may be common Sorry, but there was an unexpected error