Author Topic: UPDATED: Script to Display US and Territories Radar Using HAniS  (Read 31314 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #125 on: February 21, 2017, 03:06:25 PM »
After the NWS 'https://' changes there were a couple of problems with this script in 'wxusradar-hanis-iframe3.php' that killed the animation even after I dropped in the correctly specified url's.  The CURL script wasn't working, so I purloined a couple of lines from get-nnvl-iod.php's CURL routine.  This still wasn't solving the problem because of associated 'a http' entries that weren't image names and which cluttered up the 'preg_match_all' function rendering it flummoxed and useless, like I was.  :-)

The solution was a simple addition to the regex specification changing it from '/(a href\=\")([^\?]*)(\")/i' to '/(a href\=\")([^\/\?]*)(\")/i'.

The revised script is working here on my site.  Possibly delayed loading is due to the 'radar-status-getradar.php' which is modified from Ken True's 'radar-status.php'  The only changes were to the iframe script which can be downloaded, then saved using this link to the source.  It has been reversioned, as have the main and the includes script both of which are otherwise unchanged..
« Last Edit: February 21, 2017, 03:13:46 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #126 on: February 21, 2017, 03:55:31 PM »
After the NWS 'https://' changes there were a couple of problems with this script in 'wxusradar-hanis-iframe3.php' that killed the animation even after I dropped in the correctly specified url's.  The CURL script wasn't working, so I purloined a couple of lines from get-nnvl-iod.php's CURL routine.  This still wasn't solving the problem because of associated 'a http' entries that weren't image names and which cluttered up the 'preg_match_all' function rendering it flummoxed and useless, like I was...

Your updated script is working great on my site Jerry. Than you for your efforts in solving the problems afflicting your script.

I had tried updating the URL(S) in the 'wxusradar-hanis-iframe.php script but knew I would have to rely upon you or one of the other more knowledgeable coders to solve the problem when that change was unsuccessful.

A great script working again...thanks Jerry
Randy Whitney
W7RSW


Offline satcop

  • Senior Contributor
  • ****
  • Posts: 241
    • Clifton Virginia Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #127 on: February 21, 2017, 06:53:44 PM »
Thank you Jerry;

The fix is working fine and now I have another page with that little green lock.

Bob
Clifton, Virginia Weather


Blitzortung Stations 1189, 1451 - CWOP EW1675

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #128 on: February 22, 2017, 12:03:03 PM »
Just to be picky (because I haven't in a long time!  :roll: ) your 'using this link to the source' for wxusradar-hanis-iframe3.php brings a non-reversioned script showing Version 4b (20170121). Assuming just the date was missed as the script appears to be working at http://tiggrweather.net/wxusradars-hanis3.php.

Thanks for the fixes.
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #129 on: February 22, 2017, 04:42:30 PM »
Just to be picky (because I haven't in a long time!  :roll: ) your 'using this link to the source' for wxusradar-hanis-iframe3.php brings a non-reversioned script showing Version 4b (20170121). Assuming just the date was missed as the script appears to be working at http://tiggrweather.net/wxusradars-hanis3.php.

Thanks for the fixes.
Actually, John, I just fat-fingered it. #-o  The correct date is now in the file on my web site.  You can just manually change the date to '20170221' if you want. :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #130 on: February 22, 2017, 05:36:16 PM »
Just wanted to be sure there were no changes in that script.

Thanks.
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #131 on: February 22, 2017, 06:53:04 PM »
Umm...well...there are some changes, enough so that I've reversioned the script to V5 20170222.  After Ken True posted his updated 'radar-status.php', I saw the need to incorporate his changes into this script's 'radar-status-getradar.php'.  Then it turns out that the Elgin AFT, FL radar site, KEVX, is going to be down all week so the site isn't generating any images at all.  KEVX proved to be a useful boundary test case in 'wxusradar-hanis-iframe3.php' as well as helping me with the status script.

All of the files except the HAniS directory are newly versioned with changes mainly to the above-mentioned scripts.  Load it up and try to look at the Elgin AFB, FL radar just to see what happens.  The iframe script will fall over if the number of images on the NWS server is less than the number of images requested or if there are no images at all, which happens to be the case currently with KEVX.  Requesting 26 images also causes the iframe script to fall over, as it will if there happen to be fewer images on the NWS server than are requested.

Don't forget to adjust the settings in 'wxusradars-hanis3.php' to your preferred site and parameters.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #132 on: February 23, 2017, 11:17:46 AM »
To use SSL or Not?  You might find this interesting: https://www.nutsandboltsmedia.com/does-your-website-really-need-ssl/

If you're not allowing any user input or asking for any user input of potentially sensitive information, your site could still be hacked, but it's much more difficult to do.  I understand the 'trust' issue is important to many, but my site is what it is, SSL or Not.
« Last Edit: February 23, 2017, 11:22:38 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #133 on: February 26, 2017, 12:24:04 AM »
I finally scrolled down to the bottom of this page and discovered that I had placed an extra </div> in 'inc-wxusradars-hanis3.php' at line 795.  Here is the revised script.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline RainAlwaysRain

  • Member
  • *
  • Posts: 23
    • WoodinvilleWX
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #134 on: February 26, 2017, 05:09:36 AM »
Thanks for the quick fix on this.

By the way, a new Radar site came online for the Washington state coast a few years back. I keep adding this manually, just fyi:

Code: [Select]
<option value="lgx"<?php echo (($radarLoc=="lgx")?' selected="selected"':'')?>>Langley Hill</option>

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #135 on: February 26, 2017, 08:29:57 AM »
Thanks for the quick fix on this.

By the way, a new Radar site came online for the Washington state coast a few years back. I keep adding this manually, just fyi:

Code: [Select]
<option value="lgx"<?php echo (($radarLoc=="lgx")?' selected="selected"':'')?>>Langley Hill</option>
Thanks for the heads-up!  I've added this site to the script and reversioned it '5a (20170226)'.

Somehow my zip file was corrupted!  This one should be OK.
« Last Edit: February 26, 2017, 09:00:27 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #136 on: February 26, 2017, 11:42:32 AM »
Great job Jerry. I have it back on my site !!!  \:D/

Jeff
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #137 on: February 26, 2017, 01:08:39 PM »
Not that it's any big deal, but I mistakenly versioned 5a 20170126 rather than 20170226.

Fixed in the new 5a zip above.

Edit:  Somehow the first 5a zip was corrupted.  The new 5a above is OK.
« Last Edit: February 26, 2017, 09:01:03 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #138 on: March 05, 2017, 03:52:47 PM »
I have downloaded what I believe to be the latest files for this script. I still only get the last frame showing the radar.

The page can be seen at www.scannorthcounty.net/wxusradars-hanis3.php

The wxusradars-hanis3-iframe3.php shows as version 3

Any suggestions as what I should check

Thanks, John


John
Westminster, MA USA

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #139 on: March 05, 2017, 04:36:06 PM »
The wxusradars-hanis3-iframe3.php shows as version 3
That filename is not exactly correct - should be wxusradar-hanis-iframe3. Perhps just a slip of the fingers, perhaps really the wrong file.

The correct files are in Jerry's 5a download a few messages up from this (you have to be logged in to see the link). Try downloading that again.
John
W7JKG

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #140 on: March 05, 2017, 05:15:17 PM »
I have the correct file, I just copied the wrong file name. It did come from the link below.

Any other thoughts?

John
John
Westminster, MA USA

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #141 on: March 05, 2017, 07:27:13 PM »
I have the correct file, I just copied the wrong file name. It did come from the link below.

Any other thoughts?

John
You've modified 'wxusradar-hanis-iframe3.php'.  Reload the original version that will default to 'KOAX' when loaded by itself.  This default will be overridden by your settings in 'wxusradars-hanis3.php' when the radar display is called by 'inc-wxusradars-hanis3.php'.  This set of scripts should run as intended when you modify ONLY the Settings section in the main script.  Same goes for 'inc-wxusradars-hanis3.php': reload the original version.

I can load your Boston radar on my site, so it should work as I've described.
« Last Edit: March 05, 2017, 07:31:16 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #142 on: March 05, 2017, 07:55:06 PM »
I have the correct file, I just copied the wrong file name. It did come from the link below.

Any other thoughts?

John
You've modified 'wxusradar-hanis-iframe3.php'.  Reload the original version that will default to 'KOAX' when loaded by itself.  This default will be overridden by your settings in 'wxusradars-hanis3.php' when the radar display is called by 'inc-wxusradars-hanis3.php'.  This set of scripts should run as intended when you modify ONLY the Settings section in the main script.  Same goes for 'inc-wxusradars-hanis3.php': reload the original version.

I can load your Boston radar on my site, so it should work as I've described.

Made the corrections - now working as it should. Was reading too much into the instructions. Thanks for the assistance.

John
John
Westminster, MA USA

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #143 on: March 05, 2017, 07:58:09 PM »
Glad we got it sorted out, John.  Enjoy! :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #144 on: March 06, 2017, 08:38:12 PM »
I made all of the updates and everything appears to be working well.

However, I do not remember where to change the default radar site to my local radar KILN. Can anyone help?

Thanks,

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #145 on: March 06, 2017, 10:41:30 PM »
...
However, I do not remember where to change the default radar site to my local radar KILN. Can anyone help?
...
Joe
In the main script, wxusradars-hanis3.php, there's a settings section:
Code: [Select]
/************************* Settings *****************************/
$radar = 'N0R'; // Default radar type is set here
$radarLoc = 'oax'; // IMPORTAMT!!! Default radar location is set here
Change 'oax' to your preferred radar location.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #146 on: March 06, 2017, 11:00:15 PM »
...
However, I do not remember where to change the default radar site to my local radar KILN. Can anyone help?
...
Joe
In the main script, wxusradars-hanis3.php, there's a settings section:
Code: [Select]
/************************* Settings *****************************/
$radar = 'N0R'; // Default radar type is set here
$radarLoc = 'oax'; // IMPORTAMT!!! Default radar location is set here
Change 'oax' to your preferred radar location.

Thank you!

I knew it was simple, just couldn't remember which script.
All is good.
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #147 on: June 08, 2017, 01:31:42 PM »
This version, dated 20170427, uses a later version of HAniS that will skip any missing images, whose box at the bottom of the display then remains maroon.

Please review this thread if you experience problems with this script.

I've attached a zip in order to include an updated 'radar-status-getradar.php' and the appropriate HAniS script.  The zip includes no instructions, hence the need to review this thread.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #148 on: November 05, 2017, 06:53:45 PM »
I know this is an older thread but I've just noticed that my radars are only displaying returns on the last frame. I seem to remember this being mentioned as a problem quite some time ago but I don't remember what the resolution, if any, was for the issue. Can someone please help refresh my memory on this? I am running the latest version of the wxusradars-hanis.zip script (20170427).

Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6367
    • Valentine Nebraska's Real-Time Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #149 on: November 05, 2017, 07:05:23 PM »
I'm running the wxusradars-hanis3.php and its working. Version 5 (20170122)
« Last Edit: November 05, 2017, 07:07:54 PM by ValentineWeather »
Randy

 

anything