Using Node.js and a Raspberry Pi to monitor Streaming ACN network for DMX changes and trigger actions

Awhile back, I wrote about the Shade Controller I created using Node.js and a USB relay running on a Raspberry Pi Zero. It works great. We can raise and lower the shade from anywhere on the network. However, I’ve always wanted a way to control this a little more automatically. The lighting volunteer is typically the person who operates the remote for the shade, so I really wanted a way to automate that part of the process for them so the shade can raise and lower exactly when we want it to, without them having to use an extra tool or device.

As I was working on some networking changes to one of our lighting consoles (we use Jands L5 consoles running Chroma-Q’s Vista 3), I had an idea… What if we could monitor the Streaming ACN lighting network for data changes just like any lighting node, and use that to trigger an action?

If you’ve not heard of Streaming ACN (sometimes called sACN or its official name E 1.31), it is an ethernet based protocol for sending DMX address and value information from a lighting console to receiver nodes which then relay the DMX information to lighting fixtures. It uses multicast traffic to send the information so it is very fast and efficient. At my church, we have several DMX universes of lighting information going over the network for each auditorium, controlling all of the light fixtures.

Luckily for me, a base protocol module for E 1.31 was already available for Node.js. So, using that module, I sat down and prototyped a solution and had something working in just a couple of hours. I’m calling my software sACN Translator. I’ve deployed it to a Raspberry Pi for production. It supports a simple REST API to allow you to control which universes it should listen to, as well as the fixtures to run triggers for. I also created a simple web interface which utilizes this API.

Screen Shot 2019-01-20 at 10.28.46 AM.png
Here is the simple web interface which interacts with the REST API.

Here is how I set it up on our system to trigger the shade controller. I started by adding two fixtures to the L5 console on Universe 1 (where I happened to have some spare room in my DMX addresses). I called these fixtures “Shades Up” and “Shades Down”, with DMX Addresses 511 and 512.

screen sharing picture january 20, 2019 at 5.34.39 am est
Here are the two “fixtures” on the layout, with notes attached.
screen sharing picture january 20, 2019 at 5.35.29 am est
I labeled the fixtures as generic “utility” fixtures with 1 DMX address each.

Then, I added entries in sACN Translator to monitor Universe 1 on the network and look for value changes to fixture addresses 511 and 512. I set it to run an HTTP trigger any time the values reaches 255 (100%). So, when I put the Shades Down fixture at 100% on the lighting console, the software sees that value, looks for a match in its list of fixtures, and then runs the corresponding HTTP request on the Raspberry Pi Zero connected to the USB relay to trigger the action which lowers the shade.

Here is a video of it in action:

Pretty cool! I decided to use separate fixture addresses for each trigger action, but I didn’t have to. I could have just one fixture and watch for two separate lighting values.

So now, all the operator has to do is run the cues like normal, and the programming will do the rest! I’ve made this software available for free on my Github repository. Let me know how it works for you!

2 comments

  1. hi,
    my church is planning a big lighting update, currently we have loads of rubbish halogen bulbs all around the place, not in any proper ellipsoidal spots but just normal ceiling and wall fixtures, these are controlled by two old dimmer packs and a rubbish desk, however all lights can also be controlled by a load of easy to use switches on the wall, we are keen to keep the simplicity of some switches but in affect create 3 different users to control different degrees of lighting (1 a very simple turn a switch on and you get normal white lighting in the room, 2 linked up to a 20 or so fader desk where you can dim all lights separately and control the colour of many different LED fixtures (eg. led bars, pars and some moving heads in the distant future) with only say an some rgb faders to control 5 or 6 fixtures with just 3 faders and 3 where we will plug a laptop in pre raspi to control all fixtures separately using magicq or another software) the idea is that in order to condence many fixtures into small amounts of faders, is there a way (even if complex) to use a raspi to take 1000 or so dmx channels and in affect split 1 fader to dim 6 dimmer channels but earlier in the chain, split the dmx and be able to control each fixture separately. make sense? probably not!

    in short, for a raspberry pi to take in dmx signals, then with an input of dmx 1 – 225 to have an output of dmx 4 7 and 467 to be at 225, is this possible at all through a simple raspberry pi? could we cut a dmx cable and solder all 3 wires to pins on the pi or would we have to find some usb adapter that took in and took out dmx?

    im going to send this message to several forums and try to piece together a way this is possible, i know a reasnoble amount about dmx and lighting, but nothing about raspis (we can use a computer instead but we want something without a long warm up time so all lights could be turned on at any time)! please do answer if you have ideas or have made a similar system elsewhere!

    thanks
    josh

    Like

    1. I recommend setting up a streaming ACN or Art-Net lighting network with DMX endpoints. Then you can just set a priority level for each lighting controller. The higher the priority, that’s the one in charge at the moment. I would recommend this over trying to do DMX directly on a Pi or other device. Best of luck.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s