bmsd/mqtt.c

changeset 679
48f8f3fce7c0
parent 590
a43b8b85d8b3
child 747
b6fbe6821468
--- a/bmsd/mqtt.c	Thu May 14 14:38:20 2020 +0200
+++ b/bmsd/mqtt.c	Mon May 18 11:00:59 2020 +0200
@@ -222,6 +222,13 @@
 
 
 
+void mqtt_publish(char *topic, char *payload)
+{
+    mosquitto_publish(mosq, &mqtt_mid_sent, topic, strlen(payload), payload, mqtt_qos, false);
+}
+
+
+
 void publishNData(bool birth, int flag)
 {
     char                *topic = NULL, *payload = NULL;

mercurial