Skip to main content

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:

COM4
  name: None
  description: USB Serial Port (COM4)
  hwid: USB VID:PID=0403:6001 SER=EN055555A
  vid: 1027
  pid: 24577
  serial_number: EN055555A
  location: None
  manufacturer: FTDI
  product: None
  interface: None

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 (DMX Channels are 1-indexed, and Controller maintains that convention for you.) with:

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

In some environments where you may not be assured of the precise string of your COM port, I recommend using a uniquely identifying mark like the serial number or product ID. Some helpers exist in DMXEnttecPro.utils:

from DMXEnttecPro import Controller
from DMXEnttecPro.utils import get_port_by_serial_number, get_port_by_product_id
my_port = get_port_by_serial_number('EN055555A')
my_port = get_port_by_product_id(24577)
dmx = Controller(my_port)

Additional Features

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

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

Acknowledgments

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

pyenttec is another good package.

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.

Metadata

Release files for DMXEnttecPro 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DMXEnttecPro 0.4
File Size Uploaded
DMXEnttecPro-0.4.tar.gz 5.9 kB Details

Release files / DMXEnttecPro-0.4.tar.gz

Download URL DMXEnttecPro-0.4.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6ee7659d9e96fe427f31808f4527ba45a2e28a8d5a44a20cdc767166fb7eafe7
BLAKE2b-256 checksum
How to use checksums
78492ec902d63aeb014a674fb048da556139064f6314eb38ce96ae3d95132209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.4 This release

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page