[Release] [App] Circadian Daylight (v0.80) (Port)

I made a quick fork of this app to better fit my needs:

I prefer to have a predictable wake up / settle down schedule, to better keep my circadian rhythm throughout the year. Don't know if that's how it's supposed to go, but I'd rather have a static brightening phase and dimming phase.

Thus, I added brightenStart, brightenEnd, dimStart, dimEnd to the settings, and am attempting to use those to give me that constant effect. i.e. start brightening the lights at 6:00am until reaching full brightness / CT at 8:00am, then keep full brightness / CT until 8:00pm, when it will start dimming until 10:00pm.

This is the first afternoon I'm using it, and so far (since the current time is between brightenEnd and dimStart) the lights are set to my coldCT override, and max brightness. I'll have to see how it behaves once dimStart time rolls around, but hopefully it'll do what I'm looking for.

1 Like

Nice!! I'm going to push out this next version of the primary fork (tomorrow is still my goal).

I'd love to add those to the next version. Do you have a start/end CT setting, too? I was writing a separate app (Simple Sunrise) for this, but it could be a good integration here, too :slight_smile:

Actually ... that's easily implementable into this version.

Mind if I add it into 0.80 and attribute that code to you? :cowboy_hat_face:

Sure, no problem. I was actually thinking about adding two sets of times, one for brightness and one for CT, but just went with the simple route so far of having one morning time range and one evening time range.

The only thing I'm mildly concerned about with my version of code is, what else is the sunrise / sunset time being used for? I think I see something in the scheduleTurnOn() function that is using sunriseTime.time for scheduling? As far as I'd like, I'd just get rid of sunrise/sunset and have it completely dictated by my brighten / dim time ranges.

One tiny code fix from your original version I found was in the getSunsetTime() function, you'd had def sunriseTime in there from copy/pasting the getSunriseTime() function, but then used the proper variable sunsetTime later in the function. A simple oversight! :smile:

1 Like

I like the ability to define the curve. Mine goes like this: Ramp up 7am-2pm. Ramp down 2:01pm-10pm.

1 Like

Gentlemen, is there an easy way to update the lights continuously while they're on?

Can you elaborate a bit more on that?

Scrrrrratch that, they're doing it!

Aw... and here I thought I'd get to add another feature :wink:

1 Like

I'm getting an error when I put my zip code in for the Zip override. Here is what the error shows:

[app:1292](http://192.168.86.5/logs#app1292)2019-05-10 06:18:26.949 pm [error](http://192.168.86.5/installedapp/configure/1292)java.lang.NullPointerException: Cannot get property 'zipCodeOverride' on null object on line 124 (updated)

Scott

In 0.72, zip code has an incorrect data type. I’ve fixed it, but I then realized that ZipCode Override doesn’t exist on a system level, so I’ve temporarily removed it from 0.73.

Staff is aware it’s missing, and I’m sure we’ll quietly see it appear in a future software update. When that happens, I’ll add the feature back in :slight_smile:

Been busy here outdoors today, since tomorrow is supposed to rain. I’ll get to releasing the next version tomorrow

No problem. It seems to be working as intended and pretty cool to say the least.

Scott

Similarly related: It's for Android and can potentially dim your phone down to an overwhelmingly warm 1000K at sunset.

This one can actually take control of bulbs connected to your Hue Bridge also, but of course we won't be doing that. :wink:

1 Like

I’d been using F.lux (until Apple replaced it with their built-in CT thingy) since 2011 or 2012... back then there wasn’t any Hue support, but I think they’ve since added it into their product, too.

Every time I see another product or piece of software pop up that does this, I feel so happy. It’s such a small change, but it can make a big difference.

What I really want is a way to do a pure chromatic red/black display, though :slight_smile:

1 Like

Hi all.

Still need another day or two for testing 0.80—there are a few issues I hadn't noticed before that I'm seeing now.

I'll let you know when it drops.

0.80 is released :slight_smile: Release notes are in the first post.

As always, let me know about any bugs you find. A few features didn't make the cut (see the header in the app code), but there's a lot of added functionality.

1 Like

In my fork, I just added support for configurable refresh interval, as I wasn't sure how the iter / iterRate piece worked. Also on the scheduling portion, I made the seconds portion of the cron string a random number up to 60 so if multiple instances of Circadian Daylight are installed, they can run at some number of seconds offset from each other, to reduce the load on the hub. Not that it's impossible for them to be scheduled to run simultaneously, just reduces the chance of that.

And also added a check to see if there are any color temp changing bulbs in the settings, before running my getGraduatedCT() function call, as that would be pointless to run if there aren't any bulbs that would benefit from it.

1 Like

I’ll take a look :slight_smile: I love the features you’ve added. Not sure how necessary randomization I’d CRON is, but I agree, doesn’t seem like it could hurt to do that!

New ver is awesome, nice job.

Maybe someone can test this - I'm still having the problem with sunset overrides. The bulbs change to coldCT after the sunset override time has passed. For instance, if the current time is 10pm, and the sunset override is set to 9pm, the bulb will turn on at coldCT. Using LIFX Day+Dusk, although I had previously confirmed this with Hues also.

I'll look into that more. I haven't experienced it, but haven't edge case tested that too hard. :slight_smile: