Tint Remote control - xy color values to HSB

i hope there is anybody who can give me a hint on how to get the color picker functionality of the Müller Licht Remote Control working. I connected the remote with CC2531 and use zigbee2mqtt to connect it to Openhab. In Openhab i have rules to get the different actions and send out commands to the bulps.
I am currently struggling with the color picker values i receive and how to convert them to HSB Type and send it to the bulp.

From MQTT i receive those values when choosing e.g. red color
info 2020-04-19 11:08:06: MQTT publish: topic ‘zigbee2mqtt/Arbeitszimmer_Lichtschalter/action_color-x’, payload ‘0.338’
info 2020-04-19 11:08:06: MQTT publish: topic ‘zigbee2mqtt/Arbeitszimmer_Lichtschalter/action_color-y’, payload ‘0.163’

how can i calculate those xy values to HSB?
Saturation and Brightness are controlled by other buttons - this is already working fine.

var HSBType light = new HSBType(hue,sat,bright)
// 0-360; 0=red, 120=green, 240=blue, 360=red(again)

many thanks for any tip in advance and stay healthy

Which color picker values? The ones from openHAB sitemap? I believe those are in hsb format if my memory is correct.

Have you read thru this topic?

I have no color bulbs to test with but there are several example in the topic that may help.

thanks for the answers so far.
I am talking about the color picker tint
of this device. You can click on the circle and it reports you values in X and Y - i believe CIE color map.
action_color-x = 338, action_color-y = 163 which represents RED. In HSB code it should be (“0,x,x”).

This thread comes close to it - but it is the other way way: [SOLVED] Convert HSBType to CIE XY needed for Ikea Tradfri control through Deconz REST

also this link : https://github.com/Koenkk/zigbee2mqtt/issues/272 is the other way around.

yes, i am using the new attribute output format

niemand eine Idee?

Hello oschwabe,

did you get your Müller Tint correctly integrated into openHAB 2?

I see them in openHAB, but I can’t do anything with them. Not even a switch can be connected.

If I control the lamps from the console with mosquitto_pub, I can switch the lamps on and off and change the color and brightness, but in openhab.log I see the warning with the XY values.

2020-10-25 00:11:56.176 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command ‘{“brightness”:50,“color”:{“x”:0.1,“y”:0.1},“color_temp”:237,“linkquality”:0,“state”:“ON”}’ not supported by type ‘ColorValue’: {“brightness”:50,“color”:{“x”:0.1,“y”:0.1},“color_temp”:237,“linkquality”:0,“state”:“ON”} is not a valid string syntax


English please, this is an international community.

There are some musings on the xy issues in this thread. Maybe that’s helpful: [SOLVED] Convert HSBType to CIE XY needed for Ikea Tradfri control through Deconz REST - #7 by OMR