diff --git a/mqtt.py b/mqtt.py index 46150c6..06c64f4 100644 --- a/mqtt.py +++ b/mqtt.py @@ -5,7 +5,7 @@ import paho.mqtt.client as mqtt class MqttClient: def __init__(self, config): self._config = config - self._mqttc = mqtt.Client() + self._mqttc = mqtt.Client(client_id='bt-mqtt-gateway', clean_session=False) def publish(self, messages): if messages is None: diff --git a/workers_manager.py b/workers_manager.py index 0f1f882..de9dcaa 100644 --- a/workers_manager.py +++ b/workers_manager.py @@ -98,4 +98,5 @@ class WorkersManager: pip.main(['install', '-q', package]) def _on_command_wrapper(self, worker_obj, client, _, c): + _LOGGER.debug("on command wrapper for with %s: %s", c.topic, c.payload) self._queue_command(self.Command(worker_obj.on_command, [c.topic, c.payload]))