Skip to main content

lr-dmx-tester

Python CLI and API for communicating with DMX tester firmware over the RPC serial interface.

Install

Install from PyPI:

python -m pip install lr-dmx-tester

Or install from this repository:

python -m venv .venv
source .venv/bin/activate
python -m pip install -e .

CLI usage

The package provides the dmx_tester command:

dmx_tester --help

The first argument is a serial target, either:

  • A tty path, for example /dev/ttyACM1
  • A board serial number, for example 1050266122

Examples:

dmx_tester /dev/ttyACM1 send --data-val 0x55 --data-len 24
dmx_tester 1050266122 send-baud 250000 --data-val 0x12 --data-len 24
dmx_tester 1050266122 send-many 100 --data-val 0x7f --data-len 24
dmx_tester 1050266122 receive
dmx_tester 1050266122 latency --data-len 128 --n-reports 3
dmx_tester 1050266122 reset

Common options:

  • --timeout: Per-line serial timeout in seconds
  • --log-level: DEBUG, INFO, WARNING, or ERROR
  • --no-reset-before: Skip reset before the selected command
  • --no-reset-after: Skip reset after the selected command

The CLI prints JSON output to stdout.

Python API

Primary classes:

  • RpcClient: Low-level RPC transport and request/response handling
  • DmxCommands: High-level DMX command wrappers

Example:

from dmx_tester.rpc_client import RpcClient
from dmx_tester.cmd_dmx import DmxCommands

client = RpcClient("/dev/ttyACM1", timeout=10.0)
client.open()

try:
    commands = DmxCommands(client)
    commands.cmd_reset_wait_for_restart(timeout=2.0, retries=3)
    commands.cmd_dmx_send(
        break_time=92.0,
        mark_time=12.0,
        data_val=0x55,
        data_len=24,
    )
finally:
    client.rpc_stop()

Latency reports API example:

from dmx_tester.rpc_client import RpcClient
from dmx_tester.cmd_dmx import DmxCommands

client = RpcClient("1050266122", timeout=10.0)
client.open()

try:
    commands = DmxCommands(client)
    reports = commands.cmd_dmx_latency(data_len=128, n_reports=3)
    for report in reports:
        print(report)
finally:
    client.rpc_stop()

Notes

  • Data length is validated to DMX limits.
  • Data value must be in range 0x00..0xFF.
  • Some commands reset the board by design.

License

This package is licensed under the MIT License. See LICENSE.

Metadata

Release files for lr-dmx-tester 0.1.0

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

Source distribution (sdist)

Source distribution for lr-dmx-tester 0.1.0
File Size Uploaded
lr_dmx_tester-0.1.0.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lr-dmx-tester 0.1.0
File Interpreter ABI Platform
lr_dmx_tester-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / lr_dmx_tester-0.1.0.tar.gz

Download URL lr_dmx_tester-0.1.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
da38fb401eb51d75f685bb499efbeaaaaa984dab5cac468cdd1551f77eca0c7e
BLAKE2b-256 checksum
How to use checksums
7c361c71d4c385439f6718ee10a87195d313b5df0ce8c48c78821e8c2c91707e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / lr_dmx_tester-0.1.0-py3-none-any.whl

Download URL lr_dmx_tester-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa51501453dc5777ee1090f1732ddc1ddbfef00a14c6d6a2744ab003ac172594
BLAKE2b-256 checksum
How to use checksums
f6dfa14f955254f62e8cc7f3ac77eccef01429bba99fb89611e963b6b722665a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

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