this jumps. if you want to ramp you can combine this with rainbowvalue()
btw which bulbs support 1500K?
this jumps. if you want to ramp you can combine this with rainbowvalue()
btw which bulbs support 1500K?
The LIFX Day & Dusk bulbs hit 1500K. Giving them a shot - hopefully I can get them to behave.
So converting Kelvin to RGB… not so simple… but there’s some code down there that might make a nice piston…
nice. but probably cost $75 or something a bulb.
btw, rainbow might not work since it always returns a color.
I got 'em for $29.99 LIFX bulb colors are amazing, but I think they were designed by artists, not engineers.
try this:
($hour24 < 15 ? int(1500 + (4000 * ((time($now)/1000) / (time(“15:00”)/1000)))) : int(1500 + (4000 - (4000 * ((time($now)/1000) / (time(“23:59”)/1000))))))
Awesome, that gives a rather precise number, thanks.
Now I’m dealing with an entirely different issue - I think I have maxed out the number of wifi clients my router can handle (30!)
probably going to need that for rooms occupancy so thought i would put it together any ways.
300+ devices? what do you have a fully automated mansion?
Hah, no, only 30!
I have a bunch of ESP8266 boards doing various things, each requiring a separate connection. That in combination with wifi bulbs… Stuff is sometimes not showing up in my tables.
@bangali this works great, and so simple to quickly add to tunable white bulbs. As far as I can tell, it’s creating what looks like a triangle wave that peaks at 15:00 (with 5500K), reverses direction, and bottoms out at at 23:59 (with 1500K). Is that correct?
Would you be willing to break this down so I can better understand the expression syntax? I’m wondering if a parabolic curve or sine wave could be created, for instance.
yep. not an isosceles since light does not peak at noon but more like ~3pm.
($hour24 < 15 ? int(1500 + (4000 * ((time($now)/1000) / (time(“15:00”)/1000)))) : int(1500 + (4000 - (4000 * ((time($now)/1000) / (time(“23:59”)/1000))))))
up the hill: int(1500 + (4000 * ((time($now)/1000) / (time(“15:00”)/1000))))
the base is 1500 so thats the leading part. 4000 is the max height of the hill. at 15:00 it should be at peak so divide current time by time at 15:00 and multiply by 4000 to calculate how close to peak it is at any given time.
'down the hill: int(1500 + (4000 - (4000 * ((time($now)/1000) / (time(“23:59”)/1000)))))`
on this one at 23:59 should be back at base of hill. so divide current time by time at 23:59 and multiply by 4000 to calculate how far from peak it is at any given time. then subtract that from peak to find how close you are to the base.
sure. just requires a little work.
Cool - I’ll get to work.
In the meantime I modified the range a tad. 1500 looks like a campfire burning embers.
($hour24 < 15 ? int(1800 + (4700 * ((time($now)/1000) / (time(“15:00”)/1000)))) : int(1800 + (4700 - (4700 * ((time($now)/1000) / (time(“23:59”)/1000))))))
I’m trying to do this too, but I want it to change kelvin value according to the outside temperature. Is this possible? I’ve been trying to figure out the rainbowValue but don’t know how to do kelvins instead of color hex codes. Any help would awesome. Thanks in advance.
rainbowvalue wont work for it. a simple formula to calculate the kelvin based on temperature should work.
try the following piston by restoring it using piston code 7ns4
and selecting the devices when prompted. i have tried to write this so its easy to change and follow … but please dont hesitate to ask questions.
also see this:
Thanks for the piston and the reply. Also, thanks for the info about the reply buttons. I’ll give this a try and let you know what i find. Thanks!