def start(self):
    LOG.info('MQTT Starting')
    if (('user' in self.mqtt_config) and ('pass' in self.mqtt_config)):
        self.mqtt.username_pw_set(self.mqtt_config['user'], self.mqtt_config['pass'])
    mqtt_host = self.mqtt_config['host']
    mqtt_port = self.mqtt_config['port']
    LOG.info('MQTT Connecting to %s:%s', mqtt_host, mqtt_port)
    self.mqtt.connect(mqtt_host, mqtt_port, 60)
    topics = ['/boards/+/digitaloutput/+/command']
    for topic_suffix in topics:
        self.mqtt.subscribe(f'{self.mqtt_base_topic}{topic_suffix}')
    self.mqtt.loop_start()
def start(self):
    LOG.info('MQTT Starting')
    if (('user' in self.mqtt_config) and ('pass' in self.mqtt_config)):
        self.mqtt.username_pw_set(self.mqtt_config['user'], self.mqtt_config['pass'])
    mqtt_host = self.mqtt_config['host']
    mqtt_port = self.mqtt_config['port']
    LOG.info('MQTT Connecting to %s:%s', mqtt_host, mqtt_port)
    self.mqtt.connect(mqtt_host, mqtt_port, 60)
    topics = ['/boards/+/digitaloutput/+/command']
    for topic_suffix in topics:
        self.mqtt.subscribe(f'{self.mqtt_base_topic}{topic_suffix}')
    self.mqtt.loop_start()