[OBSOLETE] Circadian Daylight: SmartThings + Smart Bulbs

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:

You have a couple different options. If you’re using Hue Advanced (Connect) then there are buttons for each device to enable/disable circadian color and brightness. Also, changing the brightness or color in the device will automatically disable circadian adjustments until re-enabled. If you aren’t using Hue bulbs or don’t want to switch to Hue Advanced then you could either create a virtual switch or use a mode to disable Circadian Daylight for one or more lights. For example, if your wife sets lights in one particular room and you want Circadian Daylight to be disabled temporarily on only those lights, you would remove those lights from your regular Circadian Daylight child instance and add them to a second child instance and select a virtual switch to disable Circadian Daylight. You could even use something like CoRE or your own SmartApp to automatically set the desired brightness on those lights, so that turning on the virtual switch sets the brightness and disables Circadian Daylight all in one shot.

2 Likes

Thanks for the tips @claytonjn. I tried installing the Hue Advanced, but it wouldn’t install, some kind of unknown error. I keep meaning to check out the logs, while I’m installing it, but haven’t got round to doing that yet. Will try again tonight.

If you’re still getting an error feel free to post in the Hue Advanced thread and I can help troubleshoot.

Got it installed. However, when I change the brightness either with a hue dimmer, or in the ST app, it doesn’t disable the circadian routine. Still shows as on in the ST app

RE: Hue Dimmer - this is by design. I thought a long time about this behavior, and I decided that I only wanted Circadian color/brightness to be disabled if the color/brightness is overridden inside the device itself so that the user can see that it was disabled. I didn’t want a SmartApp or other external app changing Circadian Daylight behavior with no feedback to the user. If enough people want this behavior changed I may reconsider, but I think there are better solutions.

RE: ST app - when you say that the ST app isn’t disabling Circadian color/brightness, what do you mean exactly? Are you going into the light itself and changing the brightness level or color? If not, the response is the same as the Hue dimmer. If you are going into the device itself and changing color/brightness and it’s not setting Circadian color/brightness off then I need to investigate further.

I recently tried setting a specific time for both Sunrise and Sunset but it doesn’t seem to work.

For example, to test I set my Sunset times to 10pm when it was around 5pm (after sunset) and the bulbs didn’t change color temp but stayed 2700k (my set min temp). Am I misunderstanding how this setting works? Shouldn’t the color temp change to cooler white since Sunset is now set to 10pm?

Thanks for your time.