Breina / ha-artnet-led

DMX lighting Integration for Home Assistant. Using the HA Color Mode update and Pyartnet library to control lights in multiple DMX universes over ethernet with the Art-Net protocol.
MIT License
104 stars 9 forks source link

Configurable channels for multi channel types (like rgb or color_temp) #48

Open turboPasqual opened 9 months ago

turboPasqual commented 9 months ago

Right now (v0.1.17) there is always a distance of 1 between each channel for a multi channel type.

Let's take the example from the readme:

Although the channel_size is 16bit, channels 3, 4 and 5 will be used for red, green and blue. It would be correct to use 3, 5 and 7. (At least with my DMX controllers. But I guess this is always like this.) So I can just use single channels or need to use 8bit size. In my oppinion it would be even better to let me configure those channels. I have some rare cases where the channels are not in a row (e.g. red=1, blue = 5, green = 11).

turboPasqual commented 9 months ago

I have just realised that this might be an explanation for issue #46 Transition is flickering.

Breina commented 9 months ago

That's very strange. Using your exact configuration, it outputs in 16-bit chunks.

image

image

image

In my oppinion it would be even better to let me configure those channels

Try this:

        - channel: 1
          name: my_rgb_lamp
          type: rgb
          transition: 1
          channel_size: 16bit
          output_correction: linear
          channel_setup:
            - r
            - 0
            - g
            - 0
            - b

image

turboPasqual commented 9 months ago

On further testing I noticed that this works fine although it gets displayd wrong. I have an rgb light using the 16 bit channels 409/411/413 and it works as expected. But in the guy it looks like this:

image