Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

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 drop-down menus to 2030)

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

Need to identify web template in use

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
clubview
Posts: 4
Joined: Tue 31 Jul 2018 8:59 am
Weather Station: Davis Vantage Pro2
Operating System: n/a

Need to identify web template in use

Post by clubview »

Hello, I'd really appreciate this community's help with identifying which web template/script has been used to embed live station data on a client's website.

The data file cumulus/realtimegauge.txt is still being successfully uploaded by Cumulus (v1.9.4) via FTP, but the live gauges stopped working after the website was upgraded from HTTP to HTTPS. This is because the javascript is making an 'AJAX' request to fetch the data from the non-HTTPS website.

The page in question is https://www.ryegolfclub.co.uk/weather/ and the code that loads the gauges is as follows:

Code: Select all

<p id="gauges-container"></p>
<script type="text/javascript" src="/files/478/_ftp_/gauges/script.js"></script>
<script type="text/javascript" src="/files/478/_ftp_/gauges/template.js"></script>
The console error in the browser is as follows:
Mixed Content: The page at 'https://www.ryegolfclub.co.uk/weather/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.ryegolfclub.co.uk/files/478/ ... 3730644774'. This request has been blocked; the content must be served over HTTPS.
If I drop the same code into an entirely different website it still requests data from the old HTTP URL, from which I deduce that the URL of the live data file must be contained in the gauges/script.js file. The code in that javascript file is obfuscated, however, so I cannot simply edit it to fix the problem.

Despite spending some time Googling and checking this forum, I have been unable to work out which of the various web scripts/templates is being used. I was hoping that a member of this forum would recognise the gauges or embed code, and perhaps know how I can re-generate the gauges/script.js with the current (i.e. HTTPS) URL for the data file.

Thanks in advance for any help.
User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Need to identify web template in use

Post by mcrossley »

gauges.js is supplied in an un-minimised form, and the AJAX call uses a relative URL by default so should "just work" when changing from HTTP to HTTPS. It sounds like your client has modified the file and minimised it
clubview
Posts: 4
Joined: Tue 31 Jul 2018 8:59 am
Weather Station: Davis Vantage Pro2
Operating System: n/a

Re: Need to identify web template in use

Post by clubview »

gauges.js is supplied in an un-minimised form
Hello, Mark, thanks for your reply, however gauges.js is not one of the files used on the client's page, and would be very surprised if the person/people who set this up would have renamed the files or put the code through a js 'minifier'. As far as I know there was nobody involved who would even go out of their way to modify javascript code, let alone know what a minifier was!

There are three scripts/templates that have their own forums here: Saratoga, SteelSeries Gauges and Weather By You. I assume you think the page in question is using SteelSeries Gauges, yes? Doing some more digging I can see that it certainly matches visually, but the implementation details look different (different js file names), so I wonder there might be a third-party bit of software that reuses the SSG front end with different javascript?

Alternatively, rather than trying to fix what's there now, as long as there is a cumulus/realtimegauge.txt file still being refreshed automatically by Cumulus should I just be able to set up SSG from scratch (and dump the old code that was there before)?

Many thanks again for any help or pointers!
water01
Posts: 3201
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Need to identify web template in use

Post by water01 »

Mark is the author of SteelSeries Gauges and on looking at the site those are definitely Marks gauges.

No reason why you could not down load them and implement them in place of the existing gauges. Make sure you use the latest realtimeguages.txt in the download as each one is linked to a particular version of the code.
David
Image
User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Need to identify web template in use

Post by mcrossley »

The code is definitely the SS gauges, but the source has been encoded. The file https://www.ryegolfclub.co.uk/files/478 ... /script.js has encoded at least the following files into a single file, which it dynamically decodes on page load:
gauges.js, steelseries.js, tween.js, language.js

Even the HTML is saved into a JavaScript variable, then written out to the containing DIV :?

Sounds like it was done by someone with some decent knowledge - or access to a tool they didn't understand!
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Need to identify web template in use

Post by steve »

Forgive me for asking what seems to me to be an obvious question, but why do the owners of the web site not know what they are using on their web site?
Steve
clubview
Posts: 4
Joined: Tue 31 Jul 2018 8:59 am
Weather Station: Davis Vantage Pro2
Operating System: n/a

Re: Need to identify web template in use

Post by clubview »

steve wrote:Forgive me for asking what seems to me to be an obvious question, but why do the owners of the web site not know what they are using on their web site?
Entirely fair question! The data upload from Cumulus and the code that embeds the gauges on the website were set up by a third party who was asked to help. That person is not technical though, which is why I don't believe they would have modified or minified the code. That's why I suspect they instead used some tool that prepared a single compressed & obfuscated js file based on values entered into some programme/wizard.
water01
Posts: 3201
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Need to identify web template in use

Post by water01 »

Still think the best option is download the latest version from here https://cumulus.hosiene.co.uk/viewtopic.p ... 186#p61199 and implement it in place of the existing gauges.
David
Image
clubview
Posts: 4
Joined: Tue 31 Jul 2018 8:59 am
Weather Station: Davis Vantage Pro2
Operating System: n/a

Re: Need to identify web template in use

Post by clubview »

mcrossley wrote:Sounds like it was done by someone with some decent knowledge - or access to a tool they didn't understand!
I think it was most likely the latter, Mark! Thanks for giving this your attention and verifying that it is definitely based on your code though.
water01 wrote:Make sure you use the latest realtimeguages.txt in the download as each one is linked to a particular version of the code.
Sorry, not sure what you mean - I'm a web developer with no knowledge of Cumulus or weather stations before this, so it's all completely new to me!

I've looked in the SSG Github repository and there's a realtimegaugesT.txt file - does that act as a template used by Cumulus when it uploads data then? I had assumed that the realtimegauge.txt file was something intrinsic/built-in to Cumulus.

Thanks in advance (yet again!),
James
water01
Posts: 3201
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Need to identify web template in use

Post by water01 »

If you download the latest complete ZIP file it contains a file called realtimegaugesT.txt plus all the other files needed to implement the SteelSeries Gauges.

Cumulus version 1.9.4 version 1099 is the latest and last version of Cumulus 1 which is what you are running which connects to the weather station (not sure which model they have but they will know) and gets data from it. Cumulus on a regular basis uploads the Template files (all have a capital T following their name i.e. indexT.htm) and after they have been processed by Cumulus (this means all the #web tags are replaced with the actual data obtained from the weather station) it uploads the file and renames it without the T (i.e. indexT.htm becomes index.htm etc. etc.).

Mark kept this as the standard when he built the SS Gauges so realtimegaugesT.txt becomes realtimegauges.txt on upload after it has been processed by Cumulus. Now realtimegaugesT.txt is not part of the standard uploaded files that Cumulus uploads, so someone at some time added it to the extra files area to be uploaded in Cumulus, giving it the realtimegaugesT.txt as the local file name, realtimegauges.txt as the renamed file on the server, and telling Cumulus to process it which is why it ends up like this on you server.

Code: Select all

{"date":"10:24","temp":"16.8","tempTL":"12.8","tempTH":"17.0","intemp":"22.0","dew":"13.6","dewpointTL":"11.3","dewpointTH":"13.8","apptemp":"15.4","apptempTL":"12.6","apptempTH":"16.6","wchill":"16.7","wchillTL":"12.8","heatindex":"16.8","heatindexTH":"17.0","humidex":"19.8","wlatest":"7.0","wspeed":"8.0","wgust":"12.0","wgustTM":"19.0","bearing":"348","avgbearing":"335","press":"1019.54","pressTL":"1019.07","pressTH":"1020.05","pressL":"969.05","pressH":"1043.79","rfall":"0.0","rrate":"0.0","rrateTM":"0.0","hum":"81","humTL":"80","humTH":"93","inhum":"54","SensorContactLost":"0","forecast":" Mostly clear with little temperature change. ","tempunit":"C","windunit":"mph","pressunit":"mb","rainunit":"mm","temptrend":"+0.5","TtempTL":"00:41","TtempTH":"10:10","TdewpointTL":"00:37","TdewpointTH":"08:57","TapptempTL":"00:41","TapptempTH":"10:10","TwchillTL":"00:41","TheatindexTH":"10:10","TrrateTM":"00:00","ThourlyrainTH":"00:00","LastRainTipISO":"2018-06-01 17:30","hourlyrainTH":"0.0","ThumTL":"10:12","ThumTH":"01:18","TpressTL":"02:22","TpressTH":"00:03","presstrendval":"0.00","Tbeaufort":"F3","TwgustTM":"00:29","windTM":"8.0","bearingTM":"266","timeUTC":"2018,7,11,9,24,31","BearingRangeFrom10":"290","BearingRangeTo10":"010","UV":"0.0","SolarRad":"0","CurrentSolarMax":"727","version":"1.9.4","build":"1099","ver":"7"}
It is this file that gauges.js picks up and uses it to produce the realtime gauges on their website but because it is blocked is doesn't get the data.

So your task, should you choose to accept it :D :D is to implement the latest version of the gauges which will allow you to fix the gauges.js to pick up the right data once you have got the new realtimegaugesT.txt uploading correctly. It also looks as though it is an old version of SS gauges as there are now 9 gauges and a cookie selector to set how measurements are displayed (i.e. mm or inch of rain etc.)

Hope that helps!!
David
Image
water01
Posts: 3201
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Need to identify web template in use

Post by water01 »

As an additional point I took another look at the Rye Golf Club page and clicked on
To see the historical data of our weather station, click here
and rather than seeing what I expected a complete set of Cumulus web pages displaying all the data since the station was set up to use Cumulus, it directed me to the Weather Underground web site for ICAMBER6, which is still being updated by the weather station. It is a bit of a cop out since all the history must be being held on the computer they are using and could be displayed by the Cumulus web pages and makes a better job of it than WU!! Personal opinion!!
David
Image
Post Reply