Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.1 (build 3096) - 31 October 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

MQTT webtag parsing error?

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
SamiS
Posts: 33
Joined: Sun 27 Feb 2011 5:13 pm
Weather Station: WH1080
Operating System: Raspberry Pi OS
Location: Kangasala, Finland

MQTT webtag parsing error?

Post 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.

User avatar
mcrossley
Posts: 7179
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MQTT webtag parsing error?

Post 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.

SamiS
Posts: 33
Joined: Sun 27 Feb 2011 5:13 pm
Weather Station: WH1080
Operating System: Raspberry Pi OS
Location: Kangasala, Finland

Re: MQTT webtag parsing error?

Post 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.
You do not have the required permissions to view the files attached to this post.

User avatar
mcrossley
Posts: 7179
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MQTT webtag parsing error?

Post by mcrossley »

¯\_(ツ)_/¯
I have no idea! :lol:

Post Reply