Skip to main content

Python control of the Enttec DMX USB Pro

Project description

DMXEnttecPro

Control the Enttec DMX USB Pro with Python3

Installation

This package solely depends on pyserial. You can install a recent release on PyPI:

pip install DMXEnttecPro

or by getting the repository from GitHub and doing something along the lines of:

git clone git@github.com:SavinaRoja/DMXEnttecPro.git
cd DMXEnttecPro
pip install .

Getting Started

If you don't know the serial address of the DMX controller yet, you can do the following to identify it:

python -m DMXEnttecPro.utils

which will give you some detailed information on all COM ports like this.

Once you know your serial address, setting up a connection to your Enttec DMX USB Pro is simple:

from DMXEnttecPro import Controller
#dmx = Controller('COM4')  # Typical of Windows
dmx = Controller('/dev/ttyUSB0')  # Typical of Linux

Then you can set channel values easily with:

dmx.set_channel(1, 255)  # Sets DMX channel 1 to max 255
dmx.submit()  # Sends the update to the controller

DMX Channels are 1-indexed, and DMXEnttecPro maintains that convention for you.

Additional Features

There are three main additional features that this package offers: auto-submission of changes, configurable size of DMX universe, and dynamic submission.

Auto-submission

You may supply auto_submit=True to instantiation of Controller to tell it to automatically submit changes on any action changing channel values:

dmx = Controller('/dev/ttyUSB0', auto_submit=True)

The argument submit_after=<bool> can be provided to any action changing channel values and it will take precedence over the configured auto_submit value of the Controller.

DMX Size Configuration

The size of the DMX universe defaults to 512 channels. There are apparently occasions where finer timescales can be achieved in DMX by constraining this. dmx_size=<int> may be supplied to instantiation of Controller.

dmx = Controller('/dev/ttyUSB0', dmx_size=256)  # use only 256 channels

Dynamic Submission

The Controller can determine the fewest number of channels it must send to the DMX controller to update and possibly give finer timescales. Supply dynamic_submission=True to instantiation of Controller to enable this.

dmx = Controller('/dev/ttyUSB0', dynamic_submission=True)

If it determines that there are no channels to update, it will omit sending any message to the DMX controller.

Acknowledgments

DMXEnttecPro evolved from my re-write of pysimpledmx for compatibility with Python3.

pyenttec is another good package that seems to have also implemented some configuration of the Enttec DMX USB Pro that I have not (at present) implemented.

Developing

So far I have only utilized features with which I am personally familiar and have wanted. Please submit any issues or feature requests along with usage needs and I would be happy to evaluate them.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DMXEnttecPro-0.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page