Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

RGBW Fixture control interface issue #60

Open
geniusled opened this issue Aug 28, 2021 · 1 comment
Open

RGBW Fixture control interface issue #60

geniusled opened this issue Aug 28, 2021 · 1 comment

Comments

@geniusled
Copy link

Hello and thanks for the awesome code, i started playing with HASS.io recently and learning python.
ive been finally able to replace the stage lighting software ive been using for automation (what a nightmware) with HASS.io using this plugin to send data to networked artnet lights.

ive configured my fixtures/channels inside the configuration.yaml and i have set 2 fixtures as RGBW (12v rgbw "dumb" strip)
they are discovered as entities automatically upon restart and respond accurately.

my issue is with the control interface given for these fixtures.
when the dialog open, i can choose RGB value with the color picker (manages RGB values only) and the white channel separately.
for some reason, i am not able to set RGB to off (0,0,0) and only use the white channel (0,0,0,255) like other light fixtures outside this plugin(example : wled device).

the color brightness fader control does not work.
if i set value to 0, nothing happens (other non dmx light fixtures will set rgb to 0 normally)
if i drag value along fader, wierd fader jumps happen on the interface but no changes on the light.

Would this be user setup error or an issue with the library? How to resolve?
Thanks for your dedicated time.

configuration.yaml snippet

light:

  • platform: dmx
    host: 192.168.2.78
    port: 6454
    dmx_channels: 512
    default_level: 255
    universe: 0
    devices:
    • channel: 4
      name: Tv RGBW
      type: rgbw
    • channel: 8
      name: Kitchen RGBW
      type: rgbw
@robot256
Copy link

robot256 commented Sep 6, 2021

I see the same behavior with my RGBW light strip controller. Actually, I see the issue in the hass-dmx code is conversion from HS color to RGB, without any available brightness information in the color channel itself:

elif self._type == CONF_LIGHT_TYPE_RGBW:
rgbw = scale_rgb_to_brightness(self._rgb, self._brightness)
rgbw.append(round(self._white_value * (self._brightness / 255)))
return rgbw

if ATTR_HS_COLOR in kwargs:
self._rgb = color_util.color_hs_to_RGB(*kwargs[ATTR_HS_COLOR])

From reading the Light Entity docs, it looks like the problem could be resolved by adding explicit support for color_mode and supported_color_modes. The Feature Map entries for "SUPPORT_COLOR" and "SUPPORT_WHITE_VALUE" will be removed in the next month or two so this is a required update.

If the dmx integration properly reports that an entity supports COLOR_MODE_RGBW, then HA will send the rgbw_color attribute that includes correctly scaled R,G,B values, which encode the "color brightness" value we need.

EDIT: I see in the Developer Tools display that HA appears to be automatically putting the light into RGBW mode. But it's still true that neither the "rgb_color" nor the "rgbw_color" attributes respond to the "Color Brightness" slider in the color picker.

EDIT2: I noodled around with the Python code and found that even though the light is in "rgbw" mode, only "white_value" and "hs_color" attributes are received by the async_turn_on function. I wonder what will let the full rgbw tuple come through in the arguments list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants