initial commit

This commit is contained in:
Franzi 2023-08-07 13:39:15 +02:00
commit c8630735c4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
9 changed files with 478 additions and 0 deletions

0
lights/__init__.py Normal file
View file

23
lights/common.py Normal file
View 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

View 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
]

View 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
View 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),
]