[APP][Pro] Circadian Lighting

Graag gedaan :wink:.

Using the values of the circadian zone device, makes it also possible to set a light to the current circadian values when switching a light on (so you don’t have to wait till first change in values to trigger the current Color).

1 Like

Yeah, I figured that out by using Logic values… (my Circadian Zone Change, changes a Logic Value). That is not needed anymore as well… :upside_down_face:

The developer of Color Tools added 2 flow cards to be used in advanced flows. That way the converted values can be used right away (without parsing it via an event). Nice service @Shakesbeard :wink:

So this is my advanced flow now:

Upper part is for always updating light color values (even if light is not on, so when switching light on, it’s in correct light color immediately)

Lower part is for adjusting brightness when light is on, or when light is switched on. (Notice I use dim level of circadian light zone device, because the trigger cards for switching light on don’t have the local tag for brightness coming from “Circadian values changed”).

2 Likes

Since it’s not possible to switch modes using a flow, does anyone know if that would be possible using Homey Script?

Donate the developer a beer and ask for a flow card :wink:

I would be happy to donate. Haven’t found a donate-link to the developer though.

@Niclas Of course :slight_smile:

Save this code as homey script with name"Set Circadian Light Mode" (or something else).
Find your circadian lighting zone device_id in homey developer tools and fill it in the script

//Change mode of Circadian Lighting zone
//possible argument value's: adaptive, night, manual

let a = args[0].split(',')
let mode = a[0].trim();

// Change id to id of your CricadianZone_obj here ------------\
const CircadianZone_obj = await Homey.devices.getDevice({id: '37b....Your_Device_ID_Here......750'});

await CircadianZone_obj.setCapabilityValue('adaptive_mode', mode)
    .then(() => log('OK'))
    .catch(error => log(`Error:`, error));

Call this script in a flow with the desired mode (adaptive, night, manual) as argument
Like this: Shared Flow | Homey

If you have more circadian lighting zones, duplicate the script for each zone, or make the script more advanced with the name of the zone as extra argument and lookup the device in the script based on the name.

And a second beer from me :beer:, but first let’s wait on a reaction of the developer if he is willing to look into our feature request’s :wink:

Yes, you are right. The Paypal/donation settings in missing in the app. So there is no donation :heart: on the app page.

Fabulous! Thank you very much @Torch1969! You made my day (and night) :-).

1 Like

I installed the app and I can see that if I add a Circadian Zone and choose the adaptive lightning option, the brightness and color temperature in the zone adjust based on the time of the day. How do I link this to a specific light source in my house? Let’s say I turn on a light source when the sun is up and turn it off late at night. I would like the light source to follow the settings/conditions visible in the circadian zone: dimmer light and warmer temperature as it gets dark outside. Is it possible ‘automatically’ or do I need to trigger a change every 15min for example through a flow?

Use the trigger of your zone device and its tags in a flow and set temperature and dim value of you light. The flow gets triggered when the zome changes.
Use the duration option to get a smooth invisible transition (if supported ba your light/app).
If your light turns on on dim change, just add a condition “and light is on”.

1 Like

@Krzysiek it’s exactly as @RonnyW explains.
Also see my post with advanced flow just above the one you react on :slight_smile:

1 Like

Great, thank you both @RonnyW and @Torch1969!

So would it be something like this? I will test it today in the evening. Just one more question. From your experience, do I need to convert the color temperature values to Kelvins? I think that they are set in Kelvins in my LED strip controllers and I am not sure if they will react correctly if the sent value is in percentages. If not, I will test your proposed solution of converting the value to Kelvins.

Looks good.
The Homey device of your light will use the Homey capability which has the same definition like the tags from the Circadian trigger.

In addition I added a trigger for switching on the light (second trigger). There I set the global tags from the Circadian zone device to dim to current value without waiting for the next dim change.
When switching on with other trigger (Alexa for me), the light will still switch on to the last dim value and dim down/up immediately. I can’t dim the light “in background” because a dim value >0 will switch on the light (Hue).

And you can add a duration (right click on the card and select duration) if this is supported by your lights.

1 Like

Great! I will add those extra triggers as well. Thank you!

That depends on the capabilities and value ranges of your led strip homey device. If they do not correspond, convert them with color tool app.

Thank you, I will check today. I have Gledopto LED controllers and it seems that at least in the Homey app they do not support the option to have a specific duration of the brightness/temperature change.
Until now, I was controlling them in HomeAssistant and I think that the smooth change was possible but I thought that it was not the best solution to expose them through Homey to HomeAssistant and to control them there because that was adding one extra step that could fail and that actually failed at least once when the MQTT Hub app crashed.

If you added the light directly in HA (with a HA integration), you can use the HA community app to import the devices back to Homey.
If they are added in Homey, it depends on the Homey app whether duration is supported or not. But now we are getting off topic :sweat_smile:

Everything works really well so thank you for your replies and thank you to the author of the app!
I can only add that I agree that it would be great to be able to add an offset to the sunset or something like that as Twan mentioned above.
I don’t want to compare too much to the HomeAssistant’s adaptive lighting integration… but it works great there :slight_smile: First of all, I think that by default the lowest values are reached later which makes sense. When I get home at 17:00 it is already dark outside but I am not in a ‘sleep mode’ yet. I would prefer the light to be neutral in temperature and let’s say at 50% brightness and then that it gets to warm and 1% by 22:00. Offset would help as well, at least during the darkest months.

1 Like