Set message as retained
This commit is contained in:
parent
9f652eafa7
commit
789fe9567a
@ -82,7 +82,7 @@ void my_connect_callback(struct mosquitto *mosq, void *userdata, int result)
|
|||||||
|
|
||||||
printf("Liters: %i\n", meter_data.liters);
|
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");
|
fprintf(stderr, "ERROR: could not publish message");
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user