Set message as retained

This commit is contained in:
leo 2023-07-13 08:27:24 +02:00
parent 9f652eafa7
commit 789fe9567a
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB

View File

@ -82,7 +82,7 @@ void my_connect_callback(struct mosquitto *mosq, void *userdata, int result)
printf("Liters: %i\n", meter_data.liters);
if(mosquitto_publish(mosq, NULL, mqtt_topic, strlen(buff),buff,1,false) != MOSQ_ERR_SUCCESS)
if(mosquitto_publish(mosq, NULL, mqtt_topic, strlen(buff),buff,1,true) != MOSQ_ERR_SUCCESS)
fprintf(stderr, "ERROR: could not publish message");
}else{