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
115 stars 10 forks source link

Add support for effects and strobe/effect speed #50

Open DGdB opened 10 months ago

DGdB commented 10 months ago

It looks like HomeAssistant Light entities have support for an "effect" property that we could use to set the effect of a DMX fixture. Possibly the "flash" value could be used to control the effect speed?

I have two old Chauvet LED Bars which support RGB + separate dimmer, but they also have "effects" which are built into the light when in 7-ch mode. So channel 1,2,3 are RGB, 5 is strobe/effect speed, 6 is the effect selection (mode) and 7 is the dimmer.

Currently I have implemented the light as an RGB fixture and created the "speed" and "mode" as linear dimmers. I am then using an automation to take the value from an input_select and set the "mode" dimmer to the correct value for each effect. See screenshot of lovelace UI for reference.

It would be super cool to be able to use the native HA effect option for light entities!

Thanks in advance, I do a little bit of light .NET dev for work but am not super familiar with Python, but I am super familiar with DMX lighting. If I can do anything to help further this project, please let me know. I have included some links for reference.

https://developers.home-assistant.io/docs/core/entity/light/?_highlight=effect&_highlight=flash https://www.chauvetdj.com/wp-content/uploads/2015/12/COLORband_TRI_UM.pdf image

Breina commented 10 months ago

Yep, already working on that! :)

Plan is to implement the format of OpenFixtureLibrary directly, seems like they have already figured the best way configure fixtures.

When all light colours fit into one Light Entity, I can use the effect list to select your effect, and have separate entities that are enabled/disabled to control the speed. I'd bundle all of these entities in a Device per fixture.

image

The Flash parameter is when calling service light.turn_on, to briefly flash it short or long.

But progress is being made. Lots of work of course, but we're slowly getting there. :)

DGdB commented 9 months ago

Awesome, thanks Breina, looks like lots more exciting stuff to come!