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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libaxion_dmx-1.0.0.tar.gz.
File metadata
- Download URL: libaxion_dmx-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6473923f30a40bfbc0b34d5b5eec202e4be9c447bbe1b11713e1ae5f6c728d39
|
|
| MD5 |
bf4979468712c2244385114c80630622
|
|
| BLAKE2b-256 |
150f5b23ecef03c39e8f9a13f077d667b186fe87b1f8a34ae2a8aaa05b73478a
|
File details
Details for the file libaxion_dmx-1.0.0-py3-none-any.whl.
File metadata
- Download URL: libaxion_dmx-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9bcd377bd93f752b95cb53b0ffda5d189240a51d285c7cc1ddbd724847c0a19
|
|
| MD5 |
0d179ed8136a4e165dc278b1c2edbeec
|
|
| BLAKE2b-256 |
67e75532f9a55131b106fb2449de6acd17c73a073d776e4a4a166913eb20623e
|