Skip to main content

OpenDMXAdapter

OpenDMXAdapter is an easy-to-use library to work with an OpenDMX controller. Initially this library has been designed around the OpenDMX Adapter from Enttec.

Installing

This project has not been published on pypi yet and thus can only be used by cloning the git repository into your project.
You may need to install a different driver for your adapter (since the Enttec OpenDMX driver only works with their dll file and not with serial). Take a look at this tutorial from adafruit on how to install the correct driver (libusk).

Example Usage

from opendmxadapter.adapter import OpenDMXAdapter
from opendmxadapter.fixtures.cameo.rootpar6 import RootPar6

controller = OpenDMXAdapter("ftdi://ftdi:232:BG00DND8/1")
controller.start()
controller.blackout()

# Either manually set channel values
controller.set_channel(10, 255)

# Or add a custom fixture
light = RootPar6(0)
controller.add_fixture(light)

light.set_amber(255)
light.set_intensity(100)

controller.close()

For more examples, take look into the examples directory.

How does it work?

The main logic lies in adapter.py which is fairly simple and easy to understand. It talks via pyftdi serialtext to the controller itself and sends the data in a separate thread in a 40 Hz interval.

Writing a custom fixture

Generally, taking a look at the different fixtures available such as the cameo root par 6 is a good idea to get a basic understanding of how they work.
Most of the methods are defined in the BaseFixture class. Your fixture class should extend from this.
If you need any further abstraction of functionality, such as color, moving head or strobo, you can additionally extend from either ColorFixture, StroboFixture or the different classes available in basefixture.py. You may need to call special initialisation methods prefixed with an underscore to set the relative channels for different operations. See the example below.

from fixtures.basefixture import BaseFixture, ColorFixture


class CustomFixture(BaseFixture, ColorFixture):
    def __init__(self, channelCount: int, rawChannel: int | None = None):
        super().__init__(channelCount, rawChannel)
        # R, G, B, Intensity
        self._initializeColorChannels(0, 1, 2, 3)

    def mySuperCustomMethod(self):
        # Method provided by BaseFixture
        self.setValue(10, 255)
        self.adapter.blackout()  # You can also access the adapter
        
        # Method provided by ColorFixture
        self.setRgb(255, 0, 0)
        self.setIntensity(100)

Showcase

This is a video I took controlling the Eurolite TMH-X4 Shower Moving Head with my Dualshock Controller

Showcase

Help

If you're stuck in any way, have any questions or problem with the driver, feel free to ask me. I went through a lot of work to get a driver running after abandoning the driver from the Enttec Adapter. Open an issue or drop me a Twitter DM.

Metadata

Release files for opendmxadapter 1.0.2.post1

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

Source distribution (sdist)

Source distribution for opendmxadapter 1.0.2.post1
File Size Uploaded
opendmxadapter-1.0.2.post1.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opendmxadapter 1.0.2.post1
File Interpreter ABI Platform
opendmxadapter-1.0.2.post1-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / opendmxadapter-1.0.2.post1.tar.gz

Download URL opendmxadapter-1.0.2.post1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d32c140d46488bd1473f71f7d16b3dabaab0c435e1c23ea05ca8435d4882d92
BLAKE2b-256 checksum
How to use checksums
28394bddeabb5730890c533f12a7ef25a5f114a12d0592350adb9e68484e5851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / opendmxadapter-1.0.2.post1-py3-none-any.whl

Download URL opendmxadapter-1.0.2.post1-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
467bc74d294b7f0edaf64b2102db72fa2d8b2f6d149ba338339fdf54d7fcab4a
BLAKE2b-256 checksum
How to use checksums
6a15683be2c9a71a4336c2a6bef0407a70c4774f22d8eb06b5724301f286ce87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.2.post1 This release

2 release files

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