[OBSOLETE] Circadian Daylight: SmartThings + Smart Bulbs

Yup, leaving it as 00000 or blank it will look at the hub location.

2 Likes

Been thinking about this @claytonjn and adding a brightness offset would work well here I think. Offset is different to changing the min/max as it means it still goes through the same range just at different times which would solve the problem. I’m also noticing that in some parts of the house that don’t get as much natural light this is an issue as well so another use case for it. Let me know what you think anyway.

P.S been playing around with using Lux readings from the Smart Weather Tile DH to control switches for lights outside and it came to mind that it could work well to drive CD as an alternative to sunrise/sunset. Don’t know how difficult it would be but maybe something to consider for later down the road?

So the difference with offset is that it would cause “plateaus” in the cycle. If, for example, you set an offset of -20% brightness, at sunset and sunrise the lights would be at 80% (where they would normally be at 100), then they would dim normally, but when they would normally be at 20% brightness they would actually be at 0%, and they would stay there until they would have gone to 0 and back up to 20% (technically the offset would have a negative brightness, but that would obviously translate to 0%). If you instead set the minimum brightness to 20% the lights would dim from 20-0-20 like normal, where they would be 0% for only the instant exactly between sunset and sunrise. So with the first example the rate of change stays the same but you have plateaus where the lights wouldn’t change at all (at either min or max brightness depending on the offset), with the second example you don’t have plateaus but the offset would be slightly different at different times because the brightness is calculated as a parabola rather than linearly. I feel like just changing min/max would be more desirable and feel like the offset would complicate things and be hard to explain in the settings - what do you think?

So you’re suggesting using lux rather than sunrise/sunset to determine brightness, or color temperature, or both? It should be easy enough to implement for brightness (not sure how I would do it for color temperature) but in my experience, lux sensors quickly go from their max to min readings over the course of an hour or so, which would mean quick transitions. Plus, the idea of Circadian Daylight (at least from a color temperature standpoint) is to simulate things consistently to keep your circadian rhythm consistent. My concern is that with a cloudy day or anything like that it would cause things to be inconsistent and defeat the intent.

Thanks for spending the time here @claytonjn. You are right about it being hard to explain (for the settings) i had to read through you post about 5 times.!!! But what you have covered in the second example is exactly how i would want it to work (i.e. set a min as well as an offset). Yes it would have a plateau but that just what i want and would mean i can hit that plateau and stay there when i need it to. I know what you mean about the plateau in the first example but i can thing of cases where that would be helpful too.

It helped thinking about it in my case. I have a naturally dark downstairs and upstairs hall. Because they are long and narrow they are mostly dark but when it is sunny in mid day it does get bright so at mid day i need 100% brightness (and very white colour). The rest of the time i down want it to go down further than 20% as its too dark but from 100 to 20 at the moment i find its too bright. An offset would help me achieve a lower brightness but still keep my max and min. Hope that helps.

This might just be me being picky and have an edge case scenario so if you think it wouldn’t work then thats fine.

Re Lux. Having played around with it for a week you are right about it shooting up and down quickly. I find it helpful as an added variable in my rules but not for the foundation of a trigger so i agree that it wouldn’t work very well here. Its definitely not circadian on a cloudy day!

Again thanks for taking the time. This app is really one of the smartest parts of my smart home!

1 Like

I added it to my to-do list. No promises when it will get done, but it should be fairly easy to implement.

1 Like

Hello,
I’m just learning to get dangerous with community-created SmartApps. This one is of particular interest I can’t seem to find an answer to. I am having a little trouble and I’m hoping someone may be able to help me.

The issue is that I do not see any additional options when I select by bulbs in ST. When looking at the SmartApps tab for my bulbs, it says “No Installed SmartApps”

My steps:

1.) I removed the two bulbs from ST and reset them. They are Osram A19 Tunable White bulbs.
2.) I seem to have installed “Circadian Daylight Coordinator” correctly. It shows up in my SmartApps tab after going through initial questions (zip code, offsets, etc). I have deleted the older “Circadian Daylight” app, since it said to use the Coordinator version.
3.) I rediscovered both bulbs and named them.
4.) Navigate to bulb panel and only see the usual commands. Look in SmartApps for each bulb and observe the “No Installed SmartApps” notice.

I would appreciate any support. Thanks!

I’ve figured this out. I remember when installing CoRE the other day I needed to do the OAuth thing. I performed that on here and have been able to figure it out.

Thanks for creating this, very cool!

Hmm, you shouldn’t need OAuth for this
 All you should have needed to do was open Circadian Daylight Coordinator from Automatoin>SmartApps and select New Circadian Daylight Setup, select your bulbs, settings, etc. Basically, there are two sets of settings. One set that apply to all Circadian Daylight instances (the settings in the Coordinator) and another set specific to each Circadian Daylight instance.

Im having trouble manually dimming colour temperature bulbs (not colour bulbs) using the device in “Things”. Aka i can’t! When i move the slider it immediately slides back to where it was. I have tried switching the CD brightness and colour temp off in the device before and after moving the slider and switching the light on and off but same result. White only bulbs dim manually fine, its just the colour temp ones that I’m having the problem with. My bulbs are added with your Hue Advanced (Connect) handler btw. Ive searched around and played with settings in CD but short of removing them from it (which i don’t want) i can’t figure it out. Any ideas?

Are you on the latest versions of the Circadian Daylight Coordinator and Circadian Daylight SmartApps, as well as the Hue Advanced (Connect) SmartApp and all of the Device Handlers?

When you adjust the brightness, or tap on the CD Brightness in the device, does the CD Brightness button update to say that CD Brightness is off? After trying to adjust the brightness, could you go into the IDE>My Devices select the device you just adjusted and get a screenshot of that page, specifically the Type and Current States sections?

Yeah just double checked and I’m using all the latest versions. If i tap CD brightness Off it does turn off and stay off. When i adjust the brightness its doesn’t though, the slider just slides straight down. The non ambiance ones work just fine. Here is a screenshot

Thanks for your reply.

The issue I was having was that I could not open “New Circadian Setup >”. When I tapped that, nothing would happen (iPhone6s). I believe I restarted ST and tried with same results. Then, I enabled OAuth and reset ST and it worked, so I just figured I had pieced it together.

It’s working now (loving it!), so I don’t really care, but I’ll try disabling it this weekend and see if I have the same issue. I’ll post back with what I find. Might be interesting to know.

Can you try opening Hue Advanced -CD- White Ambiance Light under My Device Handlers in the IDE and replacing line 56 with attributeState "level", action:"tileSetLevel", range:"(0..100)" and let me know if that fixes the issue?

Yeah, that’s strange. I definitely don’t have oauth set up on my personal installation and it definitely shouldn’t be required
Glad it’s working though.

Bingo! Thats the ticket, thank you sir!

Alright, I fixed it in the development branch, I also merged upstream changes from the official Hue (Connect), so once I’ve tested for a few days I’ll merge it with the stable branch.

Feature request:

Can we have a time restriction option for Dynamic Brightness feature? I like the feature but I want it to only start adjusting brightness after 8pm for example for some of my lights.

Thanks!

How would this work, at whatever time (i.e. 8pm) all of the relevant lights would jump to whatever brightness they should be set to? So if sunset was 5pm, and the brightness should be 60% by 8pm, they would just jump to 60% at that time? Or are you thinking more along the lines of changing the sunrise/sunset specifically for brightness so that at 8pm they would start dimming from 100%?

I would be happy with either of those options you suggested but ideally I was thinking of something like this:

If the brightness range is set to 60-100%, the time option would allow the user to set a start time and end time.

If only start time is set (i.e. 8pm), then brightness would just jump to 60% at 8pm.

If both start and end times are set (i.e. 8-11pm), then brightness would start dimming from 100% at 8pm and hit 60% at 11pm.

I feel that any solution that could cause a sudden jump is not as good of a
solution than one that enforces smooth transitions. This is my opinion for
both brightness and color temperature.

Also, it seems that this request, and the recent request for time OFFSET,
could somehow be merged into a single solution; but it’s not immediately
obvious as to how.