Circadian Daylight slowly synchronizes your color changing lights with local perceived color temperature of the sky throughout the day. This gives your environment a more natural feel, with cooler whites during the midday and warmer tints near twilight and dawn.
In addition, Circadian Daylight can set your lights to a nice cool white at 1% in “Sleep” mode, which is far brighter than starlight but won’t reset your circadian rhythm or break down too much rhodopsin in your eyes.
Special thanks to @juano2310 for working through some of the internal Hue code :), and a very special thanks to @Kristopher, who started this project. This SmartApp was a large contributing factor in my decision to purchase the SmartThings hub and Hue lights. All credit goes to him for this project, and I am very grateful that he has given me his blessing to continue development.
Interesting idea. I noticed the selection of a Hue Bulb is “//” commented out…
It wasnt working selecting the bulb as a switch. I removed the comment, and selected the bulb, but it just turned on from motion, It did not change the color to 1% since its night now. Also, it doesn’t ask my ZipCode, how is it getting the sunrise/sunset schedule?
Good catch about the device getting commented out – the simulator is broken and you have to comment out the Hue itself when you’re simulating. Maybe @juano2310 can help fix that (its in the Hue (Connect) somewhere)
Its hardcoded to dim to 1% if you are specifically in a mode called “Sleep”. I believe I can make that a selector in the next revision.
You Hub should already know your zip code from the global settings. That’s where its pulling sunrise / sunset from
So this is amazing. The only thing I don’t like about your code is that if you don’t have one of the 3 options (switch, motion sensor, etc), you technically can’t run the app, it errors out. I simply deleted what I didn’t have in the code and it worked fine.
But my question is, do the “colors” you have selected work with phillips hue lux lights? IE the white variations only ones? If that’s the case, because they are so much cheaper, I’m considering filling the rest of my house with them.
Right now it should work with any bulb that has a “capability.colorControl” - which to my knowledge is only the Philips Hue lights (via the ST bridge or the Philips Bridge).
I am going to add support for dimmers so they can at least get the sleep schedule component. So Lux would work with that.
There is also a new bulb on the market called Osram Lightify. It specifically only can color change along the color temperature space – so its basically the perfect bulb for this application but half the price of a Hue. I just got some last night so I will get those supported as well
And these bulbs will also allow for the starlight setting (that setting is a gem for eyes at night)? And, just to be clear, I do not need the Lightify gateway because it will pair directly with ST hub correct?
I do both. Its a lot more complicated to manage, it is a lot cleaner to have both. I added code to make the Jasco blue LED light light up with motion which everyone likes too. Too bad those aren’t color adjustable, that would be awesome.
Having never dabbled much in updating smartapps, if I update your app by simply pasting your updated code, and selecting save and publish for me again, do I need to delete the old settings in my smartapp or can I just keep using the old one without creating a new instance of it? If that makes any sense, having a hard time elaborating what I mean.
Had a new issue arise the past few days, wondering if you could give me a hand. I have my kitchen and under bed lights set to turn on with motion, and turn off 1 min after motion stops. They are also on the Circadian Daylight Smartapp, with sleep mode at 10 pm every night. The last 3 nights in a row, for some reason, the lights turn on at 10 pm, even without prompting from motion. The problem is, they stay on. All night. Unless I remember to manually switch them off via smartthings. Any idea what’s causing this? Seemed like it was working before.
I noticed the same thing too on my side even without changing any of the code. I think what’s happening is one of the two scenarios:
SmartThings is not aware of the state of the bulb. I’ve noticed this with my Osrams specifically which is a little annoying since they are connected directly to the ST Hub. If you have a Z-wave controller, I’ve noticed that someones the inbound infrastructure commands have trouble, and the only way to fix that is a cold reboot of the Hub. That doesn’t explain why your lights turned on (did they turn on at full capacity?), but it might be at least part of the problem
I’ve noticed with short turn off times, sometimes ST gets crazy overloaded on the cloud side and your off command can get so delayed that it effectively fires out of order. 10PM EST is close to the infamous ephemeral “California Sunset” when ST just grinds to a halt…
Let me know if either of those two scenarios might be playing out. Definitely try resetting your Hub and extending your turn off time by another minute. Hope that helps!