Supergiovane / node-red-contrib-knx-ultimate

Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer.
https://youtu.be/egRbR_KwP9I
MIT License
141 stars 34 forks source link

Datapoint 9.002 with direct kelvin input. #283

Closed Supergiovane closed 7 months ago

Supergiovane commented 8 months ago
          That's very kind of you, but I had some spare time tonight and had another look at the figures I put into the Excel sheet.

It seems to be pretty simple: 1000000 / Mirek value = Kelvin-value That's no scientific formula I guess, but it's pretty precise within the usual range and is very similar to the values from ISE HUE.

I can use a simple function node to rescale your values to Mirek and convert to/from Kelvin, so it does not need to be done inside the node. If you like the idea you can put it there of course as DPT 9.002

(Btw. I never found a satisfying conversion from RGB to color temperature or vice versa.)

Originally posted by @SmartyKNX in https://github.com/Supergiovane/node-red-contrib-knx-ultimate/issues/281#issuecomment-1793862555

Supergiovane commented 8 months ago

Next version will be out shortly with dpt 9.002

SmartyKNX commented 7 months ago

I tried the new version last weekend and the values are a little bit out of my expectations.

Using the HUE app and selecting the center of the total range results in values of 4300K. I think this value is way to blueish for the actual impression from the HUE light.

Before you implemented this function, I took the 7.600 DPT with values from 0-65k and rescaled these values to the mirek-range from 153-500. 1000000/MirekValue results in pretty reasonable kelvin values. However these values are not the values I get, when using the direct output of your 9.002DPT.

Of course if you are happy with values keep them, because I can use my own conversion in Node Red anyway.

Supergiovane commented 7 months ago

Hi just to le you know, i'm working to fix the datapoint 7.600

Supergiovane commented 7 months ago

Hi node-red-contrib-knx-ultimate@2.2.33 is out with fixed conversion from 7600 to mired and vice versa. Thank you for point me out that.