Author Topic: clientraw help and location  (Read 4353 times)

0 Members and 1 Guest are viewing this topic.

Offline MEnewbie

  • Member
  • *
  • Posts: 2
clientraw help and location
« on: December 19, 2007, 08:58:52 AM »
I am new to PHP and I downloaded the thermometer script to use on my page. I'm a bit confused... I changed the ticker marks so that it displays a high of 55 and a low of 5.
However, the temperature is reading 41° - which clearly isn't the case here in Maine.

First - Where do I change my location?
Second - Is my clientraw.txt file suppose to be empty? If not, what am I placing there?

Any help would be greatly appreciated.

B :-(

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: clientraw help and location
« Reply #1 on: December 19, 2007, 10:45:23 AM »
Hi and welcome to the forum and PHP programming  :grin:

The thermometer.php script has several settings inside the script
Code: [Select]
//------------ settings ------------------
$wxSoftware         = 'WD';                           // set to 'VWS' to use VWS WeatherFlash files
//
$UOM = 'F';                                           // set to 'C' for Celsius/Centigrade, 'F'=Fahrenheit
//
$autoScale = true;                                    // set to false to disable autoscale.
//
// you only have to set one of these correctly based on the $useWD selection
// $wxSoftware = 'WD' : set the $clientrawfile
// $wxSoftware = 'VWS': set the $wflashDir
//
$clientrawfile = './clientraw.txt';                // relative file address for WD clientraw.txt
$wflashDir     = './wflash/Data/';                 // directory for the the VWS wflash.txt and wflash2.txt files
//                                                 // relative to directory location of this script (include
//                                                 // trailing '/' in the specification
//
Based on your questions, I'm assuming your using Weather-Display (clientraw.txt) and want the temperature displayed in Celsius/Centigrade (range 55 to 5).
Is your Weather-Display uploading clientraw.txt to the same directory as the thermometer.php script?  If so, no change is needed to the script.  If not, then change $clientrawfile = './clientraw.txt'; to point to the relative file address of your clientraw.txt file.   It would help if you would put your website address in your profile.

To change to Celsius/Centigrade, just change $UOM = 'F'; to $UOM = 'C;

To change the default range from 40 to -5C to 55 to 5C, just change
Code: [Select]
// Centigrade settings
$TmaxC = 40;      // maximum °C temperature on thermometer
$TminC = -10;     // minimum °C temperature on thermometer
to
Code: [Select]
// Centigrade settings
$TmaxC = 55;      // maximum °C temperature on thermometer
$TminC = 5;     // minimum °C temperature on thermometer

Hope this helps..
Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline MEnewbie

  • Member
  • *
  • Posts: 2
Re: clientraw help and location
« Reply #2 on: December 19, 2007, 11:23:53 AM »
I actually wish to keep the thermometer in F, but it's cold here, so I changed the settings to 40 and then adjusted to -5.

The thermometer reads 32 now though - and the clientraw file is empty.

The clientraw file is located in the same directory as Thermometer.php and thermometer-blank.png

My page:  http://student107.ucb.sephone.us/thermometer.php
(yes I'm a student)

B

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Senior Contributor
  • ****
  • Posts: 193
  • Davis Vantage Pro2+ with full FARS
Re: clientraw help and location
« Reply #3 on: December 19, 2007, 11:32:42 AM »
(yes I'm a student)

Nothing wrong with that... normally.  :lol:
All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: clientraw help and location
« Reply #4 on: December 19, 2007, 03:03:15 PM »
The thermometer reads 32 now though - and the clientraw file is empty.
The clientraw file being empty is the reason for it showing 32F as the current condition ('empty'='0'C='32'F).
You'll need to use WD's Control Panel, Web Files/Web Page/Realtime FTP, Real time client ftp TAB to enable clientraw.txt updates to your site.  Also your main internet switch (on the Control Panel, FTP &Connections, Connections TAB needs to be ON and your FTP Host settings on that panel need to be filled in to make the FTP connection work.

Student or not, we're all learning :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP