Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 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

Cumulus ‘Current Conditions’ Alternative v3.0

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

Moderator: daj

User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by beteljuice »

@honestjohn

You've fixed your page, but now the wind direction is not being 'translated' !

Did you 'install' all the necessary language files for your template ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
JennyLeez
Posts: 314
Joined: Wed 16 Dec 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by JennyLeez »

Hi honestjohn,

You need to copy each of the language files to your server since you are using multi Languages, then you will be right.

"Most of the Non english language files have been translated by our Cumulus Members.
If you wish to use these, copy the contents of each language-xx-local.txt to the matching language-xx-local.txt file on your Hard Drive and FTP to the SAME directory as curconditions.php. This should be your main directory where the base language are also held.
e.g. Copy the contents from language-el-local.txt to your language-el-local.txt.
If you do not have any of the language-xx-local.txt files then just FTP them all to your server."

Cheers
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image
honestjohn
Posts: 27
Joined: Fri 18 Nov 2011 2:00 pm
Weather Station: Davies Vantage Vue
Operating System: Windows 10 Pro 64bit
Location: Northants, UK
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by honestjohn »

JennyLeez wrote:Hi honestjohn,

You need to copy each of the language files to your server since you are using multi Languages, then you will be right.

"Most of the Non english language files have been translated by our Cumulus Members.
If you wish to use these, copy the contents of each language-xx-local.txt to the matching language-xx-local.txt file on your Hard Drive and FTP to the SAME directory as curconditions.php. This should be your main directory where the base language are also held.
e.g. Copy the contents from language-el-local.txt to your language-el-local.txt.
If you do not have any of the language-xx-local.txt files then just FTP them all to your server."

Cheers
Thank you Jenny, I had copied the language files over, but had retained them within the Language folder. The .txt files are all now sitting in the web root directory, and all is well.

I appreciate your assistance.

Best regards

John

PS. Many thanks to Beteljuice for his asistance earlier.
User avatar
JennyLeez
Posts: 314
Joined: Wed 16 Dec 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by JennyLeez »

Yep you got it now :)

btw congrats on your website. Neat tidy informative front page.

Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image
Smithee
Posts: 74
Joined: Sun 02 Oct 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by Smithee »

I do like the script - i have implemented it at:

http://weather.casa.ucl.ac.uk/index.htm

I was wondering if there is a way to auto refresh is on the page when the conditions change?

Andy
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by beteljuice »

I was wondering if there is a way to auto refresh
Unfortunately not at the moment ...

At the time (and indeed at the moment) the beteljuice was rather distracted and is guilty of legacy programming.
ie. Some philosphies that were begun and later modified are still important. Mainly in the way languages are handled accross different templates.

PHP is a server-side code, ie. all work is performed before delivery to the browser, and in it's initial concept the code needed to be contained within the template to work out whose variables and translation construct it was using. This is turn means it can't work as a 'stand alone' that can be run on-demand.

It's something that has been troubling the beteljuice in his spare moments.
It would mean everyone using it thus far replacing the main file and replacing / rebuilding ALL the different language files for one 'uniform' set.
Image
......................Imagine, what you will KNOW tomorrow !
Smithee
Posts: 74
Joined: Sun 02 Oct 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by Smithee »

Thanks for the reply - it works if you wrap a refresh around the div and tweak the PHP a bit - mine now refreshes every 1min, so it can be left running and the latest conditions appear on the page.

http://weather.casa.ucl.ac.uk/index.htm

I think its working....

Andy
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by beteljuice »

You say "Tweaked the php" So have you put the echo $condOut in the php file (That's where it started) ?

Although as I understand (partly) JQuery, your code

Code: Select all

function getConditions(){
$('#conditions_div').load('curconditions.php');
}

setInterval(function() {
getConditions();
}, 60000); // the "3000"

getConditions();
});
Would 'execute' the JS option.

You are 'lucky' because you are using a single language and our 'own' language files - but hey, it works for you :clap:
Image
......................Imagine, what you will KNOW tomorrow !
Smithee
Posts: 74
Joined: Sun 02 Oct 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by Smithee »

The Jquery simply refreshes the div at a set time - the original php script came back with document.write via the javascript when implementing the refresh. I asked a colleague from work to take a look and he made a few changes to ensure it returns just the text.

I will ask him for some more details, the updated php is in the root of the site if that helps in the on dropbox https://www.dropbox.com/s/rte41deerelrn ... s.php?dl=0 in the meantime.

Andy
User avatar
JennyLeez
Posts: 314
Joined: Wed 16 Dec 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by JennyLeez »

Bumping this up for TD :)

Those last few posts address the refresh you are after.

Good Luck.

Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image
User avatar
BeaumarisWX
Posts: 357
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by BeaumarisWX »

Hi Jenny,

Greatly appreciated, I had a quick look and decided to;

1: Revert back to CCdata.php (in order to upload realtime).
2: Adopted smitthee's priciple, however did not modify the curconditions.php (left it as was) and utilised the CCInclude.php (though had to add include_once("common.php") in order to work correctly.

http://hrvistaweather.com/index.php

All I need know is a way to display the Current Conditions Icon.
You do not have the required permissions to view the files attached to this post.
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by beteljuice »

All I need know is a way to display the Current Conditions Icon.
You have a webcam thumb - What more do you need :D
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
BeaumarisWX
Posts: 357
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by BeaumarisWX »

Yes True Beteljuice,

Just during hours of darkness it becomes a tad difficult, but that's fine I'll work something out down the track.

Hi Jenny,

Thanks for the great conditions script - been running a while now.

Just have a query, the other day we where in thick pea soup fog all morning and the script has returned nil regards fog,
only sunny/partly cloudy etc.

I was just curious how the fog detection works in the script (ie. can't get my head around the fuzzy logic and wonder if I need to adjust it for my location).

Regards
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by beteljuice »

Basically it's saying if your cloudbase height is 'low' and it isn't raining (very wet cloud) it must be fog (not so wet cloud)

Code: Select all

        if(decCom($cloudbasevalue) < ($cloudbaseunit == "m" ? 10 : 29) && $MinutesSinceLastRainTip > 15){ // less than 10m - a rough figure and NO rain
check is for 10m / 29ft - Can you check what your cloudbase height was at the time ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
BeaumarisWX
Posts: 357
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Post by BeaumarisWX »

Hi Beteljuice, that is obviously my issue then - we have a lot of Fog and cloudbase never seems to be much below 190 ft.

Oh and my Cloudbase Unit is set to ft in cumulus for other reasons and I assume that cumulus calculates the Cloudbase as best it can based on that I'm using C not F for my Temps.
How does Cumulus know the height of the cloud base?

It doesn't. It uses a calculation which gives the theoretical height above ground level at which Cumulus clouds might form, based on the current temperature and dew point. It assumes that the difference between temperature and dew point decreases by about 4.4 degrees Fahrenheit per 1000 feet increase in altitude. When the two values coincide, the air is saturated (relative humidity = 100%) and Cumulus clouds may form.
.

I found this question posed by Cashmere Weather on another post http://www.wxforum.net/index.php?PHPSES ... #msg114276
Fog can be considered a cloud at ground level. The processes forming it, however, are usually different from those that form clouds. Like clouds, fog is made up of condensed water droplets which is the result of the air being cooled to the point (actually, the dewpoint) where it can no longer hold all of the water vapor it contains.

Fog forms when the difference between temperature and dew point is generally less than 2.5 °C or 4 F.

The difference between Fog & Mist is that Fog reduces visibility to less than 1 km (5/8 statute mile) whereas Mist reduces visibilty to 1km or more.

How do we determine visibility?

I guess based on this as a starting point we could have:

function bool IsFoggy(double TemperatureInF, double DewPointInF)
{
if (TemperatureInF > DewPointInF)
if (TemperatureInF - DewPointInF <= 4)
return true;
else if (DewPointInF - TemperatureInF <= 4)
return true;
else
return false;
}

Is this just too simple or is it about right? should we also be looking at humidity?
And I get confused when I try to understand the following :
// betejuice fuzzy logic
$suppress = 0; // a flag which will influence skycond display
$fog = 0;
// Automatic FOG detection - normally starts in the dark before you get up ;-)
if($display['showFog']){
if(decCom($cloudbasevalue) < ($cloudbaseunit == "m" ? 10 : 29) && $MinutesSinceLastRainTip > 15){ // less than 10m - a rough figure and NO rain
if(decCom($temp) < ($tempunitnodeg == "C" ? 4 : 39)){ // 4 deg C - True temp
$condOut .= $langCurrWeather["freeze"] . " ";
}
$auto .= $langCurrWeather["fog"];
$hybrid .= $langCurrWeather["fog"];
$suppress = 1; // suppress skycond
$fog = 1;
}
} // END fog check
I am not questioning the logic - just purely trying to understand it, from a metric versus imperial point of view.

Data for Sunday just gone when we where fogged in all morning.

regards,
You do not have the required permissions to view the files attached to this post.
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
Post Reply