diff --git a/README.md b/README.md index 183b3b3..b7cebe7 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ light: refresh_every: 0 # Resend values if no fades are running every x seconds, 0 disables automatic refresh universes: # Support for multiple universes 0: # Nr of Universe (see configuration of your Art-Net Node) + send_partial_universe: True # Only send the universe which contains data output_correction: quadratic # optional: output correction for the whole universe, will be used as default if nothing is set for the channel devices: # Dimmer @@ -109,6 +110,7 @@ light: - **max-fps** (*Optional; default=25*): frame rate for fade update (1 to 40 FPS) - **refresh_every** (*Optional; default=120*): Seconds to resend values if no fades are running, 0 disables. - **universe** (*Required*): Art-Net universe for following DMX channels. + - **send_partial_universe** (*Optional; default=True*): Some controllers only accept full DMX frames. Set to `False` to always send the full 512 channels to every universe. - **output_correction** (*Optional; default=linear*): applied to whole universe - **'linear'** - **'quadratic'** (see Graph) diff --git a/custom_components/artnet_led/light.py b/custom_components/artnet_led/light.py index b8dcecb..d35bbc2 100644 --- a/custom_components/artnet_led/light.py +++ b/custom_components/artnet_led/light.py @@ -38,6 +38,7 @@ CONF_DEVICE_TRANSITION = ATTR_TRANSITION CONF_INITIAL_VALUES = "initial_values" +CONF_SEND_PARTIAL_UNIVERSE = "send_partial_universe" log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) @@ -169,6 +170,11 @@ async def async_setup_platform(hass: HomeAssistant, config, async_add_devices, d d.set_initial_brightness(device[CONF_DEVICE_VALUE]) device_list.append(d) + + send_partial_universe = universe_cfg[CONF_SEND_PARTIAL_UNIVERSE] + if not send_partial_universe and universe.highest_channel != 512: + universe.add_channel(start=512, width=1, channel_name="Full universe hack") + async_add_devices(device_list) return True @@ -856,6 +862,7 @@ async def restore_state(self, old_state): vol.Required(CONF_NODE_HOST): cv.string, vol.Required(CONF_NODE_UNIVERSES): { vol.All(int, vol.Range(min=0, max=1024)): { + vol.Optional(CONF_SEND_PARTIAL_UNIVERSE, default=True): cv.boolean, vol.Optional(CONF_OUTPUT_CORRECTION, default=None): vol.Any( None, vol.In(AVAILABLE_CORRECTIONS) ),