Giter VIP home page Giter VIP logo

pyopendmxusb's Introduction

PyOpenDmxUsb

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.

Getting Started

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.

Usage

After getting an DMXClient object the following functions can be called:

Connect to server

dmxClient.connect()

This will block until connected to the DMXServer

Set DMX values

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

Faster method

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)

Close connection to the server

dmxClient.close()

This will close the connection to the DMXServer

Effects/Animations

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.

DMXServer Usage


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.

Wiki

You may also look into the wiki hosted on GitHub

Installation

Prerequisites

pywin32 to enable communication between c# and python

Win D2XX Drivers downloaded directly from Enttec's website

Binarys

In order to use PODU you need the DMXClient(Python) and the DMXServer(C#), both of which can be downloaded on the release tab.

Sources

You can also compile the DMXServer from source, it is located under 'C#/DMXServer.cs'.

License

GNU General Public License v3.0

pyopendmxusb's People

Contributors

coronon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.