PODU is an API for the Enttec OPEN DMX USB on Windows that lets your python programm easily controll any DMX device connected to it. It is build in two parts, a server and a client.
The Server is written in C# and connects to the USB interface to control the DMX devices. It is controlled by a python module over a named pipe.
The easiest way to use PODU is to run the DMXServer with the following command:
DMXServer -n PODU
this will start the DMXServer and attach it to a named pipe called 'PODU'.
In Python use DMXClient like in the following example:
from DMXClient import DMXClient
dmxClient = DMXClient("PODU")
dmxClient.connect()
dmxClient.write([16, 255, 17, 125])
dmxClient.write("DMX 18 90 19 40")
dmxClient.write({20:'30', '21': 243})
dmxClient.effect(["MyEffect", 12500, 22, 128])
dmxClient.effect("EFFECT AnotherOne 1500 23 176")
dmxClient.close()
As you can see, there are many different formats you can choose from.
After getting an DMXClient object the following functions can be called:
dmxClient.connect()
This will block until connected to the DMXServer
dmxClient.write(str)
dmxClient.write(list)
dmxClient.write(dict)
These will send a command to the server setting the designated channels to the specified values
As commands to the server are send as a string you may also use the following method to get a tiny performance boost:
dmxClient._write(str)
dmxClient.close()
This will close the connection to the DMXServer
PODU provides you with an easy way to animate your channel values. You can instruct the DMXServer to change the values of as many channels as you want to a specific one over x milliseconds(ms has to be divisible by the DMXServer´s tickspeed which is normally set to 100ms).
dmxClient.effect([name, time, channel, value...])
dmxClient.effect("EFFECT animation 12500 22 128")
Note that all channels used in the effect stay blocked until the whole effect is over. The name must only be specified once.
Usage: DMXServer [OPTIONS]
DMXServer is the part of PODU that interfaces with the OPEN DMX USB.
Options:
-h Show this screen.
-n Name of named pipe (must be same as used by DMXClient).
-v Show verbose output.
-s Wait for another connection after a DMXClient disconnects.
You may also look into the wiki hosted on GitHub
pywin32 to enable communication between c# and python
Win D2XX Drivers downloaded directly from Enttec's website
In order to use PODU you need the DMXClient(Python) and the DMXServer(C#), both of which can be downloaded on the release tab.
You can also compile the DMXServer from source, it is located under 'C#/DMXServer.cs'.
GNU General Public License v3.0