Page 1 of 1

MQTT webtag parsing error?

Posted: Sun 15 Nov 2020 8:57 pm
by SamiS
Hi,

I'm experimenting with MQTT to eventually send my CumulusMX data also to Influxdb via Mosquitto and Telegraf to create a bit more interactive graphs dashboard with Grafana.

I noticed that for some reason <#wgust rc=y> webtag gives a value with decimal comma instead of a full stop on MQTT DataIntervalTemplate.txt. This behavior does not repeat on #wspeed or any other webtag that I have tested with MQTT so far (not a very extensive test). But however when <#wgust rc=y> is used on indexT.htm, there it works properly.

I'm running MX build 3094 on RPi with mono 6.12. I have not tested later builds, since the release announcements do not show anything related to this.

Re: MQTT webtag parsing error?

Posted: Sun 15 Nov 2020 11:44 pm
by mcrossley
I cannot reproduce this, the tag converts correctly to dot decimal when I tried it (running MX as -lang fr-fr for my test). All the tags use the same function for rc=y.

Are you sure there is no typo, or spurious character in there?

There is the <#RCwgust> to fall back on, but that uses the same remove comma function as well.

Re: MQTT webtag parsing error?

Posted: Mon 16 Nov 2020 7:58 pm
by SamiS
Now this is strange. :shock:

First I checked that my original file does not have typos or other errors. Decimal comma was still present on the output. I did not change the original file (attached) in any way. Then I created DataUpdateInflux_v2.txt where I replaced the tag with <#RCwgust> and uploaded it to my raspberry. Then changed the mqtt settings on CMX, and checked that the new tag indeed gave the correct output to mqtt topic.

But now things get really strange. After changing the template filename back to where I started, the problem no longer appears. How is it even possible? I even checked that applying your original template really changed the message contents, so it cannot be explained by not taking the original template in use when saving settings for the first time.

Screenshot and template file attached. All this happened with locale fi-fi.

Re: MQTT webtag parsing error?

Posted: Tue 17 Nov 2020 12:13 am
by mcrossley
¯\_(ツ)_/¯
I have no idea! :lol: