dmx/README.md

95 lines
2.0 KiB
Markdown
Raw Normal View History

2024-08-07 11:57:25 +00:00
Play LED light sequences from csv. Control LED lights using PyDMXControl
2024-08-07 12:55:40 +00:00
Install:
2024-08-07 11:57:25 +00:00
https://github.com/MattIPv4/PyDMXControl/tree/master
Calc fields / Variables:
2024-08-07 12:55:40 +00:00
- seq -> "sequence" = position (seconds) on 'timeline' starting 0
- fadein / fadeout (milliseconds) [optional/default]
- duration (seconds)
- brightness -> 0-255 (optional, else default) [optional/default]
2024-08-07 13:08:55 +00:00
- "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..()
2024-08-07 11:57:25 +00:00
2024-08-07 13:08:55 +00:00
Map channels (play one at a time, wait for input):
2024-08-07 12:55:40 +00:00
```
$ python3 mapchannels.py
```
2024-08-07 11:57:25 +00:00
2024-08-07 13:08:55 +00:00
run sequence:
2024-08-07 12:55:40 +00:00
```
$ python3 sequence.py
```
2024-08-07 11:57:25 +00:00
2024-08-07 13:08:55 +00:00
run sequence from START cell (not from t=0):
2024-08-07 12:55:40 +00:00
```
$ python3 zztest_sequence.py
```
2024-08-07 11:57:25 +00:00
2024-08-07 13:08:55 +00:00
debug (play single channel only and exit):
2024-08-07 12:55:40 +00:00
```
$ python3 playsingle.py <channel/name>
```
2024-08-07 11:57:25 +00:00
_____
*** EDIT ("seq", "duration", optional "brightness") and play sequence:
- edit local or online calc/csv
2024-08-07 12:55:40 +00:00
- get csv -> sequence.json
```
$ python3 getspread.py
```
2024-08-07 11:57:25 +00:00
2024-08-07 13:08:55 +00:00
- restart service or run script
2024-08-07 11:57:25 +00:00
_____
2024-08-07 13:08:55 +00:00
check script output in terminal:
2024-08-07 12:55:40 +00:00
```
2024-08-07 11:57:25 +00:00
$ tmux a -t light
2024-08-07 12:55:40 +00:00
```
2024-08-07 11:57:25 +00:00
---
2024-08-07 12:55:40 +00:00
lights.service runs sequence.py in a tmux session called "light"
(Run outside tmux)
[ start/stop/restart service now ]
```
2024-08-07 11:57:25 +00:00
sudo systemctl <start/stop/restart> lights.service
2024-08-07 12:55:40 +00:00
```
2024-08-07 11:57:25 +00:00
2024-08-07 12:55:40 +00:00
enable/disable service on boot
```
2024-08-07 11:57:25 +00:00
sudo systemctl <enable/disable> lights.service
2024-08-07 12:55:40 +00:00
```
2024-08-07 11:57:25 +00:00
2024-08-07 12:55:40 +00:00
check status
```
2024-08-07 11:57:25 +00:00
systemctl status lights.service
2024-08-07 12:55:40 +00:00
```
2024-08-07 11:57:25 +00:00
---
*dev* service script:
2024-08-07 12:55:40 +00:00
xetc_systemd_system -> lights.service
2024-08-07 11:57:25 +00:00
edit here if required, and copy to /etc/systemd/system
-------
2024-08-07 12:55:40 +00:00
DMX512 decoder 24channel color - Dip Switch positions = start channel no. ... (for daisy chain)
2024-08-07 11:57:25 +00:00
(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
____