Skip to content
forked from jnimmo/hass-dmx

Home Assistant DMX over IP Integration

License

Notifications You must be signed in to change notification settings

lasry1/hass-dmx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 

Repository files navigation

hass-dmx

Home Assistant DMX over IP Light Platform

The DMX integration for Home Assistant allows you to send DMX values to an Art-Net capable DMX interface.

The component is a one way integration, and sends UDP packets to the DMX interface. This integration uses no external libraries and requires at least Python version 3.5.

Prerequisites

You need at least hass >= 0.66 in order to use this component.

Usage

To use DMX in your installation:

  1. Download the dmx.py file and save into the 'custom_components/light' directory. (Create a 'custom_components' folder in the location of your configuration.yaml file, and create a subdirectory 'light' to store this platform)
  2. Add the following lines to your configuration.yaml file:
light:
  - platform: dmx
    host: <IP Address>
    port: 6454
    dmx_channels: 512 
    default_level: 0
    universe: 0
    devices:
      - channel: 1
        name: House lights
        type: dimmer
        transition: 3
      - channel: 2
        name: Hall lights
        type: dimmer
        default_level: 255
      - channel: 3
        name: Stair lights
        type: dimmer
        transition: 3
      - channel: 4
        type: rgb
        name: Entrance LED Strip
        default_rgb: [0,0,150]
      - channel: 7
        type: dimmer
        name: Smoke machine

Configuration variables:

  • host (Required): Host Art-Net/DMX gateway
  • port (Optional): Defaults to 6454
  • dmx_channels (Required): The number of DMX channels to send a value for (even number between 2 & 512)
  • default_level (Required): Default level for Home Assistant to assume the lights have been set to - in most cases 0 would make sense. Note Home Assistant will not send these values to the gateway until an explicit change is made unless send_levels_on_startup is True.
  • send_levels_on_startup (Optional): Defaults to True if not specified. Setting this to False means Home Assistant will not send any DMX frames until a change is made.
  • universe (Optional): Artnet Universe. Defaults to 0 if not specified.

Device configuration variables:

  • channel (Required): The DMX channel for the light (1-512)
  • name (Required): Friendly name for the light (will also be used for the entity_id)
  • type (Required):
    • 'dimmer' (single channel),
    • 'rgb' (three channel rgb),
    • 'rgbw' (three channel rgb + white),
    • 'rgbw_auto' (three channel rgb + automatically calculated white value),
    • 'drgb' (master-dimmer + three channel rgb),
    • 'drgbw' (master-dimmer + three channel rgb + white),
    • 'rgbwd' (three channel rgb + white + dimmer) or 'switch' (single channel with no brightness adjustments)
  • default_level (Optional): Default level to assume the light is set to (0-255). Please use light_profiles.csv if you want to specify a default colour or brightness to be used when turning the light on in HA.
  • default_rgb (Optional): Default colour to give to Home Assistant for the light in the format [R,G,B]
  • white_level (Optional): Default white level for RGBW lights (0-255)
  • transition (Optional): Set a default fade time for transitions. Transition times specified through the turn_on / turn_off service calls in Home Assistant will override this behaviour.

Supported features:

  • Transition time can be specified through services to fade to a colour (for RGB fixtures) or value. This currently is set to run at 40 frames per second. Multiple fades at the same time seem to be possible.
  • Brightness: Once a channel is turned on brightness can be controlled through the Home Assistant interface.
  • White level: For RGB lights with a separate white LED this controls the white LED. This can be automatically controlled using the colour wheel on 'rgbw_auto' lights, or manually with 'rgbw'

Limitations:

  • DMX frames must send values for all channels in a universe. If you have other channels which are controlled by a different device or lighting desk, set Home Assistant to default to 0 values; and set your Art-Net device to merge on highest value rather than most recent update. This means channels could be controlled from either the desk or Home Assistant.

Support for other hardware

Simple, FTDI-chip based USB2DMX cables can be made working with this component through a UDP proxy implemented in C.

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

About

Home Assistant DMX over IP Integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%