Great component. I was wondering if I am doing something wrong.
I have Ikea lights that are both
Ikea colour and white spectrum opal white
Ikea white spectrum
Philips Hue white
1 and 3 work as expected. 2 Ikea white spectrum do not change their color temp at all. In fact, I am able to self adjust them, where the others will force themselves back to position. I have also tried the lights_xy for these.
@Hans_van_der_Drift in your example config you have the lights listed under lights_brightness which means that CL will only adjust brightness, not color temperature. You said you tried lights_xy - XY adjustment is meant for color lights and my guess is that because the white spectrum bulbs only change color temperature but not color that they don’t implement XY adjustment. Have you tried listing the Ikea White Spectrum bulbs under lights_ct?
You are correct. I was testing at that moment to see if I could get it working under different settings.
Here is my actual config, (the only lights not working correctly are the ones listed under CT)
On the CT lights I cannot move brightness scales (works correctly) but the colortemp I can adjust freely
- platform: circadian_lighting
name: "Circadian Lights"
lights_brightness:
- light.kitchen_island1 #White Hue Light
- light.kitchen_island2 #White Hue Light
- light.kitchen_island3 #White Hue Light
- light.main_bedroom_hans_bedside_lamp #White Hue Light
- light.main_bedroom_shannon_bedside_lamp #White Hue Light
lights_ct:
- light.olivia_bedroom_lamp #Ikea White with The colour temperature can be switched between 2200 Kelvin (warm glow), 2700 Kelvin (warm white) and 4000 Kelvin (cool white).
- light.livingroom_hutch_lamp_1 #Ikea White
- light.livingroom_hutch_lamp_2 #Ikea White
lights_rgb:
- light.livingroom_tv_lamp #Ikea Full Color
- light.main_bedroom_lamp #Ikea Full ```
Oh sorry I missed that there was a lights_ct and lights_rgb section in the config you posted due to for the forum formatted it. Putting it in the code block helped a lot, and thanks for adding the comments describing each entity.
In the comment you put “The colour temperature can be switched between 2200 Kelvin (warm glow), 2700 Kelvin (warm white) and 4000 Kelvin (cool white).” Does that mean that those bulbs can only be set to exactly one of those three values (2200k, 2700k, 4000k) or could you set the bulbs to, for example, 3500k?
Got it, thanks for clarifying. Can you try turning on debug logging and post the logs for CL after calling the circadian_lighting.values_update service? (Make sure to remove any location info if you don’t want that public). Instructions for enabling debug logging are here.
In the first log, CL sets the colortemp to 342 mireds (line 20) and the command appears to be successful (line 21). In the second log CL sets colortemp to 349 mireds (line 18) and I don’t see the pydeconz.utils success but I suspect it was further down. In the third log CL tries to set to 454 mireds. All three of those values are within the 153-500 range of the lights, so that’s not the issue.
I suspect the problem lies in the default transition value of 900. I’ve been experimenting with the following configuration with good results:
circadian_lighting:
interval: 300
transition: 60
I would try that (this is the main circadian_lighting configuration, not the individual switch configuration(s).
I spent a fair bit of time looking at previous threads. A common factor is I have the following
IKEA Lights
Deconz using a zigbee network
It seems to have been an issue in the past. Some solutions I have red did not help. However, one that I sort of tested was using node red to control my light. The link I have not yet made is taking the sensor output and connecting it to my node red control.
You have mentioned using node red before. Do you have an example flow? I just need to see how you take the values outputted and convert them to mireds (value between 153 and 500) and brightness between 1 - 100.
I only use Node-RED for a very complex occupancy flow so I don’t have any examples. To get mireds it should just be 1000000/kelvin. Brightness you can pull from the attributes of the CL switch.
I would much prefer to figure out why CL isn’t working for you, adding Node-RED is just going to add another point of failure and additional overhead. Did you try playing with the transition and interval values like I suggested?
The fact that the sliders can/can’t move is not necessarily an indication that CL is/isn’t working properly. If you move your test lamp to the extreme warm side and run the circadian_lighting.values_update service does the color of the test lamp change? If you call the service light.turn_on with the following data does the test lamp change?
The update seems to work fine over here, at my second attempt, I noticed nothing out of the ordinary, function-wise.
At my first attempt, I did notice some problems with HA after the update: restarting would take a long time and many time-related errors in the HA-log. After rolling the change back, all was OK again.
I don’t really have a clue what was/is going on, related to this error. It could be related to my particular setup, as I am constantly modding, extending it
At my second attempt, I changed the version-text inside the file to 1.0.4, to not confuse the Update-Tracker. After the restart, this time there was no problem and my system has run smooth since, which was 2 days ago.
Okay perfect, at least we know what’s going on. My best advice would be to set up two CL switches for each of those particular lamps; one with disable_brightness_adjust set to true and one with the lights listed under lights_brightness. That way one switch will control color temperature and one will control brightness, sending two separate commands.
IKEA tradfri hub is problematic for the circadian light component. Besides not being able to accept both brightness and temperature in the same call, it is very prone to getting flooded with calls, then becoming unresponsive and requiring a hub restart. Better get some Hue if you want to do circadian lights without the headaches.
I can’t agree with this more. I got started with “smart home hubs” (first SmartThings, now HA) specifically because I wanted to be brand agnostic and just be able to use whatever product was best for a specific implementation, regardless of ecosystem. I have direct and indirect experience with a number of smart lights and switches, and at this point there would have to be an extremely compelling reason for me to get anything other than Hue. Especially now with the power-on behavior setting and the two new FOH switches, all complaints I could have made in the past are gone. I personally have more than 40 hue lights and they just work. I know they aren’t the cheapest option, but honestly I would recommend people save a little longer for Hue; I’ve been saving to replace the last few non-Hue lights still left in my household.
One more update from me on the testing of the 1.0.5 update: I have traced back the issues that I reported before to another custom_component. Now with that one disabled, the 1.0.5 has been running reliably without any issue.