Author Topic: wxriverpage etc  (Read 9405 times)

0 Members and 1 Guest are viewing this topic.

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxriverpage etc
« Reply #25 on: June 01, 2024, 08:50:45 PM »
Got it working.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #26 on: June 01, 2024, 09:08:49 PM »
You know, it's harder to debug if you change the default directories, but it seems to be working now on your site.
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 gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2625
    • SouthEast Lincoln, NE Weather
Re: wxriverpage etc
« Reply #27 on: June 01, 2024, 09:21:06 PM »
Thanks, Ken, for your usual incredible job of keeping our sites up to date. I've loaded the mods and everything seems to be working well except for some extraneous symbols. I haven't delved into the scripts to see what's going on with them, but the down arrow in this screenshot shows what I mean:



Thanks again for an incredible job, Ken! Much appreciated. =D> \:D/ =D> [tup]

The url is https://www.gwwilkins.org/wxriverpage.php
« Last Edit: June 01, 2024, 09:25:15 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline DW7240

  • Senior Contributor
  • ****
  • Posts: 240
    • The Vicarage Weather Feed
Re: wxriverpage etc
« Reply #28 on: June 01, 2024, 10:12:02 PM »
Thanks Ken......

Fortunately I checked at least every other day on here to see what updates if any are needed and not showing on check version php.  Great work on this awesome script which has been available for the past few years.

A Happy weather website creator and user....

Nick. dw7240.com


Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 542
    • Tyler Texas Weather
Re: wxriverpage etc
« Reply #29 on: June 02, 2024, 02:45:00 PM »
Ken,
I'm trying to find a way to disable the Map/Layers box that takes up half the display from popping up when the page is loaded. I can 'X' it closed, but would prefer it not get displayed initially. Have you found a list of the parameters that can be passed in the URL for water.noaa.gov? I'm hoping there might be one regarding that box.

Thanks,

Steve

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #30 on: June 02, 2024, 05:02:46 PM »
Hi Steve,
I tried to not open the box too.. no luck.  Let me know if you find the secret sauce to keep it closed when accessing the map at open.
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 tmabell

  • Forecaster
  • *****
  • Posts: 440
    • Mishawaka Weather
Re: wxriverpage etc
« Reply #31 on: June 02, 2024, 05:05:52 PM »
I've been playing around a little bit I discovered that if you widen the iframe width to about 1040 pixels and then adjust your map center locations in the configuration file that you can hide that nasty slide in menu.

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 243
Re: wxriverpage etc
« Reply #32 on: June 02, 2024, 07:56:19 PM »
I got my Summery page looking nice.
https://www.weathercat.net/wxriverpage2.php

On the Details page I noticed the oldest date is on top in the Observation section, I thought it was the newest on top before. Any way to change this?
On the Forecast section there is an entry with the date of Wednesday 12/31/1969 04:00 PM. Can this be suppressed.
https://www.weathercat.net/wxriverdetail.php?id=BTEC1

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 242
    • Vermilion weather
Re: wxriverpage etc
« Reply #33 on: June 02, 2024, 08:36:33 PM »
Working fine on my website. Thanks Ken.
http://vermilionweather.com/rivers.php
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2625
    • SouthEast Lincoln, NE Weather
Re: wxriverpage etc
« Reply #34 on: June 03, 2024, 01:58:56 PM »
I suspect that my problem related above
 
Thanks, Ken, for your usual incredible job of keeping our sites up to date. I've loaded the mods and everything seems to be working well except for some extraneous symbols. I haven't delved into the scripts to see what's going on with them, but the down arrow in this screenshot shows what I mean:



Thanks again for an incredible job, Ken! Much appreciated. =D> \:D/ =D> [tup]

The url is https://www.gwwilkins.org/wxriverpage.php
with the erroneous forecast buttons has to do not with your script, Ken, but with the data the NWPS is serving. The buttons are still there, but when you look at the individual forecast graphs they don't reflect what the buttons are predicting, except of course the lone green button at this time.
In short, I don't think your script is the problem, Ken!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline tmabell

  • Forecaster
  • *****
  • Posts: 440
    • Mishawaka Weather
Re: wxriverpage etc
« Reply #35 on: June 03, 2024, 08:17:20 PM »
Ken, I'm using PHP 8.2.16 and I'm not sure if it's something to do with my server settings but I'm seeing this error repeatedly in the server logs for wxriverpage.php:

Quote
[Mon Jun 03 14:32:45.887006 2024] [php:warn] [pid 31884:tid 600] [client 52.22.66.203:60825] PHP Warning:  strtotime(): Epoch doesn't fit in a PHP integer in C:\\www\\wxriverpage.php on line 231
[Mon Jun 03 14:32:45.887006 2024] [php:warn] [pid 31884:tid 600] [client 52.22.66.203:60825] PHP Warning:  strtotime(): Epoch doesn't fit in a PHP integer in C:\\www\\wxriverpage.php on line 239

The lines throwing this error are:

Quote
while($data1<strtotime($old)){

and

Quote
$timechange=(strtotime($ObsTime)-strtotime($old));
« Last Edit: June 03, 2024, 08:20:22 PM by tmabell »

Offline tmabell

  • Forecaster
  • *****
  • Posts: 440
    • Mishawaka Weather
Re: wxriverpage etc
« Reply #36 on: June 05, 2024, 05:30:14 PM »
So are we to ignore this PHP warning and disable error reporting?  The error log is filling up  ](*,)

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #37 on: June 05, 2024, 06:04:01 PM »
Some of the entries for validTime in the JSON for various gauges contains '0001-01-01T00:00:00Z' and the script doesn't (yet) handle that.
I suggest you turn off error reporting on that page for now.. I'm working multiple issues with the wxriver scripts and not yet ready to release updates.
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #38 on: June 07, 2024, 05:13:16 PM »
I've done some major rework of 3 scripts to support gauges where primary=flow and secondary=stage (instead of the usual primary=stage and secondary=flow) in the JSON.  The Observations in the data are oldest to newest (unlike the former XML which was newest to oldest) so that is what is displayed.  This also handles funky color processing when record/forecast flows are in units different from Observed units.

Let me know how V4.01 works for you.  Three scripts updated ./River/river-fetch.php, wxriverpage.php, wxriverdetail.php

BTW.. I still have to address the invalid date in validDate entries on some gauges..  will be in a further update.

« Last Edit: June 07, 2024, 05:16:10 PM by saratogaWX »
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 tigerbait

  • Senior Member
  • **
  • Posts: 55
    • Ellerbe Weather
Re: wxriverpage etc
« Reply #39 on: June 07, 2024, 05:28:05 PM »
Looks great.  All colors working.  As always Ken we can't thank you enough for the work you put in for us weather enthusiast.

Thank you,
Alan
https://www.sporttiger.com
Davis VP2 Weather Display
Saratoga scripts

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2625
    • SouthEast Lincoln, NE Weather
Re: wxriverpage etc
« Reply #40 on: June 07, 2024, 07:00:20 PM »
Working great here, Ken!

Thanks very much  =D&gt; =D&gt; =D&gt; \:D/ \:D/ \:D/
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 243
Re: wxriverpage etc
« Reply #41 on: June 07, 2024, 07:22:42 PM »
Thanks Ken.

Any chance we can get the option to sort the Observation from newest to oldest?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #42 on: June 07, 2024, 09:28:04 PM »
I'll add that to the list of stuff to simplify the scripts (and address the bogus validTime errata)
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 Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 566
    • Up Country Maui Weather
Re: wxriverpage etc
« Reply #43 on: June 22, 2024, 09:36:57 PM »
Hi All,

Checking my River Page and it is completely busted at http://www.dwayneyamato.com/wx/wxriverpage.php

I updated some of the scripts but no joy.

Suggestions and recommendations very much welcome.

Aloha,

--Stan Y.
  Maui, Hawaii
 
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #44 on: June 22, 2024, 10:46:10 PM »
The old wxriver.php and river-fetch.php no longer work due to the change of AHPS to NWPS website.  They no longer offer the XML files needed by those scripts.  For now, I'd remove them from your menu and stop any cron job runnng River/river-fetch.php as it will not succeed in getting data.

I'm (slowly) rewriting the scripts to use the available JSON feeds, but it is a hard slog and I'm not done.  No ETA on when it will be finished at this time.
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 mkutche

  • Forecaster
  • *****
  • Posts: 1054
    • GosportWx.com
Re: wxriverpage etc
« Reply #45 on: July 01, 2024, 03:17:08 AM »
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline tigerbait

  • Senior Member
  • **
  • Posts: 55
    • Ellerbe Weather
Re: wxriverpage etc
« Reply #46 on: July 30, 2024, 09:36:20 AM »
Hi All,
My river page is now only grabbing 3 river readings for weeks. https://www.sporttiger.com/wxriverpage.php I have 22 gauges I track.  Here is the error log.
Code: [Select]
Stack trace:
#0 {main}
  thrown in /home/****/public_html/River/river-fetch.php on line 31
[15-Jun-2023 06:45:53 America/Chicago] PHP Warning:  simplexml_load_file(): ./river-FLTA4.txt:2: parser error : Extra content at the end of the document in /home/****/public_html/River/river-fetch.php on line 176
[15-Jun-2023 06:45:53 America/Chicago] PHP Warning:  simplexml_load_file(): &lt;b&gt;Fatal error&lt;/b&gt;:  Call to a member function query() on a non-object in &lt;b&gt;/ww in /home/****/public_html/River/river-fetch.php on line 176
[15-Jun-2023 06:45:53 America/Chicago] PHP Warning:  simplexml_load_file(): ^ in /home/****/public_html/River/river-fetch.php on line 176/code]
https://www.sporttiger.com
Davis VP2 Weather Display
Saratoga scripts

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #47 on: July 30, 2024, 10:07:39 AM »
I think you need to update to the V4.01 version of ./River/river-fetch.php, wxriverpage.php, wxriverdetail.php to work with the NWPS website .. the old AHPS website XML files are no longer available.

See this post https://www.wxforum.net/index.php?topic=46245.msg474369#msg474369 for a download.
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 tigerbait

  • Senior Member
  • **
  • Posts: 55
    • Ellerbe Weather
Re: wxriverpage etc
« Reply #48 on: July 30, 2024, 04:19:40 PM »
Ken I had those files, but went ahead & reinstalled.  Still pulling just the 3 rivers.   ](*,)
https://www.sporttiger.com
Davis VP2 Weather Display
Saratoga scripts

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxriverpage etc
« Reply #49 on: July 30, 2024, 08:02:12 PM »
It may have pulled more than 3 rivers, but something in one of the JSON files is causing the page to stop after displaying 3 rivers.

Please post your ./River/river-config.php here and I'll try to replicate the issue for debugging.  Also post the text file from the cron job that runs river-fetch.php.

These aren't original scripts by me, so I'd unfortunately not included extra debugging stuff in them like I usually do.  #-o

It would also help to add the following after the starting <?php on wxriverpage.php:
Quote
error_reporting(E_ALL);
ini_set('display_errors','1');
so we can see where the Fatal error is happening.
« Last Edit: July 30, 2024, 08:33:12 PM by saratogaWX »
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