Help with automation: DMX Lighting

Hi all, new here trying to get HA setup for the first time using Hassio (version: 96.5). My first project is controlling DMX lighting with HA using the hass-dmx custom component. Here’s what I have so far in my configuration:


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

light:
  - platform: dmx
    host: 10.5.0.10     #House DMX Controller (eDMX King)
    port: 6454
    dmx_channels: 512 
    default_level: 100
    universe: 0
    devices:
      - channel: 1
        name: FP - Column - Lev 1, Post 1 (South)
        type: rgbw_auto
        
      - channel: 5
        name: FP - Column - Lev 1, Post 2
        type: rgbw_auto
        
      - channel: 9
        name: FP - Column - Lev 1, Post 3
        type: rgbw_auto
        
      - channel: 13
        name: FP - Column - Lev 1, Post 4 (North) 
        type: rgbw_auto
        
      - channel: 17
        name: FP - Column - Lev 2, Post 1 (South)
        type: rgbw_auto
        
      - channel: 21
        name: FP - Column - Lev 2, Post 2 (North)
        type: rgbw_auto
         
      - channel: 25
        name: FP - Column - Lev 3, Post 1 (South)
        type: rgbw_auto
         
      - channel: 29
        name: FP - Column - Lev 3, Post 2 (North)
        type: rgbw_auto
         
      - channel: 33
        name: FP - Downlight - Can 1 (South)
        type: rgbw_auto
        
      - channel: 37
        name: FP - Downlight - Can 2
        type: rgbw_auto
        
      - channel: 41
        name: FP - Downlight - Can 3 (Middle)
        type: rgbw_auto
        
      - channel: 45
        name: FP - Downlight - Can 4
        type: rgbw_auto
        
      - channel: 49
        name: FP - Downlight - Can 5 (North)
        type: rgbw_auto
      
      - channel: 53
        name: LS - Tree Uplight - Front Aspen 1 (East)
        type: rgbw_auto
        
      - channel: 57
        name: LS - Tree Uplight - Front Aspen 2 (West)
        type: rgbw_auto
        
      - channel: 61
        name: LS - Tree Uplight - Side Small Tree 1 (East)
        type: rgbw_auto
        
      - channel: 65
        name: LS - Tree Uplight - Side Small Tree 2 (West)
        type: rgbw_auto
        
      - channel: 69
        name: LS - Tree Uplight - Large Front Tree
        type: rgbw_auto
        
      - channel: 73
        name: PD - Pond - Waterfall
        type: rgbw_auto
         
      - channel: 77
        name: PD - Pond - West
        type: rgbw_auto
         
      - channel: 81
        name: PD - Pond - East
        type: rgbw_auto

# DMX Light Groups
  - platform: group
    name: Front Porch Column Lights
    entities:
      - light.fp_column_lev_1_post_1_south
      - light.fp_column_lev_1_post_2
      - light.fp_column_lev_1_post_3
      - light.fp_column_lev_1_post_4_north
      - light.fp_column_lev_2_post_1_south
      - light.fp_column_lev_2_post_2_north
      - light.fp_column_lev_3_post_1_south
      - light.fp_column_lev_3_post_2_north

  - platform: group
    name: Front Porch Downlights (Cans)
    entities:
      - light.fp_downlight_can_1_south
      - light.fp_downlight_can_2
      - light.fp_downlight_can_3_middle
      - light.fp_downlight_can_4
      - light.fp_downlight_can_5_north

  - platform: group
    name: Landscape - Small Tree Uplights
    entities:
      - light.ls_tree_uplight_front_aspen_1_east
      - light.ls_tree_uplight_front_aspen_2_west
      - light.ls_tree_uplight_side_small_tree_1_east
      - light.ls_tree_uplight_side_small_tree_2_west


  - platform: group
    name: Landscape - Pond Lights 
    entities:
      - light.pd_pond_waterfall
      - light.pd_pond_east
      - light.pd_pond_west

  - platform: group
    name: All DMX Lights
    entities:
      - light.front_porch_column_lights
      - light.front_porch_downlights_cans
      - light.landscape_small_tree_uplights
      - light.landscape_pond_lights
      - light.ls_tree_uplight_large_front_tree

This works great and I am able to control all of the lights & groups in lovelace. However, I am running into issues getting an automation setup to turn the lights on at sunset.

Here’s that code:

- id: '1564249253544'
  alias: Outside Lights on at Sunset
  trigger:
  - event: sunset
    offset: '-1:00'
    platform: sun
  condition: []
  action:
   - service: light.turn_on
     data:
       entity_id: light.front_porch_column_lights
       rgb_color: [255,240,0]
       white_value: 25
       brightness: 50

   - service: light.turn_on
     data:
       entity_id: light.front_porch_downlights_cans
       rgb_color: [255,151,0]
       white_value: 25
       brightness: 20
    
   - service: light.turn_on
     data:
       entity_id: light.landscape_small_tree_uplights
       rgb_color: [255,220,0]
       white_value: 25
       brightness: 2
    
   - service: light.turn_on
     data:
       entity_id: light.landscape_pond_lights
       rgb_color: [238,255,36]
       white_value: 25
       brightness: 20
    
   - service: light.turn_on
     data:
       entity_id: light.ls_tree_uplight_large_front_tree
       rgb_color: [255,241,0]
       white_value: 25
       brightness: 100

I am attempting to test the code above using the “trigger” function in the automation editor, but nothing happens. I’ve been playing with this for hours and I can’t figure out what’s wrong.

What am I missing??

Thanks,
-Bryan

1 Like

First, it won’t trigger automatically without the automation being on. Use the states page to check. I would suggest using the services page and the automation.trigger service to test the actions, as it will bypass any and all triggers or conditions.

You can find both by using the Developer Tools on the sidebar. If you can’t see it, then you need to set your user as Advanced in your Profile.

I’m using the trigger button here, which I think is the same. From what I understand, the trigger button will bypass any set triggers and/or conditions within the automation. Therefore, it’s my assumption that something is wrong with the code.

According to the states page, it is on:

I’m not sure exactly what I did… but I did a little formating work, closed everything, shutdown hassio, and had a beer… when I can back and started everything back up it started working.

For reference, here’s the automation config now:

- id: '1564249253544'
  alias: Outside Lights ON before Sunset
  trigger:
  - event: sunset
    offset: '-1:00'
    platform: sun
  condition: []
  action:
  - data:
      brightness: 50
      entity_id: light.front_porch_column_lights
      rgb_color:
      - 255
      - 240
      - 0
      transition: 10
      white_value: 25
    service: light.turn_on
  - data:
      brightness: 20
      entity_id: light.front_porch_downlights_cans
      rgb_color:
      - 255
      - 151
      - 0
      transition: 10
      white_value: 25
    service: light.turn_on
  - data:
      brightness: 2
      entity_id: light.landscape_small_tree_uplights
      rgb_color:
      - 255
      - 220
      - 0
      transition: 10
      white_value: 25
    service: light.turn_on
  - data:
      brightness: 20
      entity_id: light.landscape_pond_lights
      rgb_color:
      - 238
      - 255
      - 36
      transition: 10
      white_value: 25
    service: light.turn_on
  - data:
      brightness: 100
      entity_id: light.ls_tree_uplight_large_front_tree
      rgb_color:
      - 255
      - 241
      - 0
      transition: 10
      white_value: 25
    service: light.turn_on

- id: '1564262634092'
  alias: Outside lights OFF after sunrise
  trigger:
  - event: sunrise
    offset: '+1:00'
    platform: sun
  condition: []
  action:
  - data:
      entity_id: light.all_dmx_lights
      transition: 20
    service: light.turn_off

Hi Bryan,

Thanks for posting.
I’m looking into DMX oor en Alternative to install a lot of dimmable led lighting in my house. All together there will be about 100 lights that should be able to be controleable.
So I don’t want to make use of WiFi for this and reserve this WiFi bandwidth for some sensors and other devices.

For this reason I was looking into dmx/Dali, but as Dali is less supported them dmx I prefer dmx.

Can you give me some more insight on your setup?
Thanks a lot!
Pieter

Hi @pietervanstee, sorry for the slow reply-

My basic hardware setup is:

Home Assistant ==[LAN]==> DMX King eDMX1 Pro ==[DMX]==> DMX Signal Splitter / Line Isolator ==[DMX]==> DMX Fixtures.

Here’s my current configuration, along with some of the fixture grouping that I have done.

#-------------------------------------------------------------------------------- Lights
light:

########################################################################
# HASS-DMX
# https://github.com/jnimmo/hass-dmx
########################################################################
  - platform: dmx
    host: 10.5.0.10     #House DMX Controller (eDMX King)
    port: 6454
    dmx_channels: 512 
    default_level: 0
    universe: 0
    devices:
      - channel: 1
        name: FP - Column - Lev 1, Post 1 (South)
        type: rgbw
        
      - channel: 5
        name: FP - Column - Lev 1, Post 2
        type: rgbw
        
      - channel: 9
        name: FP - Column - Lev 1, Post 3
        type: rgbw
        
      - channel: 13
        name: FP - Column - Lev 1, Post 4 (North) 
        type: rgbw
        
      - channel: 17
        name: FP - Column - Lev 2, Post 1 (South)
        type: rgbw
        
      - channel: 21
        name: FP - Column - Lev 2, Post 2 (North)
        type: rgbw

      - channel: 25
        name: FP - Column - Lev 3, Post 1 (South)
        type: rgbw

      - channel: 29
        name: FP - Column - Lev 3, Post 2 (North)
        type: rgbw

      - channel: 33
        name: FP - Downlight - Can 1 (South)
        type: rgbw
        
      - channel: 37
        name: FP - Downlight - Can 2
        type: rgbw
        
      - channel: 41
        name: FP - Downlight - Can 3 (Middle)
        type: rgbw
        
      - channel: 45
        name: FP - Downlight - Can 4
        type: rgbw
        
      - channel: 49
        name: FP - Downlight - Can 5 (North)
        type: rgbw
      
      - channel: 53
        name: LS - Tree Uplight - Front Aspen 1 (East)
        type: rgbw
        
      - channel: 57
        name: LS - Tree Uplight - Front Aspen 2 (West)
        type: rgbw
        
      - channel: 61
        name: LS - Tree Uplight - Side Small Tree 1 (East)
        type: rgbw
        
      - channel: 65
        name: LS - Tree Uplight - Side Small Tree 2 (West)
        type: rgbw
        
      - channel: 69
        name: LS - Tree Uplight - Large Front Tree
        type: rgbw
        
      - channel: 73
        name: PD - Pond - East
        type: rgbw

      - channel: 77
        name: PD - Pond - Waterfall
        type: rgbw

      - channel: 81
        name: PD - Pond - West
        type: rgbw


########################################################################
# DMX Light Groups 
########################################################################
  - platform: group
    name: Front Porch Column Lights
    entities:
      - light.fp_column_lev_1_post_1_south
      - light.fp_column_lev_1_post_2
      - light.fp_column_lev_1_post_3
      - light.fp_column_lev_1_post_4_north
      - light.fp_column_lev_2_post_1_south
      - light.fp_column_lev_2_post_2_north
      - light.fp_column_lev_3_post_1_south
      - light.fp_column_lev_3_post_2_north

  - platform: group
    name: Front Porch Column Lights - Half Group 1
    entities:
#      - light.fp_column_lev_1_post_1_south
      - light.fp_column_lev_1_post_2
#      - light.fp_column_lev_1_post_3
      - light.fp_column_lev_1_post_4_north
#      - light.fp_column_lev_2_post_1_south
      - light.fp_column_lev_2_post_2_north
      - light.fp_column_lev_3_post_1_south
#      - light.fp_column_lev_3_post_2_north
  
  - platform: group
    name: Front Porch Column Lights - Half Group 2
    entities:
      - light.fp_column_lev_1_post_1_south
#      - light.fp_column_lev_1_post_2
      - light.fp_column_lev_1_post_3
#      - light.fp_column_lev_1_post_4_north
      - light.fp_column_lev_2_post_1_south
#      - light.fp_column_lev_2_post_2_north
#      - light.fp_column_lev_3_post_1_south
#      - light.fp_column_lev_3_post_2_north

  - platform: group
    name: Front Porch Downlights (Cans)
    entities:
      - light.fp_downlight_can_1_south
      - light.fp_downlight_can_2
      - light.fp_downlight_can_3_middle
      - light.fp_downlight_can_4
      - light.fp_downlight_can_5_north

  - platform: group
    name: Front Porch Downlights (Cans) - Half Group 1
    entities:
#      - light.fp_downlight_can_1_south
      - light.fp_downlight_can_2
#      - light.fp_downlight_can_3_middle
      - light.fp_downlight_can_4
#      - light.fp_downlight_can_5_north

  - platform: group
    name: Front Porch Downlights (Cans) - Half Group 2
    entities:
      - light.fp_downlight_can_1_south
#      - light.fp_downlight_can_2
      - light.fp_downlight_can_3_middle
#      - light.fp_downlight_can_4
      - light.fp_downlight_can_5_north

  - platform: group
    name: Landscape - Small Tree Uplights
    entities:
      - light.ls_tree_uplight_front_aspen_1_east
      - light.ls_tree_uplight_front_aspen_2_west
      - light.ls_tree_uplight_side_small_tree_1_east
      - light.ls_tree_uplight_side_small_tree_2_west

  - platform: group
    name: Landscape - Small Tree Uplights - Half Group 1
    entities:
#      - light.ls_tree_uplight_front_aspen_1_east
      - light.ls_tree_uplight_front_aspen_2_west
      - light.ls_tree_uplight_side_small_tree_1_east
#      - light.ls_tree_uplight_side_small_tree_2_west

  - platform: group
    name: Landscape - Small Tree Uplights  - Half Group 2
    entities:
      - light.ls_tree_uplight_front_aspen_1_east
#      - light.ls_tree_uplight_front_aspen_2_west
#      - light.ls_tree_uplight_side_small_tree_1_east
      - light.ls_tree_uplight_side_small_tree_2_west


  - platform: group
    name: Landscape - Pond Lights 
    entities:
      - light.pd_pond_waterfall
      - light.pd_pond_east
      - light.pd_pond_west

  - platform: group
    name: Landscape - Pond Lights - Half Group 1
    entities:
      - light.pd_pond_waterfall
#      - light.pd_pond_east
      - light.pd_pond_west

  - platform: group
    name: Landscape - Pond Lights - Half Group 2
    entities:
#      - light.pd_pond_waterfall
      - light.pd_pond_east
#      - light.pd_pond_west

# Special Groups
  - platform: group
    name: DMX Lights Group 1
    entities:
#      - light.fp_column_lev_1_post_1_south
      - light.fp_column_lev_1_post_2
#      - light.fp_column_lev_1_post_3
      - light.fp_column_lev_1_post_4_north
#      - light.fp_column_lev_2_post_1_south
      - light.fp_column_lev_2_post_2_north
      - light.fp_column_lev_3_post_1_south
#      - light.fp_column_lev_3_post_2_north
      - light.fp_downlight_can_1_south
#      - light.fp_downlight_can_2
      - light.fp_downlight_can_3_middle
#      - light.fp_downlight_can_4
      - light.fp_downlight_can_5_north
      - light.ls_tree_uplight_front_aspen_1_east
#      - light.ls_tree_uplight_front_aspen_2_west
      - light.ls_tree_uplight_side_small_tree_1_east
#      - light.ls_tree_uplight_side_small_tree_2_west
#      - light.ls_tree_uplight_large_front_tree
      - light.pd_pond_waterfall
#      - light.pd_pond_east
      - light.pd_pond_west

  - platform: group
    name: DMX Lights Group 2
    entities:
      - light.fp_column_lev_1_post_1_south
#      - light.fp_column_lev_1_post_2
      - light.fp_column_lev_1_post_3
#      - light.fp_column_lev_1_post_4_north
      - light.fp_column_lev_2_post_1_south
#      - light.fp_column_lev_2_post_2_north
#      - light.fp_column_lev_3_post_1_south
      - light.fp_column_lev_3_post_2_north
#      - light.fp_downlight_can_1_south
      - light.fp_downlight_can_2
#      - light.fp_downlight_can_3_middle
      - light.fp_downlight_can_4
#      - light.fp_downlight_can_5_north
#      - light.ls_tree_uplight_front_aspen_1_east
      - light.ls_tree_uplight_front_aspen_2_west
#      - light.ls_tree_uplight_side_small_tree_1_east
      - light.ls_tree_uplight_side_small_tree_2_west
      - light.ls_tree_uplight_large_front_tree
#      - light.pd_pond_waterfall
      - light.pd_pond_east
#      - light.pd_pond_west

  - platform: group
    name: All DMX Lights
    entities:
      - light.front_porch_column_lights
      - light.front_porch_downlights_cans
      - light.landscape_small_tree_uplights
      - light.landscape_pond_lights
      - light.ls_tree_uplight_large_front_tree

Hi Bryan,

Thanks for sharing this with me.
Looks very interesting.
I was wondering if you’re also using wall switches and if so what kind of switches?
While researching this topic I came across some which are quite exclusive and expensive, as this isn’t used for domestic use a lot I guess?

As this is a stand alone system, I was wondering if it’s possible to put this to good use and make it into an independent system where there is a posibility to use the lights (even basic) when HA is offline for some reason.

If I understand this DMX protocol right there are 512 channels, which is a channel for each of the rgbw, so 4? As I’m only looking to use single color, or dual color CCT light strips, does this mean that per light I only use 1 or 2 (cct) channels?

How are you powering your light strips? I was wondering if there is a possibility to power them through poe, to prevent scattering a lot of PSUs throughout the house. If anyone has experience with this, please let me know.

Thanks again!
Pieter

Is it possible to send ArtNet to multiple DMX nodes? I have my main ethernet wired DMX adaptor working but I am looking to add a couple espixelstick nodes in places a cable run isn’t possible.

Yes, just repeat the DMX platform in the config for each controller.

Example:

  - platform: dmx
    host: 10.5.0.11     #DMX Controller 1
    port: 6454
    dmx_channels: 512 
    default_level: 0
    universe: 0
    devices:
      - channel: 1
        name: Device 1
        type: dimmer

  - platform: dmx
    host: 10.5.0.12     #DMX Controller 2
    port: 6454
    dmx_channels: 512 
    default_level: 0
    universe: 0
    devices:
      - channel: 1
        name: Device 1
        type: dimmer

@pietervanstee -

  1. I control most of my DMX lights via automation. There are DMX wall switch controllers, but I am not sure how well that would play with Home Assistant. You could use other types of wall switches to trigger actions through Home Assistant. For example, a Z-Wave switch could trigger a DMX light on and off via an automation.
  2. Yes, generally one channel per color. Some DMX fixtures have additional channels for shutter, strobe, and other functions though.
  3. All of my DMX fixtures are powered directly via mains power. Generally, my lights have integrated PSUs

Hope this helps.
-Bryan

Hi Bryan, thanks for clarifying that for me.

At the moment I’m also looking into DALI lighting because I could combine DMX with z wave or something else. But I really want to have my lighting system to be able to work independently from HA as well…
So if there is an issue we can just keep using everything.

Dali let’s is so that as they have wall switches which are affordable… Or an option to use custom buttons on a Dali interface to control for example 4 scenes.

This was an option I missed in dmx…

Thanks
Pieter