Circadian Lighting [Custom Component]

Are you turning off the group using HA, or externally? When you turn off the group, does the group in HA not immediately change states to off?

I change from ha. And in ha if the switch turns off,bulbs starts to dimming off but before dimming off completely they come back on.

1 Like

Okay so thatā€™s what doesnā€™t make sense to me, somethingā€™s definitely not right. If you have light.room configured in CL, and you turn off light.room, that should immediately stop CL from doing any adjustments. CL doesnā€™t know anything about the lights in light.room, all it knows is that the light.room thatā€™s configured is off so donā€™t do anything.

I think thereā€™s definitely something else going on here. Off the top of my head, the only thing I can think of is that maybe deconz has strange behavior with transitions. What do you have interval and transition set to? By default, they are both 15 minutes which means that every 15 minutes it updates with a 15 minute transition, which results in a continuous and smooth change. Maybe whatā€™s happening is that with deconz when lights are still transitioning and the group is turned off the lights donā€™t turn off. You could try testing by setting transition to 0 and see if that fixes the issue.

Unfortunately the behaviour is the same.

Hmm, can you add set the CL components to debug logging level in configuration.yaml?

logger:
  logs:
    custom_components.circadian_lighting: debug
    custom_components.sensor.circadian_lighting: debug
    custom_components.switch.circadian_lighting: debug

Then hopefully we can figure out whatā€™s really going on.

Hello, do you plan to implement custom updater? https://github.com/custom-components/custom_updater
Thank you for answer.

Iā€™ve been considering it, but it seems thereā€™s some push to getting this added as a official component so Iā€™ll likely pursue that first.

2 Likes

Hi,
I have just returned home after a few days, and updated to HA v0.81.6. Unfortunately i am now receiving an ā€˜Invalid Configā€™ error on my overview page. I have attached a screenshot of the error.
The Circadian Lighting component is my favorite of all the HA features, so i am a bit gutted i canā€™t use it at the moment.
Has anyone else had this error and fixed it in 0.81.6?

Thanks

Without logs thereā€™s no way of knowing, but I assume you need the fix from last week, see post 104: Circadian Lighting [Custom Component]

Thank you so much, I really love hearing such positive feedback!

2 Likes

Perfect! I assumed after the update and the issues i have had with MQTT and media components that the update was the issue and that would be enough!

Thank you for putting the hard work and time into this project!

This may be a long shot but would you consider introducing a way to transition the lights from circadian to sleep mode values?

Reason: Itā€™s hard as hell to manage with automations and turning the switch off and on. Would be great if it were built in to the light update function.

@sergi.suarezj, not sure if you saw my post here - I still think the logging could help us troubleshoot but I was able to reproduce the issue in a specific scenario. Do you by any chance send turn_off with a transition, or in general do the deconz lights take a while to fade off? With my Hue lights if I send turn_off to a Hue group with even a relatively short timeout (10 seconds for example) the group initially has an off state in HA but shortly after it updates back to on while the lights fade off. The problem is that with CL when the group switches state in HA back to on CL immediately updates the group, keeping it on.

If this is in fact whatā€™s going on Iā€™m not sure what the best solution would be, to be honest. Every solution I can think of would cause other negative behavior.

Couldnā€™t you just set interval to something like 1 second?

@claytonjn Yes I know, But Iā€™m travelling right now without access to my HA.
When Iā€™m back at home and do some home work I plan to change my setup and capture the logs you need.
Iā€™m sorry to not letting you know that I was unable to get the logs in a shorter time.

No problem, I realized I didnā€™t quote you or tag you so I thought you may have missed it!

Ah I think I didnā€™t explain clearly what Iā€™m trying to do.

Itā€™s got to do with sleep mode and the fade/transition from normail circadian to sleep mode. Iā€™m doing it using a script so I have to turn off the circadian switch then fade the lights then turn it on again.

I would instead ask for a sleep_delay parameter. This delay can be used to update the lights on a 2-3 second interval (sleep_interval?) from normal values (color_temp/brightness) to and from sleep mode values.

I see, so even with a short period it would cause the lights to abruptly change when entering sleep mode. Iā€™ll have to think about this, I do think itā€™s a good idea but it would add a bit of complexity and Iā€™m worried adding too many configuration options would cause confusion for users.

Hey itā€™s a feature and you can make it optional, defaulting to 0 second delay (instant update to and from sleep mode values). People who want a gradual change can set a value to have a gradual change.

I see you considered this before as well, in post 22 Circadian Lighting [Custom Component]

I finally did get this great component up & running, however I donā€™t appear to be getting the color values I would expect and am wondering if I need to tweak something in my config?

I am using Milight RGB bulbs via the MQTT Light platform (this hub https://github.com/sidoh/esp8266_milight_hub/).

When I turned the circadian switch on last night, the lights were deep orange and moved more toward red as it got later. Seemed to be working. However this morning itā€™s still returning a orange-warm value.

I guess I would expect at 9am for it to be a blue-cool white light, correct? To me eye they appear almost as warm as they were last night at 11pm.

Not a lot of room to get warmer here, this does match the RGB value above from the sensor.

I also noticed if I attempt to set a min_colortemp or max_colortemp it says that is an invalid config option. 5500K seems too warm to me, but I wasnā€™t able to set it any higher

Yes, I do think thatā€™s a good idea, but I was still going to use the turn_on service call transition, not implement my own. Using sleep like in the example you provided is blocking and holds up the process while it wait, so that would have a negative impact on performance. Iā€™m almost positive the component wouldnā€™t even be considered for official integration if that were there. Iā€™m still thinking about it and will try to come up with a good solution but ultimately I think that should really be fixed at the device level.