Colour temperature and brightness relationship

I should be grateful for some comment on this if anyone has encountered it.

Background
I have a setup in the lounge with RGB and CCT LED strips facing both up and down on 6 different around the perimeter of the room (the chimney breast intruding in the room is why there are 6 rather than 4 separately controlled walls). I have 60 DMX channels controlling this with the CCT strips set as a tunable-white thing (the RGB lights are irrelevant to the problem but mentioned by way of background). It was a little brighter than anticipated so, of an evening, the up lights are white at around 25% and the downlights are white at half of that with also a ‘colour of the day’ added in. via the RGB down LEDs.

My next task was to try to have the colour temperature of the white change automatically throughout the day, cool during the daytime and warm in the evenings on a graduated basis. I have adapted the script from here Automatic sunrise and sunset color / colour temperature control (with LIFX) which adjusts the colour temperature every two minutes.

This works and the colour temperature drops as it approaches sunset.

The problem
I am having some difficulty with this in that, of an evening, the brightness of the lights slowly drops of an evening until I suddenly notice that only the coloured LEDs are on. As soon as I reset the brightness (I am using the Alexa binding for voice control), the white lights turn back on.

As far as I can see, the constant updating of the colour temperature causes the brightness to drop with each update, as this is every two minutes, the lights end up turning off. This appears to be the result of some rounding within the dmx-tunable-white rules. I will try an interim resolution of rewriting the brightness with every temperature update but it seems like this shouldn’t need to be done. Is there something obvious that I have missed with the setup?

Thank you,

Andrew

P.S. Further to the above, I have changed the rule for the colour temperature adjustment. Previously, I had the ‘warm’ setting at 99%. I have adjusted this to 100% and the lights do not dim further once they are fully warm. I think it is reasonably conclusive for me that the problem is some internal rounding issue in the tunable white binding that rounds down the brightness on the different channels when trying to achieve a particular colour temperature setting. This can often be observed in PaperUI when setting a colour temperature, the brightness jumps around a bit. If the dimming during the transition period from cool to warm is still a problem, the solution will be to rewrite the brightness as indicated above.

I am not sure if this could help you but I have rules with my color lights setup to convert RGB to RGBW. You can find details of my setup in the github issue below:

Hi Jeremy,

Thank you for this, I had not seen that thread and I might use some of the code for something else but I don’t think it addresses this problem. My workaround seems to operate effectively for now but I think it will take some underlying change to the DMX binding to correct properly. I have had a quick look but am no expert so will see if I can spot the problem in due course.

Essentially, each update of colour temperature seems to lower overall brightness; not a problem for the odd change but for a script that writes updates on a frequent basis, it means that the light eventually turns off over time. It must be a rounding issue because when I set the final colour temperature to ‘100’ instead of ‘99’ it was less of a problem.

Andrew