publish einsatzrapport json
This commit is contained in:
parent
97a0376370
commit
723700c64e
|
@ -79,9 +79,9 @@ Wird ein neuer Einsatz registriert (E-Mail mit dem Betreff
|
||||||
* `pylokid/Einsatzausdruck_FW/<f_id>/json`: Geparste Daten als JSON
|
* `pylokid/Einsatzausdruck_FW/<f_id>/json`: Geparste Daten als JSON
|
||||||
|
|
||||||
Ist der Einsatz beendet (E-Mail mit dem Betreff "Einsatzprotokoll")
|
Ist der Einsatz beendet (E-Mail mit dem Betreff "Einsatzprotokoll")
|
||||||
wird folgedes Topic published:
|
wird folgendes Topic published:
|
||||||
|
|
||||||
* `pylokid/Einsatzprotokoll/<f_id>/json`: Leeres JSON
|
* `pylokid/Einsatzprotokoll/<f_id>/json`: Geparste Daten als JSON
|
||||||
|
|
||||||
Der Dashboard Client `dashboard_client.py` subscribed auf diese Topics
|
Der Dashboard Client `dashboard_client.py` subscribed auf diese Topics
|
||||||
und zeigt mittels `xpdf` das PDF im Vollbild an. Ist der Einsatz vorbei,
|
und zeigt mittels `xpdf` das PDF im Vollbild an. Ist der Einsatz vorbei,
|
||||||
|
|
|
@ -44,4 +44,4 @@ class MQTTClient:
|
||||||
elif f_type == 'Einsatzprotokoll':
|
elif f_type == 'Einsatzprotokoll':
|
||||||
topic = "{0}/Einsatzprotokoll/{1}/".format(self.base_topic, f_id)
|
topic = "{0}/Einsatzprotokoll/{1}/".format(self.base_topic, f_id)
|
||||||
self.logger.info('[%s] Publishing information on MQTT topic %s', f_id, topic)
|
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))
|
||||||
|
|
Loading…
Reference in a new issue