dmx/README.md
2024-08-07 18:38:55 +05:30

2.0 KiB

Play LED light sequences from csv. Control LED lights using PyDMXControl

Install: https://github.com/MattIPv4/PyDMXControl/tree/master

Calc fields / Variables:

  • seq -> "sequence" = position (seconds) on 'timeline' starting 0
  • fadein / fadeout (milliseconds) [optional/default]
  • duration (seconds)
  • brightness -> 0-255 (optional, else default) [optional/default]
  • "channel" --> LED/channel identifier, order as connected to DMX decoder
    (channel = name | opendmxcontroller calls fixtures "by_name")

channels are sequential and fixed
blank channels also must be added to dmx..()

Map channels (play one at a time, wait for input):

 $ python3 mapchannels.py

run sequence:

 $ python3 sequence.py

run sequence from START cell (not from t=0):

 $ python3 zztest_sequence.py

debug (play single channel only and exit):

 $ python3 playsingle.py <channel/name>

*** EDIT ("seq", "duration", optional "brightness") and play sequence:

  • edit local or online calc/csv
  • get csv -> sequence.json
 $ python3 getspread.py  
  • restart service or run script

check script output in terminal:

$ tmux a -t light 

lights.service runs sequence.py in a tmux session called "light"
(Run outside tmux)
[ start/stop/restart service now ]

sudo systemctl <start/stop/restart> lights.service

enable/disable service on boot

sudo systemctl <enable/disable> lights.service

check status

systemctl status lights.service  

dev service script:

xetc_systemd_system -> lights.service
edit here if required, and copy to /etc/systemd/system


DMX512 decoder 24channel color - Dip Switch positions = start channel no. ... (for daisy chain)

(dip switch positions) ( <-- binary. ** Right to Left for dipsw positions)

  • board#1: 1-24 | all 'off' (0) | 0
  • board#2: 25-48 | 1,4,5 - ON (1) | 11001
  • board#3: 49-72 | 1,5,6 - ON | 110001
  • board#4: 73-...| 1,4,7 - ON | 1001001