Skip to main content

A Python API for controlling Axion Lighting DMX controllers

Project description

Axion DMX API

Axion DMX API is a Python library to interact with the Axion Lighting DMX Controller. This package allows you to control various types of DMX lighting channels, including RGB, RGBW, and RGBWW.

Installation

Install the package via pip:

pip install libaxion_dmx

Usage

Initialize the API

To use the API, create an instance of the AxionDmxApi class with the IP address of your DMX controller and the password.

from libaxion_dmx import AxionDmxApi

api = AxionDmxApi(host="192.168.1.2", password="your_password")

Authenticate

Authenticate with the controller:

authenticated = await api.authenticate()
if authenticated:
    print("Successfully authenticated with the controller.")

Set Channel Level

Set the level of a specific channel:

await api.set_level(channel=1, level=255)

Get Channel Level

Get the current level of a specific channel:

level = await api.get_level(channel=1)
print(f"Channel 1 level: {level}")

Set Color (RGB)

Set the RGB color of a specific channel:

await api.set_color(channel=1, rgb=(255, 0, 0))  # Set to Red

Set RGBW Color

Set the RGBW color of a specific channel:

await api.set_rgbw(channel=1, rgbw=(255, 0, 0, 255))  # Set to Red with White

Set RGBWW Color

Set the RGBWW color of a specific channel:

await api.set_rgbww(channel=1, rgbww=(255, 0, 0, 255, 128))  # Set to Red with Warm White

Testing

To run the tests for this package, use pytest.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

libaxion_dmx-1.0.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libaxion_dmx-1.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file libaxion_dmx-1.0.3.tar.gz.

File metadata

  • Download URL: libaxion_dmx-1.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for libaxion_dmx-1.0.3.tar.gz
Algorithm Hash digest
SHA256 07a2d08539325f2ec08571c58ac37928af426ac558e1e1997586b933efcc150a
MD5 4e0fb18da970f5bcb288c34eca0e2ddf
BLAKE2b-256 124a82c1d7532f35c2d1388d9b57e05f6bb2b9fe6a23d5bbdafde03c96d4b48b

See more details on using hashes here.

File details

Details for the file libaxion_dmx-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: libaxion_dmx-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for libaxion_dmx-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 87798893f28a9941347aeaf8575b7a9ffa1f742c5395a26da8fe34aaa85b14f9
MD5 77fa9cc6ee7654345dd8a68b109abb76
BLAKE2b-256 f0f88b4fdc32b0f847c0e8d0db8ada80a81eca5923487763b3761bb184292597

See more details on using hashes here.

Supported by

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