DMX-512 python serial client
Per limitation of pySerial this utility helps with properly setting the serial port on POSIX/LINUX and detecting SYNC/BREAK within the stream of data
Usage
from roh.dmx.client.dmx_client import DmxClient
from roh.dmx.client.dmx_client_callback import DmxClientCallback
from typing import Dict
# define callback, you can override even just one method, for example data_received
class MyDmxCallback(DmxClientCallback):
"""
Example implementation of all available callback methods
"""
def sync_lost(self) -> None:
print("SYNC LOST")
def sync_found(self) -> None:
print("SYNC FOUND")
def data_received(self, monitored_data: Dict[int, int]) -> None:
print("VALID MONITORED DATA: %s" % monitored_data)
def full_data_received(self, data: bytes) -> None:
pass
# use client with /dev/ttyUSB0 port and monitor dmx address no. 1 for values
c: DmxClient = DmxClient('/dev/ttyUSB0', [1], MyDmxCallback())
c.run()
References
- https://github.com/pyserial/pyserial/issues/539 - Issue about pySerial limitation when consuming DMX-512
- Using a Raspberry Pi as a PC-DMX interface (Florian Edelmann) - PDF
- https://man7.org/linux/man-pages/man3/termios.3.html - documentation of PARMRK, IGNBRK and BRKINT settings of virtual terminal
Release files for dmx512-client 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dmx512-client-0.4.tar.gz | 8.7 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dmx512_client-0.4-py3.9.egg | Legacy Egg format | - | - | Details |
| dmx512_client-0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.6 kB
Release files / dmx512-client-0.4.tar.gz
| Download URL | dmx512-client-0.4.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f59efe00f4bd6c986324ac7634d65940346fc5bcce053a33f3906ba73c58fb22
|
|
BLAKE2b-256 checksum How to use checksums |
54ac886a045fd588256596f22a0d7ab48533ef4b98bbb49c9f9e2a182b09ed98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|
Release files / dmx512_client-0.4-py3.9.egg
| Download URL | dmx512_client-0.4-py3.9.egg |
|---|---|
| Size | 4.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
993c4f63d4003242be61332fb3a9fe5505e393f5ca47c8208905bf5385301ada
|
|
BLAKE2b-256 checksum How to use checksums |
b337fec9e3e54fbd38017fe2836034c523534c98b3195a2542b0780b1a03edb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|
Release files / dmx512_client-0.4-py3-none-any.whl
| Download URL | dmx512_client-0.4-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78426feaec8786623ee046ce4e3ae5b7a07371365b0c6069d1a295064d198855
|
|
BLAKE2b-256 checksum How to use checksums |
4ea90162438b8a35555ac3e1c0e7738e7c6f4c0ea86dbabbb0481659837fa017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|