The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

OLA Patch persistency

From wiki.openlighting.org
Jump to: navigation, search

Patch Persistency

The patch persistency information is stored in plain text files inside your configuration folder (~/.ola by default, or/var/lib/ola/conf if you're using the Raspberry Pi image.)

The "universe" information is stored inside "ola-universe.conf"

The "patch" information is stored inside "ola-port.conf"

To start with something clean we can delete the "ola-universe.conf" and "ola-port.conf" files and ola will create them again when stopping ola.

Note : olad only writes it's patch files when it exists. That means that is the computer is crashing or if ola is crashing, the patch is not stored in files (see Issue 125 ).

Example

We are going to patch an ArtNet universe as an input with a DmxKing ultraDMX Micro as an output.

On this example, I have enabled only the plugins :

  • ArtNet

and

  • Serial USB

setting all the plugins in the config folder with

   enabled = false

except the 2 ones needed witch i have enabled using

   enabled = true

Starting ola

We are starting olad using either the command

   /etc/init.d/olad start

or

   olad -l 3

-l 3 : means that we are starting olad with the login level 3

Getting devices info

To get the devices info we are using the command

   ola_device_info

That is returning :

   Device 1: ArtNet [10.0.0.2]
     port 0, IN , priority 100, RDM supported
     port 1, IN , priority 100, RDM supported
     port 2, IN , priority 100, RDM supported
     port 3, IN , priority 100, RDM supported
     port 0, OUT , RDM supported
     port 1, OUT , RDM supported
     port 2, OUT , RDM supported
     port 3, OUT , RDM supported
   Device 2: DMXking.com - ultraDMX Micro
     port 0, IN Serial #: 84000775, priority 100
     port 0, OUT Serial #: 84000775, RDM supported

Patching the devices

First we are patching the ArtNet device using

   ola_patch -d 1 -i -p 0 -u 0

That means : patch device 1 (-d 1) input (-i) port 0 (-p 0) to the universe 0 (-u 0) (ola is using the output port as the default one, this is why we need to tell it to use the input using -i.

Then we are patching the ultraDMX micro using

   ola_patch -d 2 -p 0 -u 0

Now the device info is returning

   Device 1: ArtNet [10.0.0.2]
     port 0, IN ArtNet Universe 0:0:0, priority 100, patched to universe 0, RDM supported
     port 1, IN , priority 100, RDM supported
     port 2, IN , priority 100, RDM supported
     port 3, IN , priority 100, RDM supported
     port 0, OUT , RDM supported
     port 1, OUT , RDM supported
     port 2, OUT , RDM supported
     port 3, OUT , RDM supported
   Device 2: DMXking.com - ultraDMX Micro
     port 0, IN Serial #: 84000775, priority 100
     port 0, OUT Serial #: 84000775, patched to universe 0, RDM supported

Resulted files

After stopping ola (using "/etc/init.d/olad stop" or "ctrl+c" (if running it directly on the command line))

The ola-port.conf and ola-universe.conf are filled with the infos.

ola-universe.conf

Here is the content of this file

   uni_0_merge = LTP
   uni_0_name = Universe 0

LTP priority is set by default.

A default name "Universe 0" was given to the universe 0.

ola-port.conf

Here is the content of this file

   2-1-I-0 = 0
   2-1-I-0_priority_value = 100
   2-1-I-1_priority_value = 100
   2-1-I-2_priority_value = 100
   2-1-I-3_priority_value = 100
   5-84000775-I-0_priority_value = 100
   5-84000775-O-0 = 0

What does it mean ?

First we need to know about the plugins ids.

To get the plugins infos, we are using

   ola_plugin_info

That is returning

      Id   Plugin Name
   --------------------------------------
       1   Dummy
       2   ArtNet
       3   ShowNet
       4   ESP Net
       5   Serial USB
       6   Enttec Open DMX
       7   SandNet
       8   StageProfi
       9   Pathport
      11   E1.31 (sACN)
      12   USB
      13   FTDI USB DMX
      14   OSC
   --------------------------------------

In this example, we are only using the ArtNet plugin and the Serial USB plugins.

We can see that the ArtNet has the id 2 and the Serial USB has the id 5.

The ola-port.conf file is storing the info as

   <plugin-id>-<device-id>-<port-id>

We can translate the first line as :

The plugin 2, device 1 and input port 0 is patched to the universe 0.

The second line is defining the priority level.

Then we can see that other ports are not patched.

And then on the sixth line, we can translate it as :

The plugin 5, device 84000775 (remember ola_device_info values) Input port 0 is not patched.

And on the 7th line we can see translate it as :

The plugin 5, device 84000775 Output port 0 is patched to universe 0.