From b4e6851e32def85311f89008a283747c36a7d05e Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 30 May 2024 12:45:11 +0100 Subject: [PATCH] add Pulsar Chromaflood 200 to fixtures --- conf.py | 2 +- lights/pulsar_chromaflood_200.py | 16 ++++++++++++++++ main.py | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lights/pulsar_chromaflood_200.py diff --git a/conf.py b/conf.py index e163d39..83f722c 100644 --- a/conf.py +++ b/conf.py @@ -22,7 +22,7 @@ def load_and_validate_config(path): with open(path, 'r') as cf: config = toml_load(cf.read()) except Exception as e: - LOG.error(f'{path} is no valid toml configuration file') + LOG.exception(f'{path} is no valid toml configuration file') exit(1) if not config.get('mqtt', {}).get('host'): diff --git a/lights/pulsar_chromaflood_200.py b/lights/pulsar_chromaflood_200.py new file mode 100644 index 0000000..050b9fa --- /dev/null +++ b/lights/pulsar_chromaflood_200.py @@ -0,0 +1,16 @@ +from colorsys import hsv_to_rgb +from .common import BaseDMXLight + + +class PulsarChromaflood200(BaseDMXLight): + name = "Pulsar Chromaflood 200 (10-Channel Mode)" + + def _dump(self): + return self.address, [ + self.red, + self.green, + self.blue, + 0,0,0, # chase 1 + 0,0,0, # chase 2 + self.intensity + ] diff --git a/main.py b/main.py index e9415a3..22a5622 100755 --- a/main.py +++ b/main.py @@ -9,6 +9,7 @@ from time import sleep from conf import load_and_validate_config from dmx_queue import DMXQueue from lights.ignition_wal_l710 import IgnitionWALL710 +from lights.pulsar_chromaflood_200 import PulsarChromaflood200 from lights.sheds_30w_cob_rgb import Sheds30WCOBRGB from lights.stairville_par_56 import StairvillePar56 from lights.varytec_hero_wash_zoom_712 import VarytecHeroWashZoom712 @@ -40,6 +41,8 @@ def main(): lights = [] for addr in config.lights.get('ignition_wal_l710', []): lights.append(IgnitionWALL710(addr)) + for addr in config.lights.get('pulsar_chromaflood_200', []): + lights.append(PulsarChromaflood200(addr)) for addr in config.lights.get('sheds_30w_cob_rgb', []): lights.append(Sheds30WCOBRGB(addr)) for addr in config.lights.get('stairville_par_56', []):