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

How to insert cloudbase.php scrip on ajax/php site?

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: How to insert cloudbase.php scrip on ajax/php site?

Post by beteljuice »

I should have worn the right goggles :oops:

However; The script is looking up KSJC (San Jose Int'l) METAR information.

... but that doesn't change the temp problem, which seems to be in the 'graphic' part of the code.

http://www.nightliferedditch.info/cloud ... m=M&html=1

You can also 'force' conditions by adding &test=1 (through to 5)
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by nitrx »

beteljuice wrote:I should have worn the right goggles :oops:

However; The script is looking up KSJC (San Jose Int'l) METAR information.

... but that doesn't change the temp problem, which seems to be in the 'graphic' part of the code.

http://www.nightliferedditch.info/cloud ... m=M&html=1

You can also 'force' conditions by adding &test=1 (through to 5)
I can't locate the Metar but perhaps the GD2 library doesn't has the centigrade character ? Sant Jose California USA ??? huh, yes your right the metar is an example and not overwitten by the settings http://www.nightliferedditch.info/get-m ... p?sce=view
User avatar
ergie
Posts: 44
Joined: Thu 19 Apr 2012 9:24 pm
Weather Station: WH1090
Operating System: Praspberry Pi2
Location: Oslo, Norway
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by ergie »

O.K guys :roll: between your conversation I understood only one thing. In my coudbase scrip I missing metar or something like that? I tried to do everything what’s written in manual. And yes I enter my station data in cloudbase php elevation, longitude, latitude.

Can someone show me where is misstakes? Or what I am missing. I am attaching my cloudbase php file
Thanks in advance,
Rim
You do not have the required permissions to view the files attached to this post.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by nitrx »

ergie wrote:O.K guys :roll: between your conversation I understood only one thing. In my coudbase scrip I missing metar or something like that? I tried to do everything what’s written in manual. And yes I enter my station data in cloudbase php elevation, longitude, latitude.

Can someone show me where is misstakes? Or what I am missing. I am attaching my cloudbase php file
Thanks in advance,
Rim
Hmmz I don't know exactly but do you have http://www.nightliferedditch.info/Settings-weather.php on your server ?
User avatar
ergie
Posts: 44
Joined: Thu 19 Apr 2012 9:24 pm
Weather Station: WH1090
Operating System: Praspberry Pi2
Location: Oslo, Norway
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by ergie »

Hi,
yes there is file Settings-weather.php and I found that in this file was wrong metar info there was on line:
$SITE['conditionsMETAR'] = 'KSJC'; // set to nearby METAR for current conditions icon/text

Now I changed it in to EGBB it is Birmingam international airport ICAO.
I am attatching my setting weather txt.
You do not have the required permissions to view the files attached to this post.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by nitrx »

nitrx wrote:
ergie wrote:O.K guys :roll: between your conversation I understood only one thing. In my coudbase scrip I missing metar or something like that? I tried to do everything what’s written in manual. And yes I enter my station data in cloudbase php elevation, longitude, latitude.

Can someone show me where is misstakes? Or what I am missing. I am attaching my cloudbase php file
Thanks in advance,
Rim
Hmmz I don't know exactly but do you have http://www.nightliferedditch.info/Settings-weather.php on your server ?
Okay it seems the cloudbase script has a fixed METAR/ICAO number so it's not dependent from the settings.php I think your location is allright but I cant'figure out why the value of the temperature is broken you got the script from Ray so maybe he can figure it out ..
User avatar
ergie
Posts: 44
Joined: Thu 19 Apr 2012 9:24 pm
Weather Station: WH1090
Operating System: Praspberry Pi2
Location: Oslo, Norway
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by ergie »

Yes I enter new metar information. I enter four letters in Settings-weather.php ( EGBB) and enter long metar info in cloudbase.php (EGBB 032020Z 03003KT 4400 -RA BR FEW004 BKN016 07/06 Q1010).
Yes I spotted that something wrong with Celsius in the bottom of coudbase picture from the beginning when I turn on it in the cloudbase.php file.
Any way thank you for your comments.
Have a good night.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by nitrx »

ergie wrote:Yes I enter new metar information. I enter four letters in Settings-weather.php ( EGBB) and enter long metar info in cloudbase.php (EGBB 032020Z 03003KT 4400 -RA BR FEW004 BKN016 07/06 Q1010).
Yes I spotted that something wrong with Celsius in the bottom of coudbase picture from the beginning when I turn on it in the cloudbase.php file.
Any way thank you for your comments.
Have a good night.
You dont have to put the whole code in it

Code: Select all

EGBB 032020Z 03003KT 4400 -RA BR FEW004 BKN016 07/06 Q1010
just EGBB is okay it works fine for my cloudbase script http://apeldoorn.tk/weer/cloudbase.php it's the same as yours , you or Ray only have to figure out the why the temperarure isn't displayed correct.

Goodnight too
User avatar
ergie
Posts: 44
Joined: Thu 19 Apr 2012 9:24 pm
Weather Station: WH1090
Operating System: Praspberry Pi2
Location: Oslo, Norway
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by ergie »

Ok I will put only EGBB. And my cloudbase meter always show 180m. Always :)))) not moving up or down from the beginning I think.
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: How to insert cloudbase.php scrip on ajax/php site?

Post by beteljuice »

Weather Software: Cumulus
Date/Time: Thursday, 03 May 2012 / 23:40 (nighttime)
Conditions: Drizzle, showers, showery, becoming less settled
Air Temperature: 6.6°C
Dew Point: 6.5°C
Cloud Temperature: 6.5°C
Humidity: 99%
Wind: Calm
Barometric Pressure: 1011 hPa
Calculated Cloud Base: 174.19 meters (ASL)
Cumulus Cloud Base: 18 m (AGL)
Station Elevation: 162 meters (531.5 feet)

Sunrise: 05:17
Sunset: 20:22
Time Zone: Europe/London => BST => UTC+1 hours
Background Image: cb-bg-00sprn.png
Moon Age: 12 days, 15 hours, 22 minutes
Server Time: 23:40:01
Your cloudbase IS changing, but you have the settings to show ASL - ie. your altitude plus Cumulus cloudbase, and because it's raining / high RH, you are IN the cloud. ;)

Code: Select all

#################################################################################
# BEGIN IMAGE DETAILS SETTINGS                                                  #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom         = false;  // always use the cloud base height reported by Cumulus
$useCUHeight      = false;  // override the default variables with those found in (CU) CUtags.php
Your setting (I think) are also saying that the (temp) should be to one decimal point; however even if the setting are changed to Imperial, or (null) default, the accented A character appears instead of the decimal part of the string.

It would seem that

Code: Select all

$txtT = round($curtemp).'°'.$uomTemp;
Is not giving the results expected.

One for the author (Ray) I think ....
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ergie
Posts: 44
Joined: Thu 19 Apr 2012 9:24 pm
Weather Station: WH1090
Operating System: Praspberry Pi2
Location: Oslo, Norway
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by ergie »

beteljuice wrote:
Weather Software: Cumulus
Date/Time: Thursday, 03 May 2012 / 23:40 (nighttime)
Conditions: Drizzle, showers, showery, becoming less settled
Air Temperature: 6.6°C
Dew Point: 6.5°C
Cloud Temperature: 6.5°C
Humidity: 99%
Wind: Calm
Barometric Pressure: 1011 hPa
Calculated Cloud Base: 174.19 meters (ASL)
Cumulus Cloud Base: 18 m (AGL)
Station Elevation: 162 meters (531.5 feet)

Sunrise: 05:17
Sunset: 20:22
Time Zone: Europe/London => BST => UTC+1 hours
Background Image: cb-bg-00sprn.png
Moon Age: 12 days, 15 hours, 22 minutes
Server Time: 23:40:01
Your cloudbase IS changing, but you have the settings to show ASL - ie. your altitude plus Cumulus cloudbase, and because it's raining / high RH, you are IN the cloud. ;)

Code: Select all

#################################################################################
# BEGIN IMAGE DETAILS SETTINGS                                                  #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom         = false;  // always use the cloud base height reported by Cumulus
$useCUHeight      = false;  // override the default variables with those found in (CU) CUtags.php
Your setting (I think) are also saying that the (temp) should be to one decimal point; however even if the setting are changed to Imperial, or (null) default, the accented A character appears instead of the decimal part of the string.

It would seem that

Code: Select all

$txtT = round($curtemp).'°'.$uomTemp;
Is not giving the results expected.

One for the author (Ray) I think ....

I don't know if it's really working. I mean if works clouds height.
All evening I am playing with:

BEGIN IMAGE DETAILS SETTINGS #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php

and with

$getMetar = true; // get the METAR from NOAA for substituting cloud conditions at night and/or day (not required)
$metarRefresh = 1; // refresh rate of the METAR in minutes
$useMetarAtNight = true; // always use METAR at night time for determinig clouds
$onlyUseMetar = true; // always use METAR for determinig clouds

And when I set all these to false

$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php

Then it start show me 174m instead of 180m. ( but before all the time shows me 180) But if you move mouse on cloudbase picture then you can see that text pop up 180m ASL and this text never changes. Even on sunny day.
I spotted that in cumulus program my coudbase always shows 18m or sometimes 17m only.
In cumulus I set my altitude to 162m.
I live in clouds all the time :) :)
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by gemini06720 »

OK, I have been busy working on some scripts ( more like adapting the scripts to my likings) ... so, I have been away from most forums.
nitrx wrote:Okay it seems the cloudbase script has a fixed METAR/ICAO number so it's not dependent from the settings.php I think your location is allright...
Ron, the script first read the METAR information found in the script itself then, if the script finds an external configuration file (produced by either Cumulus and Weather Display) it then read data from that file, including the METAR 4 letter ICAO code.
nitrx wrote:... but I cant' figure out why the value of the temperature is broken you got the script from Ray so maybe he can figure it out ..
OK, I have figured out why the temperature information is corrupted: It is cause by the dreaded degree symbol ('°') and web page encoding!! I have been looking for a solution and I have yet fond one. I shall be back later on with, either a solution or a 'hack'... :oops:
User avatar
ergie
Posts: 44
Joined: Thu 19 Apr 2012 9:24 pm
Weather Station: WH1090
Operating System: Praspberry Pi2
Location: Oslo, Norway
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by ergie »

Hi,
I now when I set all values to false my cloudsbase altitude hangs on 174m.
I think it is not normal. Before all the time was 180m and now always 174m and not moving at all.
My outside humidity sensor is broken and all time shows me 99% so maybe this can be reason for this problem?


BEGIN IMAGE DETAILS SETTINGS #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php


Thanks,
Rim
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by nitrx »

I had a look at the cloudbase.php from 'ergie' end it seems to be in UTF-8 , mine is in ANSI so 'ergie' can give it a try to write it in ANSI perhaps the '°' will be OK then ? (use notepad + for converting it to ANSI)
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: How to insert cloudbase.php scrip on ajax/php site?

Post by nitrx »

ergie wrote:Hi,
I now when I set all values to false my cloudsbase altitude hangs on 174m.
I think it is not normal. Before all the time was 180m and now always 174m and not moving at all.
My outside humidity sensor is broken and all time shows me 99% so maybe this can be reason for this problem?


BEGIN IMAGE DETAILS SETTINGS #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php


Thanks,
Rim
You better use the cloudbase calculated by Cumulus or doesn't change this too ? I don't know how it's calculated but if the humidity is involved and your humidity sensor is broken the cloudbase calculation has no sense.
Post Reply