Easy-to-use and simple python receiver for Art-Net (that also implements device polling).
Project description
python_artnet
Easy-to-use and simple python receiver for Art-Net (that also implements device polling).
Installaton
All you need to do is clone the repository and start using it!
$ git clone https://github.com/sciencegey/python_artnet.git
$ cd python_artnet
$ python3 exampleReceiver.py
Usage
All you need to do to start receiving data is import the module, start the listener, then check for received data whenever you want!
import python_artnet as Artnet
# By default it will listen on 0.0.0.0 (all interfaces)
artNet = Artnet.Artnet()
# Fetch the latest packet we received.
artNetPacket = artNet.readPacket()
# And extract the DMX data from that packet.
dmxPacket = artNetPacket.data
# You'll also want to check that there *is* data in the packet;
# if there isn't then it returns None
# See the example for more information
# Close the listener nicely :)
artNet.close()
There are also plenty of arguments you can pass when you start the listner:
- BINDIP - Which IP address you want to listen on (usually a broadcast address). This is the only one you really ever need to change. (Defaults to "" AKA 0.0.0.0 AKA all interfaces)
- PORT - Which UDP port you want to listen on. Shouldn't need to ever change this. (Defaults to 6454)
The following are used for purely management purposes:
- SYSIP - What the IP address of your system is. Purely cosmetic and only used to identify the system to ArtNet controllers. (Defaults to "10.10.10.1")
- MAC - What the MAC address of your system is. Same as above. (Defaults to ["AA","BB","CC","DD","EE","FF"])
- SWVER - What version of Art-Net we're using. In this case, V1.4 (Defaults to "14")
- SHORTNAME and LONGAME - Used to see what devices are what on a controller. (Shortname is truncated to 17 bytes long, longname is truncated to 63)
- OEMCODE - What the Art-Net OEM code your device has. Only needs to be set if you have one. (In hex)
- ESTACODE - What the ESTA Manafacturer Code your device has. Only needs to be set if you have one. (In hex)
- PORTTYPE - Used to tell the controller what type of physical ports your device has. (Defaults to [0x80,0x00,0x00,0x00]) See the Art-Net documentation for more information
- REFRESH - What the refresh rate (in Hz) of your device. (Defaults to 44 (the max for DMX))
- DEBUG - Used to turn on debug output. (Defaults to False)
Further information on how it all works can be found in the Art-Net documentation.
License
This project is licensed under an MIT License (see the LICENSE file).
Project details
Release history Release notifications | RSS feed
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 python_artnet-1.0.0.tar.gz.
File metadata
- Download URL: python_artnet-1.0.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08a5fc0873cbbde60febb37854f3effda4cc6d6fb2051eb6a89c3ece0bed372e
|
|
| MD5 |
721488d48f198c9b7cd7f0b105ba53ee
|
|
| BLAKE2b-256 |
bb7c6b69a96038afe8428c2328d4fbafe13af135acd0c296f05dd867f10efaa6
|
File details
Details for the file python_artnet-1.0.0-py3-none-any.whl.
File metadata
- Download URL: python_artnet-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1be4fc91b79c366eba41099abeb2d02dc4aa24752eed568b6cf5ffdca5150edd
|
|
| MD5 |
405b079712c531fd3f0a9ee3d16a3521
|
|
| BLAKE2b-256 |
293018a6030f81156880a952a9b2695475639718fd99ebf04da20f59176c70b8
|