initial commit
This commit is contained in:
commit
c8630735c4
9 changed files with 478 additions and 0 deletions
0
lights/__init__.py
Normal file
0
lights/__init__.py
Normal file
23
lights/common.py
Normal file
23
lights/common.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
import logging
|
||||
|
||||
LOG = logging.getLogger('DMX')
|
||||
|
||||
class BaseDMXLight:
|
||||
def __init__(self, address):
|
||||
self.address = address
|
||||
self.intensity = 0
|
||||
self.red = 0
|
||||
self.green = 0
|
||||
self.blue = 0
|
||||
self.white = 0
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.name} ({self.address})'
|
||||
|
||||
def _dump(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def dump(self):
|
||||
ret = self._dump()
|
||||
LOG.info(f'{str(self)} -> {ret[1]}')
|
||||
return ret
|
14
lights/ignition_wal_l710.py
Normal file
14
lights/ignition_wal_l710.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from .common import BaseDMXLight
|
||||
|
||||
class IgnitionWALL710(BaseDMXLight):
|
||||
name = "Ignition WAL-L710 PAR"
|
||||
|
||||
def _dump(self):
|
||||
return self.address, [
|
||||
self.intensity,
|
||||
self.red,
|
||||
self.green,
|
||||
self.blue,
|
||||
self.white,
|
||||
0, # program
|
||||
]
|
23
lights/varytec_hero_wash_zoom_712.py
Normal file
23
lights/varytec_hero_wash_zoom_712.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
from .common import BaseDMXLight
|
||||
|
||||
class VarytecHeroWashZoom712(BaseDMXLight):
|
||||
name = "Varytec Hero Wash 712 Z RGBW Zoom"
|
||||
|
||||
def _dump(self):
|
||||
return self.address, [
|
||||
128, # pan
|
||||
128, # pan fine
|
||||
128, # tilt
|
||||
128, # tilt fine
|
||||
0, # speed
|
||||
self.intensity,
|
||||
0, # shutter
|
||||
self.red,
|
||||
self.green,
|
||||
self.blue,
|
||||
self.white,
|
||||
0, # colortemp
|
||||
0, # color macro
|
||||
0, # zoom
|
||||
0, # auto run
|
||||
]
|
12
lights/wled.py
Normal file
12
lights/wled.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from .common import BaseDMXLight
|
||||
|
||||
class WLED(BaseDMXLight):
|
||||
name = "WLED"
|
||||
|
||||
def _dump(self):
|
||||
offset = self.intensity / 255
|
||||
return self.address, [
|
||||
int(self.red * offset),
|
||||
int(self.green * offset),
|
||||
int(self.blue * offset),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue