Page 1 of 1

MQTT retain flag not applied

Posted: Mon 01 Apr 2024 12:03 pm
by Dinant
Cumulus MX 3.28.6 b3283
I've created a custom mqtt upload file. If I add the property "retain": true to the topic the value is not published with a retained flag. I've restarted CumulusMX after the change and checked this with MQTT Explorer.

Re: MQTT retain flag not applied

Posted: Mon 01 Apr 2024 1:40 pm
by Dinant
I see I've made a typo in the mqtt file instead of "retain": true I've used "retain": "true". I don't know if that causes the problem.
Second the MQTT Explorer only shows the retain flag when the client subscribes after the initial publish.

Re: MQTT retain flag not applied

Posted: Mon 01 Apr 2024 5:39 pm
by mcrossley
Dinant wrote: Mon 01 Apr 2024 1:40 pm I see I've made a typo in the mqtt file instead of "retain": true I've used "retain": "true". I don't know if that causes the problem.
I'm not sure, I've never tested it, but the correct syntax would be "retain":true