This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Run tunable white (HCL)
#15
(21.09.2023, 12:48)admin Wrote: The script does not use color temperature in K but simply 0..100% scale from warmest to coldest. It's up to you which approach to use.
If LED parameters are known you can tune the formula to get a more consistent brightness across the whole color temperature range.

ok i made a first try with scripting but i am not sure if it is right :-)

Code:
--Tunable White
br = event.getvalue('1/5/10')
ct = event.getvalue('1/0/14')
br = 100 -- brightness (0..100%)
ct = 50 -- color temperature (0..100%; 0 = warmest, 100 = coldest)
ww = (100 - ct) * br / 100 -- warm white value (0..100%)
cw = ct * br / 100 -- cold white value (0..100%)
value = cw
grp.write('32/6/1', value)
value = ww
grp.write('32/6/2', value)
end
Reply


Messages In This Thread
Run tunable white (HCL) - by FatMax - 11.08.2018, 14:21
RE: Run tunable white (HCL) - by admin - 12.08.2018, 10:15
RE: Run tunable white (HCL) - by admin - 13.08.2018, 11:24
RE: Run tunable white (HCL) - by tomnord - 09.10.2019, 19:40
RE: Run tunable white (HCL) - by FatMax - 14.08.2018, 09:44
RE: Run tunable white (HCL) - by admin - 10.10.2019, 07:03
RE: Run tunable white (HCL) - by tomnordstrom - 10.10.2019, 07:48
RE: Run tunable white (HCL) - by admin - 10.10.2019, 08:14
RE: Run tunable white (HCL) - by KoBra - 20.09.2023, 19:35
RE: Run tunable white (HCL) - by admin - 21.09.2023, 05:15
RE: Run tunable white (HCL) - by KoBra - 21.09.2023, 05:59
RE: Run tunable white (HCL) - by admin - 21.09.2023, 08:22
RE: Run tunable white (HCL) - by KoBra - 21.09.2023, 12:42
RE: Run tunable white (HCL) - by admin - 21.09.2023, 12:48
RE: Run tunable white (HCL) - by KoBra - 21.09.2023, 14:18
RE: Run tunable white (HCL) - by admin - 21.09.2023, 14:45
RE: Run tunable white (HCL) - by KoBra - 21.09.2023, 15:08

Forum Jump: