Homey Community Forum

DIY circadian rhythm based lighting

I’m basically looking to recreate BrainLit’s circadian rhythm matching lighting, which they call BioCentric Lighting. I’ve been to their office here in Lund and essentially it adjusts color temperature and brightness to match the sun as if every day was April 16th in southern Sweden.

I would like to be able to use wall switches to turn on sets of lights in a room in different modes:

  1. Following the sun – as above – as long as they are left on.
  2. Fully bright and white
  3. Some scenes for specific cases.

I’m new to Homey, so I don’t know the best approach to develop this without reinventing the wheel. I’ve come as far as to create a HomeyScript that adjusts a color temperate and brightness variables in Better Logic, and have a Flow setting these properties on certain lights when they are turned on.
Left to do:

  1. Continuous updating of turned on lights in ‘circadian’ mode.
  2. Grouping of lights in each room for different modes.
  3. Handling of different modes in which updating is inactive.
  4. Handle bulbs, LED strips with different capabilities.

Is this the best way with HomeyScripts and Flows? Or should I instead build a custom app?

Does this help with your idea?

Thanks! I’ve gotten this far as to calculate both color temperature and brightness to a certain degree for a single light.
It’s the way forward, scaling it to every room of the apartment that I’m uncertain about. :slight_smile:

Can you share how you calculated the light temperature?

It’s much simplified and because I never want the lights to be completely dark, there is also a minimum, but it does serve its purpose well. :slight_smile:

:point_right: gist


Hi. How is this going? Can you share the calulations?

Yes, follow the finger :point_right: in my previous post. :slight_smile: