Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.1.1 (build 4025) - 19 June 2024

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Custom tags

From Cumulus MX version 3 build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since, and has recently released Cumulus MX version 4. 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

nm3cxrdc
Posts: 4
Joined: Fri 31 May 2024 10:21 am
Weather Station: WH2900
Operating System: Win11

Custom tags

Post by nm3cxrdc »

G'day all,

I've searched the forum and the documentation to no avail (either it's not there or I can't search properly!)

I'm getting #intemp reported and displayed correctly and was wondering if it were possible to get today's indoor Low/High.

Is it possible to have tags (or custom tags), along the same lines as outside temp, which i can retrieve via: api/tags/process.json?intempTL&TintempTL&intempTH&TintempTH

Or is there some other way to get this information?

Thanks
freddie
Posts: 2560
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Custom tags

Post by freddie »

Tags are listed in the Wiki. I don't think there are high/low tags for indoor readings.
Freddie
Image
water01
Posts: 3353
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Custom tags

Post by water01 »

Freddie is quite correct there are no webtags for the indoor high/low only #inhum "inside humidity" and #intemp "indoor temperature".
David
Image
nm3cxrdc
Posts: 4
Joined: Fri 31 May 2024 10:21 am
Weather Station: WH2900
Operating System: Win11

Re: Custom tags

Post by nm3cxrdc »

Thanks for above replies.

I take it there is no other way to derive/display that info?
water01
Posts: 3353
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Custom tags

Post by water01 »

If you have the coding skills you could write some PHP to read the log file and calculate the high/low for inside temp for each day from the log file after the rollover.

Only other way is to ask it to be considered as an addition to Mark's coding list!!
David
Image
User avatar
HansR
Posts: 6100
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Custom tags

Post by HansR »

nm3cxrdc wrote: Fri 07 Jun 2024 2:04 am Thanks for above replies.

I take it there is no other way to derive/display that info?
The only way I see - I may be missing something though - is through the monthly logs (where the data of intemp and inhum are stored).
You would need to read those values and determine the min/max per day.
An alternative would be to create a CustomLog for intemp and inhum which would maybe make it maybe easier to read and manipulate.

Doing all this would require manipulation on the CMX machine and not on the website, then create a datafile with those min/max values and send that to the website where you need to fetch the values to get those in the webpage. In short, you would need to write a kind of webtag mechanism voor those min/max values.

It can be done ;)

You could also ask Mark to incorporate those values in the CMX webtag system (which would require probably adding them to the inifiles).

EDIT: well water01 is ahead af me but I am not sure about the PHP he suggests.
Hans

https://meteo-wagenborgen.nl
CMX build 4023+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
water01
Posts: 3353
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Custom tags

Post by water01 »

I forgot to add that I would use the MySQL table for the Monthly Log and run a SQL Query using PHP to produce the values you require for all the days or a specific day or for the day just past.

The Top Ten Records script that Mark produced is an example of what could be done but in that case it uses the dayfile.
David
Image
nm3cxrdc
Posts: 4
Joined: Fri 31 May 2024 10:21 am
Weather Station: WH2900
Operating System: Win11

Re: Custom tags

Post by nm3cxrdc »

Thanks HansR and water01. I'll look into the MySQL route and see what I come up with. It'll take me a while to get my head around it but If it turns out to be worthwhile I'll report back here in due course.
OBSERWACJEMETEO
Posts: 20
Joined: Thu 05 Jul 2018 8:29 pm
Weather Station: WS2080
Operating System: Windows 10

Re: Custom tags

Post by OBSERWACJEMETEO »

I don't know if I'm writing in the right thread but also don't want to start a new one. How about adding a tag in CMX to describe the rainfall intensity? I am currently implementing this on my site using jv code

Code: Select all

<script type="text/javascript">
$(window).on('load', function() {
  function updateRainfallDescription() {
    // Getting the rainfall intensity value from the data-cmxdata="rrate" attribute and replacing commas with dots
    var rrateText = $("span[data-cmxdata='rrate']").text().replace(',', '.');

    // Logging the rrateText value to the console
    console.log("rrateText value:", rrateText);

    // Check if the rrateText value is empty or invalid
    if (!rrateText || rrateText.trim() === "") {
      $("#rainfallDescription").text("Error!");
      return;
    }

    // Parsing the rainfall intensity value
    var rrate = parseFloat(rrateText);

    // Defining the precipitation description variable
    var description = "";

    // Check if the rainfall rate is 0.0
    if (rate === 0.0) {
      description = "no precipitation";
    } else if (isNaN(rrate)) {
      description = "Precipitation data is unavailable";
    } else if (rrate > 0.1 && rrate <= 2.0) {
      description = "light rain";
    } else if (rrate > 2.1 && rrate <= 5.0) {
      description = "moderate rain";
    } else if (rrate > 5.1 && rrate <= 10.0) {
        description = “ strong rain”;
    } else if (rrate > 10.1 && rrate <= 20.0) {
      description = “ torrential rain”;
    } else if (rate > 20.1) {
      description = “ heavy rain”
    }

    // Inserting the description into the appropriate place on the page
    $("#rainfallDescription").text(description);
  }

  // Calling the function that updates the description after the page is loaded
  updateRainfallDescription();

});
freddie
Posts: 2560
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Custom tags

Post by freddie »

The problem with this is that definitions of rainfall intensity vary between locations - rules in the UK may be different to those in Spain, for example. The definition is also different between rain derived from fronts and that derived from convective clouds - but that's a whole different story!

I think that, unless the definitions are user-configurable, then what you are already doing is probably the better solution.
Freddie
Image
OBSERWACJEMETEO
Posts: 20
Joined: Thu 05 Jul 2018 8:29 pm
Weather Station: WS2080
Operating System: Windows 10

Re: Custom tags

Post by OBSERWACJEMETEO »

Of course you are right, however, this is more about a kind of generalization. . This can be set several ranges, and the names of the intensity can be set by anyone at his own discretion. The same with thresholds. That is, it would be a user-configurable option.
Mapantz
Posts: 1834
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Custom tags

Post by Mapantz »

I would have thought that torrential rain > heavy rain?
Image
freddie
Posts: 2560
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Custom tags

Post by freddie »

Mapantz wrote: Tue 11 Jun 2024 5:38 pm I would have thought that torrential rain > heavy rain?
This is what I mean - definitions vary. So if this webtag is going to exist then it will need to be very configurable!
Freddie
Image
OBSERWACJEMETEO
Posts: 20
Joined: Thu 05 Jul 2018 8:29 pm
Weather Station: WS2080
Operating System: Windows 10

Re: Custom tags

Post by OBSERWACJEMETEO »

Heavy rain if the intensity of precipitation is more than 20.1 mm/hr. In cumulus you can set pressure trends and abbreviations of world directions, just add such an option plus to it add ranges and as a result give webtag. Below are the precipitation intensity ranges that are used in my country. Of course, the English translation can be confusing.

if (rate === 0.0) {
description = "no precipitation";
} else if (isNaN(rrate)) {
description = "Precipitation data is unavailable";
} else if (rrate > 0.1 && rrate <= 2.0) {
description = "light rain";
} else if (rrate > 2.1 && rrate <= 5.0) {
description = "moderate rain";
} else if (rrate > 5.1 && rrate <= 10.0) {
description = “ strong rain”;
} else if (rrate > 10.1 && rrate <= 20.0) {
description = “ torrential rain”;
} else if (rate > 20.1) {
description = “ heavy rain”
Mapantz
Posts: 1834
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Custom tags

Post by Mapantz »

Surely, the word torrential, even if translated to another language, would describe rainfall intensity far greater than heavy?
Image
Post Reply