dmx-priest: DMX player and recorder for lighting equipment

Situation



I volunteer for a small organization, we throw parties, concerts, etc.



We have an expensive light control console (Avolites Titan Quartz). We only use it for big shows and manual control. The console connects to a LAN2DMX device (dmXLAN Buddy) which converts the Art-Net protocol into a signal that DMX devices can understand.



We needed a device that could record the program from the main console, and then play this preset endlessly. It should be easy to use without the need to get and look after expensive and complex equipment.



Decision



Iron



  • Raspberry Pi. Any version will do, probably. I used the existing second
  • LCD screen. I used 16x2 with I2C shield already attached
  • Rotary Encoder. Something that can be twisted and tapped as a means of input. I bought a ready-made one, with all the resistors.
  • Jumpers. Or just wires, if tightly soldered to the RPi comb
  • Small things: case, usb micro cable, power button


Connect



Display :



  • GND to Pin 6 (Ground)
  • VCC to Pin 4 (5V power)
  • SDA to Pin 3 (GPIO 2)
  • SLC on Pin 5 (GPIO 3)


Spinner :



  • CLK to Pin 12 (GPIO 18)
  • DT to Pin 13 (GPIO 27)
  • SW to Pin 11 (GPIO 17)
  • + to Pin 1 (3V3 power)
  • GND to Pin 14 (Ground)


Power supply :

I just broke the micro USB cable, soldered the button. I brought out a round power connector, which is easier to use.



Software



Axis



We take a standard Raspberry Pi OS (32-bit) Lite and install it on SD using Etcher.



Add the "ssh" file to / boot to enable SSH, as you don't want to connect a monitor and keyboard.



SSH to RPi:



youruser@homepc:~ $ ssh pi@[Pi-IP-address]


We update for everyone:



pi@raspberrypi:~ $ sudo apt-get update
pi@raspberrypi:~ $ sudo apt-get dist-upgrade


Open Lightning Architecture

Install packages for building the heart of our device - Open Lightning Architecture.



pi@raspberrypi:~ $ sudo apt-get install git autoconf libtool bison flex uuid-dev libcppunit-dev python-protobuf python-numpy protobuf-compiler  libmicrohttpd-dev libprotoc-dev i2c-tools python3-smbus python3-gpiozero python3-pip3
pi@raspberrypi:~ $ git clone https://github.com/OpenLightingProject/ola.git
pi@raspberrypi:~ $ cd ola


compile and install. it's too lazy to collect packages, and I hope that after the end of the project, no one will ever look inside. will take a lot of time. on RPi 2 and a slowed-down SD card, I left it overnight.



pi@raspberrypi:~/ola $ autoreconf -i
pi@raspberrypi:~/ola $ ./configure --enable-rdm-tests
pi@raspberrypi:~/ola $ make
pi@raspberrypi:~/ola $ sudo make install


We load or check the performance:



pi@raspberrypi:~/ola $ sudo ldconfig
pi@raspberrypi:~/ola $ olad -l 3


go to http: // [Pi-IP-address]: 9090 / ola.html and see that everything opens. in fact, we don't need a web server, you can shaman it in the config file and build it without it.



create a service for systemd



pi@raspberrypi:~ $ sudo nano /etc/systemd/system/olad.service
[Unit]
Description=OLA daemon
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=pi
ExecStart=olad

[Install]
WantedBy=multi-user.target


and put it into startup



pi@raspberrypi:~ $ sudo systemctl start olad
pi@raspberrypi:~ $ sudo systemctl enable olad


I2C

you need to enable I2C to interact with the display



pi@raspberrypi:~ $ sudo raspi-config


Inside "Interfacing Options"> "I2C"> "enable" and then reboot.

We look at the display address on the I2C bus, we will need it



pi@raspberrypi:~/dmx-priest $ sudo i2cdetect -y 1


Mine was 3f, it will need to be registered in RPi_I2C_driver.py. In theory, it would be better to read the system variable from the program, but I was too lazy to finish it after everything worked.



Static IP



Some consoles are good at broadcasting, some need to be registered manually, so let's make a static IP address that is understandable and accessible to all dmx devices.



pi@raspberrypi:~ $ sudo nano /etc/dhcpcd.conf
# Example static IP configuration:
interface eth0
static ip_address=2.150.43.69/24
static routers=2.124.1.1
static domain_name_servers=2.124.1.1


dmx-priest



Self-written program for working with the display, twist and ola. Python I don't know, PR is welcome.



Pulls ola_patch to tune in to input (for writing from the console) or output (to work on its own). Uses ola_recorder for recording and playback.



Install:



pi@raspberrypi:~ $ sudo pip3 install git+https://github.com/Virusmater/dmx-priest


Add to startup:



pi@raspberrypi:~ $ nano /etc/systemd/system/dmx-priest.service 
[Unit]
Description=dmx-priest
Requires=olad.service
After=network.target olad.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=pi
ExecStart=dmx-priest

[Install]
WantedBy=multi-user.target

pi@raspberrypi:~ $ sudo systemctl start dmx-priest
pi@raspberrypi:~ $ sudo systemctl enable dmx-priest


Yuzai



image



  • Twist right 20 times to find the recording mode. 20 times so that users do not accidentally write anything. Display: "Record mode - push the knob".
  • Push: "Ready to record - push to start"
  • Preparing the main console for playback. We insist on the light in the right way
  • Click to start recording: "Rec in progress - push to stop"
  • We are waiting for a while, depending on the program on the main console.
  • Click to stop recording. We are returned back to the menu: "Play mode - push the knob"
  • Click to enter the playback menu. The newly recorded preset will be in the format YYYY.mm.dd HH: MM
  • Click on the preset or click on 99_blackout to exit and turn off all the lights


Source codes



https://github.com/Virusmater/dmx-priest



All Articles