Sandaysoft

Support forum for Cumulus weather station software
It is currently Sat May 25, 2013 11:51 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 796 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 54  Next
Author Message
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sat Feb 12, 2011 7:12 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
n9mfk wrote:
Hi Ken,
why are these no longer the settings.php?
Code:
$SITE['WUname1']   = 'City Level';      // tooltip label for mode=1
$SITE['WUname2']   = 'State';   // tooltip label for mode=2
$SITE['WUname3']   = 'Sate an other areas';   // tooltip label for mode=3
$SITE['WUname4']   = 'Midwest US';   // tooltip label for mode=4
$SITE['WUname5']   = 'Entire US';      // tooltip label for mode=5

thanks Beau

With this V3 release of the templates, I removed those WU-radar-inc.php settings from Settings.php, and only kept the settings needed for running the maps on the main page. All the settings for WU-radar-inc.php are now done in that script itself (using the WU-radar-testpage.php?show=loc ), and it was proving hard for folks to do the setup there, then copy back 'some' of the settings into Settings.php, so I dropped the entries in Settings.php and the directions.

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sat Feb 12, 2011 10:09 pm 
Offline

Joined: Sun May 10, 2009 8:52 pm
Posts: 502
Location: Springfield, IL
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
hi Ken,
you may went to use outdoor temp an hum not indoor
Code:
#-------------------------------------------------------------------------------------
# CU support function - CU_CBI - Chandler Burning Index
#-------------------------------------------------------------------------------------

function CU_CBI($inTemp,$inTempUOM,$inHumidity) {
   // thanks to Chris from sloweather.com for the CBI calculation script
   // modified by Ken True for template usage
   
   preg_match('/([\d\.\+\-]+)/',$inTemp,$t); // strip non-numeric from inTemp if any
   $ctemp = $t[1];
   if(!preg_match('|C|i',$inTempUOM)) {
     $ctemp = ($ctemp-32.0) / 1.8; // convert from Fahrenheit   
   }
   preg_match('/([\d\.\+\-]+)/',$inHumidity,$t); // strip non-numeric from inHumidity if any
   $rh = $t[1];

   // Start Index Calcs
   
   // Chandler Index
   $cbi = (((110 - 1.373 * $rh) - 0.54 * (10.20 - $ctemp)) * (124 * pow(10,-0.0142 * $rh) ))/60;
   // CBI = (((110 - 1.373*RH) - 0.54 * (10.20 - T)) * (124 * 10**(-0.0142*RH)))/60
   
   //Sort out the Chandler Index
   $cbi = round($cbi,1);
   if ($cbi > "97.5") {
      $cbitxt = "EXTREME";
      $cbiimg= "fdl_extreme.gif";
   
   } elseif ($cbi >="90") {
      $cbitxt = "VERY HIGH";
      $cbiimg= "fdl_vhigh.gif";
   
   } elseif ($cbi >= "75") {
      $cbitxt = "HIGH";
      $cbiimg= "fdl_high.gif";
   
   } elseif ($cbi >= "50") {
      $cbitxt = "MODERATE";
      $cbiimg= "fdl_moderate.gif";
   
   } else {
      $cbitxt="LOW";
      $cbiimg= "fdl_low.gif";
   }
    $data = array($cbi,$cbitxt,$cbiimg);
    return $data;
   
} // end CU_CBI




Beau


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sat Feb 12, 2011 11:06 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Beau,
I think you may have a misunderstanding of the role the variables named in a function definition actually do.

In the line
Code:
function CU_CBI($inTemp,$inTempUOM,$inHumidity) {

the CU_CBI function has three arguments with symbolic names (used ONLY inside the function itself) of $inTemp,$inTempUOM,$inHumidity . When the function is actually called (earlier in the CU-defs.php script by
Code:
list($chandler,$chandlertxt,$chandlerimg) = CU_CBI($temperature,$uomtemp,$humidity);


The current value of $temperature is assigned to the function's $inTemp variable, the value of $uomtemp is assigned to the function's $inTempUOM variable, and the value of $humidity is assigned to the function's $inHumidity variable.

The assignments for $temperature,$uomtemp,$humidity happen further up the CU-defs.php source at
Code:
$uomtemp = $WX['tempunit'];

$temperature = $WX['temp'];

$humidity = $WX['hum'];

So the function is really calculating the CBI based on the outside temperature and unit-of-measure and outside relative humidity.

Using functions allow you to isolate calculations and pass information to the function from different sources. The function definition statement just serves to declare the function name, and the internal(to the function) variable names that will receive argument values when the function is called.

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Mon Feb 14, 2011 12:16 am 
Offline
User avatar

Joined: Sun Sep 28, 2008 11:54 pm
Posts: 535
Location: Komoka, ON Canada
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Any one using Cumulus with Ken's templates would you post the link here? I'd like to get some ideas on adding Cumulus features. My test is http://www.komokaweather.com/wxindex.php

Paul

_________________
Davis Vantage Pro 2 - CWOP DW3930 - WU IONTARIO226 - PWS Weather KOMOKA - AWEKAS 6890
Windows-8
Cumulus v1.9.3 b.1059
www.komokaweather.ca
www.komokaweather.com
www.komokaweather.com/weather/sunrecord ... today.html
Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Mon Feb 14, 2011 4:05 am 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Now available .. a updates page you can query to find out what's changed since you downloaded the Beta or Release versions of the template sets. If your query results in changed files being listed, you can also click on a link to download a .zip file with all the changed scripts. The page also allows you to save the selections for easy use next time (requires browser cookies to be enabled).

Enjoy!

http://saratoga-weather.org/wxtemplates/updates.php

BTW.. I strongly recommend that all Beta testers and new Release users try the page and download the fixes :)

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Tue Feb 15, 2011 8:24 pm 
Offline

Joined: Sun May 10, 2009 8:52 pm
Posts: 502
Location: Springfield, IL
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
hi ken on you las ajax-dashboard it was missing a </div> at the end
it wood not pass w3c
beau


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Tue Feb 15, 2011 11:57 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
That wasn't a ajax-dashboard issue, it was a missing </div> in the old wxindex.php .. just replace that file.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Feb 17, 2011 1:11 am 
Offline
User avatar

Joined: Sat Mar 20, 2010 1:01 am
Posts: 112
Location: Elvas, Portugal
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Hello Cumulus colleagues!

I have been testing this amazing template from Ken! With Ken help of course ;), and now I have found a problem.

I want to send to my web host a file: CUtags.txt. But when upload this file hte cumulus have to rename that file to CUtags.php. Then in my web the Ken script work with it.

The problem is cumulus do not upload and rename that file. I'm using the Cumulus beta release v1.9.1 (build 974).

Thank you in advance.

_________________
Kind Regards, Manuel.

Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Feb 17, 2011 1:23 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1852
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
If it's a 'realtime' (often uploaded) type file;

Internet options => Files

Left-hand panel - Local (PC) file
Right-hand panel - webhost/newfilename

Realtime - checked, ftp - checked, and if processed by Cumulus - checked

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Feb 17, 2011 6:47 pm 
Offline
User avatar

Joined: Sat Mar 20, 2010 1:01 am
Posts: 112
Location: Elvas, Portugal
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
beteljuice wrote:
If it's a 'realtime' (often uploaded) type file;

Internet options => Files

Left-hand panel - Local (PC) file
Right-hand panel - webhost/newfilename

Realtime - checked, ftp - checked, and if processed by Cumulus - checked



But it's like you have said that I have cumulus configured.

Look at my print screens:

Image

Image

Somebody have an answer?

_________________
Kind Regards, Manuel.

Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Feb 17, 2011 7:10 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
You don't have a remote path to CUtags.php .... something like /folder/CUtags.php so the file goes to ? You can set ftp-logging for a while.

The CUtags.php don't need the realtime ticked so the setting for that file is good.

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Feb 18, 2011 1:25 am 
Offline
User avatar

Joined: Sat Mar 20, 2010 1:01 am
Posts: 112
Location: Elvas, Portugal
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
nitrx wrote:
You don't have a remote path to CUtags.php .... something like /folder/CUtags.php so the file goes to ? You can set ftp-logging for a while.

The CUtags.php don't need the realtime ticked so the setting for that file is good.


Thank you very much! :clap:

I did what you said and it works fine now!

This is the link for my temporary tests: http://www.meteoelvas.com/estacao/wxindex.php

Once again I am thankful to Ken, for the given help! :D

_________________
Kind Regards, Manuel.

Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Feb 18, 2011 2:50 am 
Offline

Joined: Sun May 10, 2009 8:52 pm
Posts: 502
Location: Springfield, IL
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Hi Ken
were can fdl_low.gif fdl_low.gif be found also is cbi in the ajaxcu
thanks Beau


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Feb 18, 2011 3:22 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1770
Location: World...
Weather Station: No weather station
Operating System: No operating system
n9mfk wrote:
were can fdl_low.gif fdl_low.gif be found
Beau the 'fire danger' files are not part of the templates - I have attached the 'fdl_images.zip' file in case those are the images you are looking for.

If, instead, you are looking for the 'fire weather' files, they are include in the 'usa' template set an can be found in the 'ajax-images' sub-directory.

n9mfk wrote:
also is cbi in the ajaxcu
Neither the 'cbi' nor the 'fwi' have been include into the 'ajaxCUwx.js' or the 'ajax-dashboard.php' files as Cumulus does not produce data for the fire weather.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Feb 18, 2011 12:28 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Hi Ken,
My php-ajax template doesn't work as I wish I've mentioned before that I've no decimals in the temperatue (I use a comma in Cumulus) although this site http://www.meteoelvas.com/estacao/wxindex.php (not mine) shows the values with decimals (comma's)

I think it's something with the date notation in my CUtags.php the date is 18-2-2011 (day month year) but the date on my site is http://www.apeldoorn.tk/weer/wxindex.php 18/12/1999 (day december ?? 1999 ?? so very strange..) The page doesnt update by itself most values are correct allthough..

The CUtags.php is updated every 15 minutes and realtime.txt every 60 secs , the status page doesnt update for Cumulus weather data this is because the date is wrong I think.. the date notation in my realtime.txt is 18-02-11 (dd-mm-yy) I hope there will be a solution

BTW on your instruction page
Quote:
You should now be able to see a data file on your website
http://www.yourwebsite.com/realtime.txt

This file will be used by the ajaxCUwx.js JavaScript to provide AJAX updates to your pages.

It seems there is a code in ajaxCUwx.js looking for a 'valid' realtime.txt


Update I think the wrong readings have more to do with my WUtag.php http://www.apeldoorn.tk/weer/CUtags.php?sce=dump
Regards Ron

_________________
Ron

Image

Apeldoorn, The Netherlands


Last edited by nitrx on Fri Feb 18, 2011 2:41 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 796 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 54  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group