def __init__(self): LOGGER.info('initializing thermaltake rgb daemon') LOGGER.debug('loading config') self.config = Config() LOGGER.debug('creating fan manager') fan_model = FanModel.factory(self.config.fan_manager) self.fan_manager = FanManager(fan_model) LOGGER.debug('creating lighting manager') self.lighting_manager = LightingEffect.factory( self.config.lighting_manager) self.attached_devices = {} self.controllers = {} LOGGER.debug('configuring controllers') for controller in self.config.controllers: self.controllers[ controller['unit']] = ThermaltakeController.factory( controller['type'], controller.get('unit')) for id, model in controller['devices'].items(): LOGGER.debug(' configuring devices for controller %s: %s', controller['type'], controller.get('unit')) dev = ThermaltakeDevice.factory( model, self.controllers[controller['unit']], id) self.controllers[controller['unit']].attach_device(id, dev) self.register_attached_device(controller['unit'], id, dev) self._continue = False
def __init__(self, config): self._config = config self._devices = [] LOGGER.info(f'initializing {self.__class__.__name__} light controller')
def start(self): LOGGER.info(f'Starting lighting manager ({self._controller})...') self._continue = True self._thread.start()
def stop(self): LOGGER.info(f'Stopping lighting manager...') self._continue = False self._thread.join()
def start(self): LOGGER.info(f'Starting fan manager ({self._model})...') self._continue = True self._thread.start()