richardkrikler / RaspberryPi_DMX-Light

Web-Interface for a DMX studio light driven by a RaspberryPi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RaspberryPi_DMX-Light

Web-Interface for a DMX studio light driven by a RaspberryPi

The DMX-light is controlled by the Open Lighting Architecture (OLA). For the Web-Interface I am using the jquery-wheelcolorpicker from fujaru. With that you can controll the brightness of the light. You can also create and save presets for later use.

Desktop Mobile

Components

Setup

The setup for the DMX-light is pretty simple, because you only have to connect the USB plug of the adapter with the Raspberry-Pi and the DMX-cable with the lamp.

Configuration / Installation

As an operating system I have used Raspbian. You should also configure a static IP-Adress from you router for your Raspberry-Pi.

Installing the Open Lighting Architecture (OLA):

sudo apt-get install ola

Autostart of OLA

Open the file "rc.local":

sudo nano /etc/rc.local

And add the following line at the end of the file before "exit":

su pi -c olad

Embedding the FTDI-adapter

Because I am using an FTDI-adapter I will have to add a rule inside of the file "10-local-rpi.rules".

cd /lib/udev/rules.d
sudo nano 10-local-rpi.rules

The rule that has to be added at the end of the file:

# udev rules for ftdi devices
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="plugdev"

After that you have to reboot the system (sudo reboot).

Configuring OLA plugins

You can configure the OLA plugins with the OLA-Web-Interface at the port :9090 (e.g.: 192.168.0.128:9090). Once you are on the website you will have to go to the new UI (at the bottom of the site "New UI (Beta)"). Then turn on the "FTDI USB DMX" plugin and turn off the "Serial USB" and the "Enttec Open DMX" plugin.

Universe

Now you will have to setup a "universe", to control the lamp. This can be done via the old UI Web-Interface. The command "ola_dev_info" can also show all connected devices.

Tests

Now you can enter the universe via the Web-Interface and go to the DMX-Console. There you can manually adjust all the available channels.

Or in the SSH console (e.g.: brightness(128), red(255), green(255), blue(200)):

ola_streaming_client  --universe 1  --dmx 128,255,255,200

If this test was successful, it should also be possible send a curl request via CMD (Windows).

curl -d u=1 -d d=255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0 "http://192.168.0.128:9090/set_dmx"

My Web-Interface

SQLite3 PHP Driver:

sudo apt-get install php8.1-sqlite
sudo /etc/init.d/apache2 restart

Clone repository into the folder /var/www/html.

sudo git clone https://github.com/RichardKrikler/RaspberryPi_DMX-Light

Create presets database.

sudo cat db.sql | sudo sqlite3 presets/raspi-dmx.db

Permissions for the database to not be read-only (global read & write; database file and the folder it resides in).

sudo chmod 777 /var/www/html/presets
sudo chmod 777 /var/www/html/presets/raspi-dmx.db

That's it. Now you can easily get to the Interface via the IP-address.

About

Web-Interface for a DMX studio light driven by a RaspberryPi

License:BSD 2-Clause "Simplified" License


Languages

Language:JavaScript 42.8%Language:CSS 25.7%Language:PHP 21.0%Language:HTML 10.6%