[RELEASE] [App] Naturalight Home & Room (v2.0)

My first Hubitat app! Coding tips / other feedback welcome.

Naturalight divides the day into eight periods where one period slowly fades into the next, allowing your eyes to adjust with no abrupt changes, reducing the perception of lighting changes. The design concept was as follows.

Early morning starts with warm white lighting, fades into cold white lighting as morning progress, and transitions back to warm white lighting in the late afternoon. In the evening, bulbs that are only Color Temperature-adjustable are dimmed separately while Color bulb lighting levels stay high as they are switched to color mode and tinted slightly orange. As the evening continues, CT bulbs are switched off and Color bulbs become deeper orange.

This scheme provides you with strong blue-shifted light during the day to promote wakefulness and improve mood. During the evening, your home's blue lighting is reduced and nearly eliminated, prompting your body to relax and increase melatonin production before you go to bed to aid in sleep quality.

Naturalight allows you to intermingle Color bulbs with CT bulbs, which typically are half the cost. Why run 3 Color bulbs in a fixture at 30% when you can run 1 Color bulb at 100% and turn the other two cheaper bulbs off?

The Naturalight Home (parent) app sets global values that all Room (child) apps will import, so you only have to set everything up once for the home. However, the room apps allow global settings to be overridden on a per-setting basis, allowing refinement per room.

Instructions are included within the apps' preference pages.

Copy this link and import the Parent App directly to your Hubitat Apps page.

Copy this link and import the Child App directly to your Hubitat Apps page.

Or, see the GitHub file below:
https://github.com/brandonspitza/hubitat/tree/main/apps/Naturalight

Brandon Spitza

10 Likes

Repo updated to v2.1

Changelog:
    2.1 (2021-01-20)
        -Added timezone offset input to timePage which localizes default suggestions for period times

Cool app! I had a few questions while I was going through set up though.

Are any of these times dynamic? For example, can I change them to follow sunset/sunrise times? These pre-filled times will differ dramatically depending if it's summer/winter. And updating these times throughout the year would be untenable.

What should I fill out on this page if I only have color bulbs?

What's the point of the hue settings (and saturation, which was the next page in the setup)? Shouldn't specifying a color temperature be good enough?

Thanks for the questions. They'll help me clarify app function in the instructions of future releases.

I'll consider dynamic times for a future release. In my house, our schedule doesn't vary much based on sunlight, so neither do our lighting needs. Also with the child apps pulling most settings from the parent app, slight tweaks have not been too cumbersome for me.

The color temperature settings are still utilized by color bulbs during the day. My Hue color temperature bulbs can be set to CT mode, which the app does. I hope this is the case for other brands, but I have no experience. If this is not the case, let me know and I'll look into doing a conversion within the app. In this case, the CT settings would still be used during the day. It's only during the Late Evening period that color bulbs are switched into color mode.

I think that probably also answers your third question?

1 Like

Cool, thanks!

My lighting schedule would follow something like this, with the app transitioning the CT and brightness changes between each point in time.
Sunrise - 2700K/50%
11 AM - 6000K/50%
Sunset - 2700K/100%
11 PM - 2500K/10%

The reason sunset/sunrise is important is because cold white (6000K) looks best in conjunction with sunlight from outside. Whereas warm white (2700K) looks best with no sunlight and has the added benefit, as you mentioned in the OP, of reducing blue light.

Is there an easy way to visualize the hue/saturation combo? As is, I just used your default values because I don't know what hue/saturation combo is going to make what color. Whereas I know what color temperature a bulb needs to be at for what I want.

Is there an easy way to visualize the hue/saturation combo? As is, I just used your default values because I don't know what hue/saturation combo is going to make what color. Whereas I know what color temperature a bulb needs to be at for what I want.

You can test this from the device page by opening your bulb and sending it HSL (hue, saturation, level) values. A hue of 1 is pure red and increasing that number moves you up the orange spectrum until you move beyond orange and into the next color.

My app best serves those wanting to go warmer than the warmest color temperature that a CT bulb supports in the evenings by using the color capabilities of color bulbs. Also it allows you to achieve this while mixing cheaper CT bulbs in with color bulbs (see preference pages of the app for further explanation). While there are some other benefits like maintaining only one set of global settings that apply to each room, if this first benefit doesn't apply to your use case, you may be better served by @adamkempenich app (which I have not used personally). I'm almost sure that this also supports the dynamic timing that you are looking for.

Let me know your thoughts,
Brandon

2 Likes

Can you make a video of this. I ask as I cannot picture it.
I use hue motion sensors as they have light sensors to tell me how much sunlight is coming into the house. Based in this u adjust the lights brightness according to the time of day. Also I try and minimise electricity usage so if one room gets enough sunlight.. there is no need for that rooms lights to be on.
I could mix my code with yours to give the best result.
I again had the inverse light settings where evening was 6700k and only after 830pm was it 2500 to 1500 after 10pm

What specifically, how the lights change over time?

New release posted with bug fixes / code cleanup. No known bugs at this time.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.