diff --git a/README.md b/README.md index 781a15f..232a1b1 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,9 @@ Wird ein neuer Einsatz registriert (E-Mail mit dem Betreff * `pylokid/Einsatzausdruck_FW//json`: Geparste Daten als JSON Ist der Einsatz beendet (E-Mail mit dem Betreff "Einsatzprotokoll") -wird folgedes Topic published: +wird folgendes Topic published: -* `pylokid/Einsatzprotokoll//json`: Leeres JSON +* `pylokid/Einsatzprotokoll//json`: Geparste Daten als JSON Der Dashboard Client `dashboard_client.py` subscribed auf diese Topics und zeigt mittels `xpdf` das PDF im Vollbild an. Ist der Einsatz vorbei, diff --git a/library/mqtt.py b/library/mqtt.py index 12ff796..89d4785 100644 --- a/library/mqtt.py +++ b/library/mqtt.py @@ -44,4 +44,4 @@ class MQTTClient: elif f_type == 'Einsatzprotokoll': topic = "{0}/Einsatzprotokoll/{1}/".format(self.base_topic, f_id) self.logger.info('[%s] Publishing information on MQTT topic %s', f_id, topic) - self.mqtt_client.publish(topic + 'json', '{}') + self.mqtt_client.publish(topic + 'json', json.dumps(pdf_data))