-
Notifications
You must be signed in to change notification settings - Fork 1
PHP Client working with OLA (for DMX shows)
License
RenZ0/php-show-controller
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PSC - Php-Show-Controller ------------------------- PSC provides an interface to create DMX shows, and play those thanks to OLA. Project Page: http://imaginux.com/lighting/ Licence: GNU General Public Licence 2 (See LICENCE) Requirements ------------ This software requires: - webserver like apache with php/mysql support - python 2.7 (earlier versions may also work) - ola >= 0.8.14 (must be built with --enable-python-libs) Installation ------------ First, you need to set up your webserver, for example on debian/ubuntu : sudo apt-get install apache2 mysql-server php5-mysql phpmyadmin python-mysqldb Create a new database, for example : psc You can use phpmyadmin to do this, or mysql client : mysql -uroot -p create database psc; quit; Import the sql file psc_base.sql.gz into the new database. Again you can use phpmyadmin, or the command line : gzip -d psc_base.sql.gz mysql -uroot -p psc < psc_base.sql According to your webserver access, fill these files : engine/config.py psc/config.php Move the psc folder into the webserver root : sudo cp -r psc/ /var/www/ PSC is ready ! New in 1.1.7 : Groups Import psc_base_nodata.sql.gz into an existing database in order to only add the new tables. About php --------- Usually, you can keep php default settings : register_globals = Off short_open_tag = On Those commands could be usefull (debian/ubuntu) : sudo nano /etc/php5/apache2/php.ini sudo /etc/init.d/apache2 restart With newer PHP versions, short_open_tag setting could require : sudo apt-get install libapache2-mod-php5 sudo a2enmod php5 sudo nano /etc/apache2/apache2.conf <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted <IfModule mod_php5.c> php_value short_open_tag 1 </IfModule> </Directory> sudo service apache2 restart Getting Started --------------- You need to have OLA working : http://www.opendmx.net/index.php/OLA You can get deb packages here : http://www.opendmx.net/index.php/OLA_Debian_/_Ubuntu Start OLA, for example : olad -f (background) or olad -l3 (with log) Configure OLA universes from : http://127.0.0.1:9090 From the engine folder, simply run 'python server.py'. Python will tell you if modules missing, like python-mysqldb. Go to your webserver url (with your web browser), for example : http://127.0.0.1/psc How to use PSC ? ---------------- 0) Set language in Preferences : en = english, fr = french. RGB and CMY checkboxes are for display in scenario creation. Univ. is the number of universes you want to use (set up in OLA). Engine Rate is set into database. 1) Add your fixtures infos in Profiles page : Add each channel, default value and describe its function. You can group some channels if you want, adding a dot between values. RGB and CMY are special and names need to start with 'rgb' and 'cmy'. You can make virtual fixtures using the 'Multi' feature. Take care to not modify your profiles after scenario creation. 2) Set universes and addresses in Fixtures page. 3) Scenarios : add one and click on its name : You will be able to define each step. On the right of channel name, the o letter will display dmx info (defined in your profile). Color changes, included random and gradient are made on 'rgb' channels by default. Save the colors or values you want into the bank (Colors page), click on a color square to do it easily. Use the checkboxes to make partial changes. Try the filter to show channels you want, and make fast changes (with filter, 'ALL' button applies value on every channel seen). On top of columns, click E to edit one step at a time. You can duplicate a step with C (copy) or disable it with X. D,w and R,w letters are used to generate many steps from original step : D : first rgb color moves over rgb channels, going to last one. R : first rgb color recovers rgb channels, until all changed. w is the same but rewind, it uses the last color instead of first one. (these features only work with channels named like rgb1 to rgbX) Use buttons (list, start...) to play the scenario and see the result while you create. Go to Steps page to change hold and fade times. New in 1.1.7 : Groups You have an edit mode for assigning channels to any group you create, set a value on the right helps to easily identify the channels, then use the standard mode to use filter with groups. 4) Play the scenarios you've created from Control page. Control can be done with python too : python test.py start.1 (where 1 is scenario's id) python test.py stop.1 python test.py status.1 python test.py reset.1 python test.py list python test.py stopall python test.py bo python test.py resetall Logging features ---------------- You can choose some logging levels to see server activity (display is done in your server.py terminal). --- Logging can be enabled for each scenario : python test.py log.6 (where 6 is scenario's id) The first time, you see step values. Use the command a second time to see frame counter. Use it again to disable logging. --- Universe frame logging can be toggled with : python test.py ulog The first time, you see frame sending. Use the command a second time to see timestamps. Use it again to disable logging. Frame server ------------ You can also pause the frame server : python test.py halt python test.py resume --- To finish the server task properly : python test.py close Troubleshooting --------------- Sometimes things don't always work as expected. Often it's just a setting, please double check everything. Keep in mind : With php interface you change sql data. Python engine reads sql data, and send it to OLA. OLA use your hardware to send DMX signal. Bugs ---- If you find a bug or want to submit new ideas, please send me an email : [email protected] Copyright --------- PSC is Copyright 2011 by Laurent Pierru <[email protected]>
About
PHP Client working with OLA (for DMX shows)
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published