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
artnet artnet-controller artnet-dmx dmx home-assistant

hacs_badge

Home Assistant component for Art-Net LED (DMX)

Updated integration Supporting the new color mode in Home Assistant. leveraged heavily form spacemanspiff2007 and jnimmo Now supports 16 bit resolution (also supports 24 bit and 32 bit but I don't know of a DMX controller that would use it) Use Brightness and RGB value separately to give more resolution to brightness to be able to make use of 16 bit resolution

The DMX integration for Home Assistant allows you to send DMX values to an Art-Net capable DMX interface. This component is a one way integration which sends Art-Net UDP packets to the DMX interface. This integration uses pyartnet libraries and requires at least Python version 3.8.

Installation

Note

This integration requires HACS to be installed

Warning

When migrating from jnimmo or corb3000's integration:

  1. First remove the integration
  2. Comment or remove the YAML config
  3. Restart
  4. Delete the light entities
  5. Remove all other _Customrepositories that are also named ha-artnet-led
  6. Install this integration and re-introduce the config (also change change custom_white to color_temp)
  1. Open HACS
  2. Open the options in the top right and select Custom repositories
  3. Enter this repository's URL (https://github.com/Breina/ha-artnet-led) under the Category Integration.
  4. Press Add
  5. + EXPLORE & DOWNLOAD REPOSITORIES
  6. Find Art-net LED Lighting for DMX in this list
  7. DOWNLOAD THIS REPOSITORY WITH HACS
  8. DOWNLOAD
  9. Restart Home Assistant (Settings > System > RESTART)

Configuration

hass-dmx is a community supported Home Assistant integration, if you have any questions you can discuss with the Home Assistant DMX Community.

artnet-led lighting is configured in the configuration.yaml file under the light domain.

Example:

light:
- platform: artnet_led
  host: IP                              # IP of Art-Net Node
  max_fps: 25                           # Max 40 per second
  refresh_every: 0                      # Resend values if no fades are running every x seconds, 0 disables automatic refresh
  node_type: artnet-direct              # Which protocol to use
  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
        - channel: 1                    # first channel of dmx dimmer
          name: my_dimmer               # name
          type: dimmer                  # type
          transition: 1                 # default duration of fades in sec. Will be overridden by Transition sent from HA
          output_correction: quadratic  # optional: quadratic, cubic or quadruple. Apply different dimming curves to the output. Default is None which means linear dimming
          channel_size: 16bit           # width of the channel sent to DMX device, default "8bit", "16bit", "24bit" and "32bit" available.
        - channel: 3
          name: my_rgb_lamp
          type: rgb
          transition: 1
          channel_size: 16bit
          output_correction: quadratic
          channel_setup: rbgw           # Auto-calculated white channel
        - channel: 125
          type: color_temp
          name: "my_color_temp_lamp"
          min_temp: 2500K
          max_temp: 6500K
          channel_setup: ch
        - channel: 41
          type: rgbww
          name: my_rgbww_lamp
          transition: 10
        - channel: 50
          name: sp4led_1_dimmer
          type: fixed
          channel_setup:
            - 255

Configuration variables

Device configuration variables

channel_setup

A string or list to customize the channel layout of your light. If a list is provided, fixed numeric values may be included.

Examples

channel_setup: Wrgb

White unscaled, red, green, blue

channel_setup:
  - W
  - r
  - g
  - b 

Same as above

channel_setup:
  - W
  - r
  - 128
  - b 

Staticly sets the green channel on 50% brightness

Definition

Compatibility

Type Default value
fixed [0,255] 0
binary [0,255] 0
dimmer [0,255] 0
color_temp d c C h H t T [0,255] ch
rgb d r R g G b B w* W* u U [0,255] rgb
rgbw d r R g G b B w W u U [0,255] rgbw
rgbww d c C h H t T r R g G b B u U [0,255] rgbch

* In the case of a white channel being used in an RGB light fixture, the white channel is automatically calculated.

Supported features

Output correction

From left to right: linear (default when nothing is set), quadratic, cubic then quadruple

Limitations

Future improvements

Supported hardware

See Also

Art-Net™ Designed by and Copyright Artistic Licence Holdings Ltd

To enable debug logging for this component:

logger:
  logs:
    custom_components.artnet_led: debug

Legal

Art-Net™ Designed by and Copyright Artistic Licence