DMX lighting

Finally had some time to look into it again, and I found a solution, maybe interesting for anyone else that tries to implement random dmx stuff (like to roto head mentioned above)

I checked the vlaues with lightjams and discovered that my assumption was correct. Even if I used light.toggle, it messed up after some times because sometimes it didnt send new values if the different lights where on or off (if a value is 0 it shows the light as off). I didnt find the pattern but found an easy fix.

First I set only one channel to rgbww and was able to controll all my 5 channels needed with one action.

The fix to the weird behaviour was to add a “light.turn.on” without any data at the end of every automation, this all the lights are always set to on.

Everything works flawless now :slight_smile:

So I guess it is decided then, that the branch @Breina started will be the official DMX integration. I’ll move to that integration this weekend and probably archive my own branch to make things a little less confusing. Thanks @Breina for doing a great job on this!

1 Like

Thanks for the work on this @Breina! I just migrated over, and everything is working great! Glad to see the DMX integration getting some renewed attention.

Made the switch today and everything is running fine. The only “issue” I had, was that a new dimmer light that gets turned on, gets a brightness of 0 so nothing happened. Had to set a brightness for every channel I have.

Is that recurring or a one time thing?

It was a one time thing. I rebooted several times without issues. Now, I installed 2022.9.1 and all entities got disabled. I see this in the logs:

Logger: homeassistant.config
Source: custom_components/artnet_led/light.py:7
Integration: artnet_led (documentation)
First occurred: 11:50:25 (1 occurrences)
Last logged: 11:50:25

Platform error: light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 878, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/artnet_led/light.py", line 7, in <module>
    from homeassistant.components.light import (
ImportError: cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/__init__.py)

https://developers.home-assistant.io/blog/2022/08/18/light_white_value_removed/

EDIT: I see it’s fixed on github. I installed using HACS. Maybe it’s not picking up the new version?
EDIT: HACS is messing up I think:

This shows the correct repository is added.

In the custom_components folder however, I get this:

This is not the manifest that is on github.

EDIT: removed it and re-added. I think somehow there was an issue because both integrations have domain name artnet_led. Problem solved!

1 Like

I’m hoping to use this to enable me to trigger a smoke machine by using an ESPHome PIR motion sensor. This thread and the ha-artnet-led project seem to primarily talk about LED control, but I gotta imagine it would be possible to just trigger a smoke machine as well. Am I correct? If so, how?

Yep, willing to implement this for you. Someone else is using this for his ceiling fan as well. Please create an Issue for this on my repo: Issues · Breina/ha-artnet-led · GitHub

Thank you! I went ahead and submitted an issue.

Sorry for what I know is a very basic question, but can I get some fundamental information on how to get this going? I tried to get HACS installed to install ha-artnet-led, but couldn’t get HACS to show up under “add integration”. I instead went to install manually by uploading the artnet_led folder to my home assistant under config/custom_components. I see that pyartnet is a prerequisite for artnet_led, do I need to install that manually? Once I think things might be set up right, how do I go about setting up a basic interaction with a Art-net node and a DMX light?

Thanks

I notice you are confused indeed. :slight_smile:

My instruction were indeed not terribly detailed, I’ve updated the README to be more helpful. Check and try if that helps for you: ha-artnet-led/README.md at main · Breina/ha-artnet-led · GitHub

I removed the mention of the manual installation because that will only cause trouble. In short, follow the link to install HACS (it’s not an integration).

I appreciate the updated readme. Yes the installation process is certainly clearer now. However, as I mentioned above I wasn’t able to get HACS installed. I followed it’s directions, got SSH set up and downloaded it with wget, but when I went to add the integration, HACS doesn’t show up. But if HACS is needed then I can take that up with that group.

Once I do get HACS up and running and follow your updated README, I still have a question on how I use it. Do I need to somehow create a device using the artnet_led platform that gets defined in the configurations.py?

After doing wget -O - https://get.hacs.xyz | bash - and restarting, you should be able to see HACS on your left panel as such:
image

After that, you can follow the instructions further indeed. All configuration is done through configuration.yaml, no need to click the “Add integration” button.

Hi @BlueWRXPride - I did this same thing last year for Halloween. I put a fog machine under a fake witches’ caldron that would explode with fog when the doorbell was pushed. My fog machine also had LEDs that were controlled via a set of RGB channels. The fog output was controlled by a dedicated fog volume channel (0=off, 255=full output). I used an RGB channel for the LEDs and a single dimmer channel for the fog volume in the integration config.

Here’s the automation I created for the doorbell push:

alias: Doorbell Fog
description: ""
trigger:
  - platform: state
    entity_id: binary_sensor.doorbell_3315_front_doorbell
condition: []
action:
  - service: light.turn_on
    target:
      entity_id: light.fog_machine_led_color
    data:
      color_name: red
      brightness: 255
  - service: light.turn_on
    target:
      entity_id: light.fog_machine_fog_volume
    data:
      brightness: 255
  - scene: scene.outside_lights_halloween_2_red
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - scene: scene.outside_lights
  - service: light.turn_on
    target:
      entity_id: light.fog_machine_fog_volume
    data:
      brightness: 0
      transition: 2
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - service: light.turn_off
    target:
      entity_id: light.fog_machine_led_color
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - scene: scene.outside_lights
mode: single

(There are a couple of scenes noted above that would also change the landscape lighting along with the fog)

Here’s an example of the integration configuration. This would need to be customized based on your device and the DMX channels in use.

light:
- platform: artnet_led
  host: IP                              # IP of Art-Net Node
  universes:                 
    0:                                  # Universe
      devices:
        - channel: 1                    # Fog LED channel 
          name: Fog Machine - LED Color
          type: rgb
        - channel: 4                    # Fog trigger channel
          name: Fog Machine - Fog Volume
          type: dimmer
1 Like

Going to try @Breina 's implementation shortly.

Regarding non-LED via DMX: I’ve just got a bare-board DMX motor controller installed and working (mechanised a sash window while restoring). It has 4 channels that need to be programmed (direction, speeds, limit).

I’ve managed it by creating a template Cover that has action scripts for open close stop, each of which call a script to set the channels to correct values.

Currently mayhem when HA reboots (all channels on for a brief time). Has this been addressed anywhere? i.e. made it into @Breina branch?

Yes, that’s a fix that was already present on the corb3000 branch with the restore entity state fix. No mayhem here. :slight_smile:

Also working in the background on custom device configuration such as you are describing. Current focus is compatibility though, some users still having issues with migration. Not sure why yet.

Thanks. Have now moved over to your (@Breina) branch.

Probably for a similar HACS reason to @merijn 's above (I already had 2x artnet_led repos in HACS), my corb3000 install did not detect an update to itself (which is why I didn’t have the restore entity state fix, but didn’t have an update available flagged either)

I think the issue of HACS not updating DOES come down to having >1 repo with same name. If the ‘first’ such repo has no updates, then subsequent ones don’t get checked. It might be an idea, in the @Breina readme/install guide, to encourage users to remove all previously-used artnet_led repos from HACS at some early stage in the process.

Otherwise users won’t be getting @Breina subsequent updates flagged.

Done, thanks for the suggestion!

Once stuff is stable enough, I will apply to become a default repository.

2 Likes

Hello everyone, been using HomeAssistant and HACS for many years, have tried the other previous iterations to be able to control external DMX device with HomeAssistant
 When I saw this was getting a face lift I was very excited, gave it a spin. Been fiddling with this for days now, still running into the same bug. Will try to describe as best as possible.

I am trying to control the JINX! (v2.4) tool running on a desktop.
I have tried may ways to accomplish this using scripts or automations, always end up having the same issue.

I have created 8 channels in the same universe.
I send the 8 values a first time, it works.
I send 8 other values using a second script, it works.
I send 8 other values using a third script, it works.
It can work a few times properly then at some point it’s as if HA starts to continue sending previous and current values, my scene then changes non-stop in JINX and I cannot stop this behavior until I stop JINX.
When I use ARTNETOMINATOR, values sent my HomeAssistant seem stable

Anyone else has tried to get a similar setup working ?

Thank you !!

So if I understand you right, this is how you’ve tested it right now?

image

Multiple devices sending stuff to one Artnet interface will cause confusion on the receiving end. I don’t exactly know how your controller handles it, but my guess is that it’s getting sequence numbers out of order.

It might help to disable the ‘Send Artnet Sequence Numbers’ option in your JINX! device settings. Maybe on our end, we need an option to disable it as well