cloudy cloudy

Author Topic: WxSim Temperature Forecast Comparison Script  (Read 174090 times)

0 Members and 1 Guest are viewing this topic.

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win XP
  • Firefox 51.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1125 on: June 16, 2017, 09:21:01 AM »
T-man,

Those errors appear to be from the http://veikkola-weather.com/WU-forecast.php script, so start looking there.  Did you update that too?

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Online saratogaWX

  • Global Moderator
  • Posts: 5,685
  • Ken True
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win NT 10.0
  • Firefox 54.0
    • Saratoga Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1126 on: June 16, 2017, 03:50:58 PM »
The issue with WU-forecast.php is the URL you are using for the conditions can't be parsed for use with the api.wunderground.com
Quote
<!-- WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 on PHP 5.6.30 -->
<!-- WU_API Raw URL='https://www.wunderground.com/personal-weather-station/dashboard?ID=IETELSUO12#history' -->
<!-- loading from . -->
<!-- curl fetching '' -->
<!-- Error: <url> malformed -->
<!-- HTTP stats:  RC=0 dest= port=0 (from sce=)
      Times: dns=0.000 conn=0.000 pxfer=0.000 total=0.000 secs -->
<!-- headers:

 -->
<!-- RC=, bytes=0 -->
<!-- saved cache to ./WU-forecast-json-0-en.txt (0 bytes) -->
<!-- using charsetInput='UTF-8' charsetOutput='ISO-8859-1' doIconv='1' doRTL='' -->
<!-- processing JSON entries for forecast -->
<!-- rawJSON size is 0 bytes -->
<!-- WU_prepareJSON: Success. Valid UTF-8. -->
<!-- json_decode returns  - No errors -->

Change the URL to

https://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=60.266%2C24.449&sp=IETELSUO12

or

https://www.wunderground.com/q/zmw:00000.54.02758

 and the script will likely work for you.
« Last Edit: June 16, 2017, 03:52:47 PM by saratogaWX »
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline Leavening Weather Station

  • Posts: 249
  • Leavening Weather Station (NYORKS:UK)
  • Leavening, North Yorkshire, UK
  • OS/Browser:
  • Mac OS X 10.11.6
  • Safari 10.1.1
    • Leavening Weather Station
Re: WxSim Temperature Forecast Comparison Script
« Reply #1127 on: June 19, 2017, 09:05:29 AM »
Greetings!

It's very likely that I'm using an ancient version of Jim's brilliant FART script but I noticed today that I have some errors building up in my log :-

[19-Jun-2017 09:55:28 Europe/London] PHP Warning:  date() expects parameter 2 to be long, string given in /home/ruralter/public_html/leavening.org/wxsim/forecast-compare-include.php on line 926

Line 926 contains this :-
echo '>' . date($FCdatestr,$entry[0]) . '</option>' . "\n";

My ability in php is very limited and I can't see what's causing this. I am assuming its something blindly obvious to anyone who knows what they're talking about.

Any ideas ?

Many thanks & kind regards from the UK which is pushing 30C for a change, hotter than Barbados yesterday apparently ;-)

The script lives here :- http://www.leavening.org/wxsim/fartindex.php

I also see that the Nordic comparison always has high and low as the same temperature. Which makes WXSim always win ;-)

Simon.
Weather Information from Leavening, Ryedale, North Yorkshire, UK


Offline T-man

  • Posts: 178
  • Finland
  • OS/Browser:
  • iOS 10.3.2
  • Safari 10.0
    • Sää Tuulensuunkaari
Re: WxSim Temperature Forecast Comparison Script
« Reply #1128 on: June 19, 2017, 10:01:44 AM »
The issue with WU-forecast.php is the URL you are using for the conditions can't be parsed for use with the api.wunderground.com
Change the URL to

https://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=60.266%2C24.449&sp=IETELSUO12

or

https://www.wunderground.com/q/zmw:00000.54.02758

 and the script will likely work for you.

Thank you. I'll give that a try today.

//Timo

Offline T-man

  • Posts: 178
  • Finland
  • OS/Browser:
  • Mac OS X 10.12.5
  • Safari 10.1.1
    • Sää Tuulensuunkaari
Re: WxSim Temperature Forecast Comparison Script
« Reply #1129 on: June 19, 2017, 01:40:49 PM »
Thank You ! Problem solved by changing WU_URL as advised.

//Timo

Offline grwkak

  • Posts: 36
  • OS/Browser:
  • Win NT 10.0
  • Chrome 59.0.3071.115
Re: WxSim Temperature Forecast Comparison Script
« Reply #1130 on: August 01, 2017, 12:44:53 AM »
Trying to implement this script - little unclear on:
"The variables $maxtempyest and $mintempovernight must be made available either through addition to testtags.php or by other means."

I am using Cumulus as my weather software - any suggestions/tips on what to do - don't see anything obvious in the Cumulus forums - this file appears to be WD related.

I can get Cumulus to process a file and upload the data for maxtempyesterday and mintempovernight - but when trying the compare script it tells me that
The temperature variables must be initialized by running testtags.php or some other mechanism

Running testtags.php (by calling through a browser) does not help. 

Guy
« Last Edit: August 01, 2017, 01:34:40 AM by grwkak »

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 54.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1131 on: August 01, 2017, 10:26:24 AM »
Guy,

Why don't you attach a copy of the file that Cumulus is processing for you so I can understand better.  A link to your site would be good too.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline grwkak

  • Posts: 36
  • OS/Browser:
  • Win NT 10.0
  • Chrome 59.0.3071.115
Re: WxSim Temperature Forecast Comparison Script
« Reply #1132 on: August 01, 2017, 09:27:54 PM »
No problem.  Here is the file that Cumulus processes (testtags.txt) it generates testtags.php

The scripts are in www.wilsonsweather.host-ed.me/forecast/

So the compare would be: http://www.wilsonsweather.host-ed.me/forecast/forecast-compare-include.php

The error has changed to configuration file not found - not sure why (I have been playing with root directory location in the scripts, but changed it back to the default).

Guy
« Last Edit: August 01, 2017, 09:30:13 PM by grwkak »

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 54.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1133 on: August 01, 2017, 09:58:30 PM »
Guy,

Please rename the attached include file without the .txt and upload that.  Hopefully that will fix the path problem which I think I caused in the file from the .zip.

Then please have Cumulus process the attached testtags.txt file.  I've added code so we can view the actual output that it gives us by adding ?sce=view to the url.

Thanks.  - Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline grwkak

  • Posts: 36
  • OS/Browser:
  • Win NT 10.0
  • Chrome 59.0.3071.115
Re: WxSim Temperature Forecast Comparison Script
« Reply #1134 on: August 01, 2017, 10:56:53 PM »
Running testtags.php?sce=view (which is what I think you mean?) simply displays www.wilsonsweather.host-ed.me

Guy

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 54.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1135 on: August 01, 2017, 11:19:20 PM »
I'd say the next step is to find out where testtags.php actually is because it doesn't seem to exist at http://www.wilsonsweather.host-ed.me/forecast/testtags.php.  Perhaps Cumulus is uploading to the wrong place?

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline grwkak

  • Posts: 36
  • OS/Browser:
  • Win NT 10.0
  • Chrome 59.0.3071.115
Re: WxSim Temperature Forecast Comparison Script
« Reply #1136 on: August 02, 2017, 12:48:29 AM »
It seems to be there - if you go to http://www.wilsonsweather.host-ed.me/forecast/ its there - and I can see it in the directory when I use my FTP client.  Odd.

Guy

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 54.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1137 on: August 02, 2017, 01:14:49 AM »
That is very odd.  When we try to run that script we get redirected to your main page.  I don't know why that would happen, perhaps someone else has an idea?

Why don't you post that testtags.php here so we can see what it looks like.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline grwkak

  • Posts: 36
  • OS/Browser:
  • Win NT 10.0
  • Chrome 59.0.3071.115
Re: WxSim Temperature Forecast Comparison Script
« Reply #1138 on: August 02, 2017, 09:20:36 AM »
Here it is.

The files all sit in html_public/forecast/ tried using that - no difference.

Guy

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 54.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1139 on: August 02, 2017, 09:44:56 AM »
Guy,

Let's remove the downloader code that I added in testtags.txt to make sure that isn't somehow causing the redirect.  Otherwise I'm out of ideas.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager