Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Adding Heat Index To Graphs

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Adding Heat Index To Graphs

Post by Grimers »

Hi,

I have tried adding Heat Index to the graphs using cumuluscharts.js but to no avail.

I have made the following changes to the relevant code:

Code: Select all

series: [{
                name: 'Temperature',
                zIndex: 99,
				color: 'red'
            }, {
                name: 'Dew Point',
				color: 'green'
            }, {
                name: 'Apparent Temperature',
				color: 'yellow'
            }, {
                name: 'Wind Chill',
				color: 'blue'
            },{
				name: 'Heat Index',
				color: 'brown'
				}],

Code: Select all

$.ajax({
        url: 'tempdata.json',
        cache: false,
        dataType: 'json',
        success: function (resp) {
            chart.hideLoading();
            chart.series[0].setData(resp.temp);
            chart.series[1].setData(resp.dew);
            chart.series[2].setData(resp.apptemp);
            chart.series[3].setData(resp.wchill);
            chart.series[4].setData(resp.heatindex);
        }
    });
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Adding Heat Index To Graphs

Post by steve »

You can't just randomly invent things to add to the charts (or any other part of the user interface) and assume that they will magically somehow work. Cumulus doesn't provide heat index data in the chart data. Maybe it will at some point.
Steve
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

steve wrote:You can't just randomly invent things to add to the charts (or any other part of the user interface) and assume that they will magically somehow work. Cumulus doesn't provide heat index data in the chart data. Maybe it will at some point.
I don't think that, I was just curious as to why the data wouldn't pull through but thanks for confirming. :)
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Adding Heat Index To Graphs

Post by mcrossley »

You need to look at the data Cumulus is providing before trying to use it. As Steve says, just adding code to use data doesn't magically make Cumulus supply it.
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

mcrossley wrote:You need to look at the data Cumulus is providing before trying to use it. As Steve says, just adding code to use data doesn't magically make Cumulus supply it.
Thanks for confirming, Mark. :)
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Adding Heat Index To Graphs

Post by logjam »

Grimers: I think it is great you are trying to push the boundaries of the software, but as you have found out this is rather more complicated than it seems. However, 'Heat Index' is one set of data stored in the recent history array. The tag is <#RecentHeatIndex> (check out the Cumulus wiki) That data can be displayed on a user web page. It would also be possible to make a graph web page with javascript using this data too. Having been introduced to 'High Charts' on CumulusMX, I went to this web page http://www.highcharts.com/ and started at the beginning. After I eventually understood the principle, I put in the recent history tags from Cumulus and made my own charts. If a decrepit old has-been like me can do it, I'm sure an adventurous experimenter like you can!
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

logjam wrote:Grimers: I think it is great you are trying to push the boundaries of the software, but as you have found out this is rather more complicated than it seems. However, 'Heat Index' is one set of data stored in the recent history array. The tag is <#RecentHeatIndex> (check out the Cumulus wiki) That data can be displayed on a user web page. It would also be possible to make a graph web page with javascript using this data too. Having been introduced to 'High Charts' on CumulusMX, I went to this web page http://www.highcharts.com/ and started at the beginning. After I eventually understood the principle, I put in the recent history tags from Cumulus and made my own charts. If a decrepit old has-been like me can do it, I'm sure an adventurous experimenter like you can!
Thanks for the information, I think we're going to have to revert to PM as I've just tried using that tag in the JS code to no avail.
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Adding Heat Index To Graphs

Post by logjam »

I think you are making the same mistake as before. Cumulus doesn't provide that particular data to make the charts in that particular way. The tags I mentioned could only be used in your own High Chart script to make a graph. There are no short cuts if you want to make your own graphs. Take a look at the high charts web site and try some of the examples if you want to learn how to do it. Otherwise you will have to be content with the graphs that are provided.
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

logjam wrote:I think you are making the same mistake as before. Cumulus doesn't provide that particular data to make the charts in that particular way. The tags I mentioned could only be used in your own High Chart script to make a graph. There are no short cuts if you want to make your own graphs. Take a look at the high charts web site and try some of the examples if you want to learn how to do it. Otherwise you will have to be content with the graphs that are provided.
I don't understand what you mean. If Cumulus MX cannot provide the data to the graphs then you cannot make graphs that will show that data surely?
User avatar
philpugh
Posts: 428
Joined: Tue 24 May 2011 8:34 am
Weather Station: See Signature
Operating System: Debian 12 (RPi5)
Location: Antrobus, Cheshire, UK
Contact:

Re: Adding Heat Index To Graphs

Post by philpugh »

I would suggest you read the wiki (link at top of forum) to understand what data is made available via Cumulus e.g. the webtags. And how it is made available to we end users. There are lots of ideas contained in the forum,some easier to implement then others.
Phil Pugh
GW1100 + WH65/WH57/WH31;GW1100 + WS68/WH40A (also with HP25xx console); GW2001 WittBoy
CumulusMX V4 / CUtils V7
Raspberry Pi 5 64bit
https://goosegate.uk/
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

philpugh wrote:I would suggest you read the wiki (link at top of forum) to understand what data is made available via Cumulus e.g. the webtags. And how it is made available to we end users. There are lots of ideas contained in the forum,some easier to implement then others.
I have already read the Wiki looking for possible web tags to use in my website. I think no one really knows if you can add the data in, if Steve says it's not possible then I'd agree with him.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Adding Heat Index To Graphs

Post by mcrossley »

No, Steve was saying that the data you wanted - Heat Index in this case - is not available in the built-in JSON data that MX supplies. But there is nothing stopping you creating your own data files using the 'recent' web tags.
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

mcrossley wrote:No, Steve was saying that the data you wanted - Heat Index in this case - is not available in the built-in JSON data that MX supplies. But there is nothing stopping you creating your own data files using the 'recent' web tags.
Ok, I understand. Maybe I should of rephrased the question to: "How Do I Add Heat Index To Graphs?". How do you create the "data files". Do you mean that you have to create a new .json file and create the heat index data there as all I see when I open one of these files is a lot of numbers...
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Adding Heat Index To Graphs

Post by water01 »

creating your own data files using the 'recent' web tags
Mark said as above "using webtags", so make a file (say heatindexT.txt)using the Cumulus "recent" webtags, get Cumulus MX to "process" it and upload it (either as a realtime file or a normal upload file) and upload it as say heatindex.txt and then use the fields from that file in your code.
David
Image
Grimers
Posts: 240
Joined: Tue 24 Nov 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Adding Heat Index To Graphs

Post by Grimers »

water01 wrote:
creating your own data files using the 'recent' web tags
Mark said as above "using webtags", so make a file (say heatindexT.txt)using the Cumulus "recent" webtags, get Cumulus MX to "process" it and upload it (either as a realtime file or a normal upload file) and upload it as say heatindex.txt and then use the fields from that file in your code.
Oh! Sorry, I got confused on which files to be using, I'll have a fiddle! Thanks!

EDIT: I must be coding this either wrong or in the wrong place:

Code: Select all

$.ajax({
        url: 'tempdata.json',
        cache: false,
        dataType: 'json',
        success: function (resp) {
            chart.hideLoading();
            chart.series[0].setData(resp.temp);
            chart.series[1].setData(resp.dew);
            chart.series[2].setData(resp.apptemp);
            chart.series[3].setData(resp.wchill);
        }
	});
	$.ajax({
		url: 'heatindex.txt',
		cache: false,
		dataType: 'txt',
		sucess: function (resp) {
			chart.hideLoading();
			chart.series[4].setData(resp.recentheatindex);
		}
		});
Here is heatindexT.txt:

Code: Select all

{"recentheatindex":"<#RecentHeatIndex>"}
Last edited by Grimers on Wed 02 Dec 2015 3:13 pm, edited 1 time in total.
Locked