[OBSOLETE] Circadian Daylight: SmartThings + Smart Bulbs

I’ve never used Lifx, what device handler are you using? The likely explanation is that they implement a non-standard input for color temperature/level. Lights should update when first turned on, and every 15 minutes. So if a device is adjusted outside of Circadian Daylight it should be “fixed” within 15 minutes. If lights are adjusted outside of SmartThings, and SmartThings isn’t properly updating the device state, then SmartThings may think that they don’t need to be adjusted.

Latest version will always be in development, you don’t need to switch. When everything in development is stable I merge it with the regular branch and they will be the same until I start more development.

SmartThings app → Automation → SmartApps → Circadian Daylight Coordinator
When you first go in you’re presented with all your child configurations. You can select those to edit them, or press “NEXT” to continue through the initial setup settings. Not super obvious, but this is dictated by SmartThings.

I’ll add it to the to-do list, I do agree that this time of year sometimes lights will be too dim. By 10:30-11pm they’re almost down to 1%. I only have “accent” lights set to dim so not a huge deal for me but I could see how it could be an issue for others.

I had similar issues with my LIFX bulbs using the default LIFX (Connect) SmartApp from ST.

I removed that and went with this:

Much better in every way. Status updates, commands, and Circadian Daylight all has been working perfectly for me. Not had a single issue so far.

Highly recommend it for any LIFX bulb users.

2 Likes

Great – found my way back into the settings. It seems to cutoff the first digit of my zipcode (0), not a big deal but might be a bug.

Yes, the brightness issue is a concern. It is 5:15pm now and I am already down to 80%. These lights aren’t bright to start with so I pretty much need 100% until 8 or 9. As you said, last night I was down to 1% quite early. It would probably be nice to have the ability to adjust the start time as well as the time to go from max to min, but just the delay would do wonders…

Yup, stupid oversight. I added it to the to-do list. Thanks!

I was using the default LIFX handler but tried the LIFX Group of Groups, as jpark40, suggested and the Better LIFX Bulb handlers this morning. Same problem though with the lights not updating changing. Here are the erros for the handlers. I can change the lights fine myself with both handlers.

‎3‎:‎45‎:‎22‎ ‎PM: error LIFX-GoG – null – groovyx.net.http.HttpResponseException: Unprocessable Entity

‎3‎:‎45‎:‎15‎ ‎PM: error LIFX – null – groovyx.net.http.HttpResponseException: Unprocessable Entity
‎3‎:‎45‎:‎15‎ ‎PM: info LIFX – null – Color temperature selected = 5988.023952095808K.

I had this same issue and it was fixed in the development branch.

Update both main app and coordinator with these and the problem should go away.

Thank you for pointing that out. I just pushed the development version to stable (it has been live since September) so everyone on the stable branch can benefit from that fix as well.

Been playing around for the past few days – can you explain what the sunset offset does? I tried setting it to 180 to “delay” things by three hours. It seems to cause a delay, but not to the same point things would be three hours earlier if I had the offset set to 0.

I am trying to use this for all of the lights in my family room which I know is different than your installation. How does the app determine the target temp and brightness? I feel like I have noticed some significant jumps in temp – is this just in my imagination, or is the transition sometimes more than 100 degrees?

It seems like with the settings as they are now, lights are both too dim and too warm. I wonder if this is the kind of thing that could be fixed for all users at once, or if there would need to be some type of ability to creative custom curves both for temp and brightness.

Just tried to install this app - but when I try to create a new circadian daylight setup - i see "sorry, but there was an unexpected error"
I am a newbie so maybe I am doing something wrong?
Process i followed - took the latest source code from here https://github.com/claytonjn/SmartThingsPublic/blob/Circadian-Daylight/smartapps/claytonjn/circadian-daylight-coordinator.src/circadian-daylight-coordinator.groovy and created a new smartapp in IDE using the same. Saved and Published to myself. On smartthings app, added from my apps and went through the initial setup fine (everything left default).
Any guidance?

There are two SmartApps, the coordinator and the child. Did you install both?

aaha the child - https://github.com/claytonjn/SmartThingsPublic/blob/Circadian-Daylight/smartapps/claytonjn/circadian-daylight.src/circadian-daylight.groovy

tried installing the child earlier and it gave an error. That was before I installed the co-ordinator and now I remember the error it threw up was “co-ordinator missing” :slight_smile: makes sense now -was able to get through the setup after installing the child :slight_smile:

Now I have a osram rgbw bulb (a60), do I need to do anything special to get things to work? After adding it in the setup, I am still waiting for it to go on - i tried clicking the play button on the app and in livelogs it does say “Color Temperature set to 5208” then “Brightness set to 1” and then “Color Temperature set to 2000”. But the bulb has not gone on yet!

I see people on the osram thread saying it works Osram/Sylvania Lightify (it works)

Edit - never mind, realised it kicks in as soon as i turn on the bulb :smiley:

@bosox I didn’t forget about your post. The delay passes whatever is set into sunsetOffset/sunriseOffset in the getSunriseAndSunset() SmartThings method. I looked at the documentation further, and it actually looks like it expects a string in the format “HH:MM” (although nothing in the documentation really specifies that) whereas I’m passing a number.

I don’t use sunrise/sunset delay, but I know other people do. Has it ever worked? I’m going to update my code to follow the example in the documentation, but I’m curious if something has changed on the ST side or if I just overlooked this completely.

1 Like

That seems to have fixed things. The lights have been changing as I expected them to since I installed the updates. Thank you.

Quick question, for my circadian smart app to automatically update do i just point it to smartthings public master under source code options ?

You have to add my repository like this:
(Or Circadian-Daylight-Development for beta)
Then point the SmartApps to that repository.

Also, to be clear, the SmartApps still won’t automatically update - you still have to manually select Update from Repo, select the repository, select the SmartApp(s) to update, select publish and update. It’s easier than opening the code on GitHub, copying and pasting, etc., but not exactly automatic.

1 Like

^^ thanks done :slight_smile:

Sorry – been traveling. I will update and take a look over the holidays.

But to answer your question – yes, the delay definitely has been doing something. I have it set to “120” which I assumed was 2 hours. Like I said, it doesn’t seem to delay things by that amount of time, but it is definitely doing something. I am curious how it will be now with your update. Any idea what “120” would mean if it was expecting a string in a different format?

Nope, not really. My guess is that it might have just stopped at 60 minutes, but I really have no idea. I just pushed an update to the development branch that should hopefully fix the issue, it requires that anyone using the sunrise or sunset delay go back through the settings and fix it to be in the HH:MM format. I could have parsed the number into the string, but it would be unnecessary overhead during SmartApp execution; cleaner to just fix it in settings.

Is there any way to break out of the rhythm, if a bulb has been manually adjusted? For example, my wife will set the lights to 15% when she feeds the baby, but the circadian Routine sets them back :disappointed: