If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Error regarding USNO Sunmoon data

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Error regarding USNO Sunmoon data

Postby Toxic17 » Sat Apr 01, 2017 1:08 am

Warning: Invalid argument supplied for foreach() in /share/htdocs/weather/get-USNO-sunmoon.php on line 359

Warning: Invalid argument supplied for foreach() in /share/htdocs/weather/get-USNO-sunmoon.php on line 368

I have deleted USNO-moondata.txt

but when it refreshes I get this inside.

HTTP/1.1 404 Not Found
Date: Sat, 01 Apr 2017 01:05:01 GMT
Server: Apache
Content-Length: 209
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /rstt/oneday was not found on this server.</p>
</body></html>


looks like the source is dead.

$USNOUrl = "http://199.211.133.93/rstt/oneday?date=$lclToday&coords=$myLat,$myLong&tz=$myTZOffset";
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
saratogaWX
Posts: 829
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Error regarding USNO Sunmoon data

Postby saratogaWX » Sat Apr 01, 2017 4:48 pm

Wow, they seem to have 'pruned' the site and the links to the One Day http://aa.usno.navy.mil/data/docs/RS_OneDay.php is 404-Not found
as are all references to an 'API'.

Hopefully, it's a temporary issue .. I'll send a note and ask about the future of those functions. Would be a shame to lose the only worldwide and accurate API for the moon ephemeris from the net...

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Error regarding USNO Sunmoon data

Postby Toxic17 » Sat Apr 01, 2017 4:56 pm

saratogaWX wrote:Wow, they seem to have 'pruned' the site and the links to the One Day http://aa.usno.navy.mil/data/docs/RS_OneDay.php is 404-Not found
as are all references to an 'API'.

Hopefully, it's a temporary issue .. I'll send a note and ask about the future of those functions. Would be a shame to lose the only worldwide and accurate API for the moon ephemeris from the net...


Thanks Ken!
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Error regarding USNO Sunmoon data

Postby Toxic17 » Sun Apr 02, 2017 12:16 am

saratogaWX wrote:Wow, they seem to have 'pruned' the site and the links to the One Day http://aa.usno.navy.mil/data/docs/RS_OneDay.php is 404-Not found
as are all references to an 'API'.



looks like everything has gone!

http://www.usno.navy.mil/USNO/astronomi ... a-services

Data Services
Rise/Set/Transit/Twilight Data

  • Complete Sun and Moon Data for One Day
  • Table of Sunrise/Sunset, Moonrise/Moonset, or Twilight Times for an Entire Year
  • Rise/Set/Transit Times for Major Solar System Objects and Bright Stars
  • Duration of Daylight/Darkness Table for One Year

Phases of the Moon

  • Dates of Primary Phases of the Moon
  • Fraction of the Moon Illuminated
  • What the Moon Looks Like Now
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

Simnm
Posts: 4
Joined: Tue Nov 15, 2016 11:11 pm
Weather Station: Vantage Pro2
Operating System: Windows 10

Re: Error regarding USNO Sunmoon data

Postby Simnm » Sun Apr 02, 2017 1:43 am

Thank saratogaWX

User avatar
saratogaWX
Posts: 829
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Error regarding USNO Sunmoon data

Postby saratogaWX » Sun Apr 02, 2017 9:48 pm

I did post a comment to the webmaster on the usno.navy.mil site asking about the missing scripts/API functions.

Haven't heard from them yet...

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Error regarding USNO Sunmoon data

Postby Toxic17 » Sun Apr 02, 2017 11:53 pm

Yep me too. hopefully someone will answer on monday morning.
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Error regarding USNO Sunmoon data

Postby beteljuice » Mon Apr 03, 2017 2:47 am

Perhaps D.T. has determined the Sun and Moon is important to those of a certain following and issued an executive descision ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
saratogaWX
Posts: 829
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Error regarding USNO Sunmoon data

Postby saratogaWX » Mon Apr 03, 2017 3:21 pm

:lol: However, we feel more like :bash: based on the pronouncements. Mostly, many of us are just :oops: :o :shock: :?

The good news is that the USNO site is back operational. Guess they restored the missing PHP scripts to the site for the queries. :groan:

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Error regarding USNO Sunmoon data

Postby Toxic17 » Mon Apr 03, 2017 5:02 pm

saratogaWX wrote::lol: However, we feel more like :bash: based on the pronouncements. Mostly, many of us are just :oops: :o :shock: :?

The good news is that the USNO site is back operational. Guess they restored the missing PHP scripts to the site for the queries. :groan:


I think the whole DATA folder was missing.
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
saratogaWX
Posts: 829
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Error regarding USNO Sunmoon data

Postby saratogaWX » Mon Apr 03, 2017 5:30 pm

But... the API is now working again. From a view-source of your homepage
<!-- get-USNO-sunmoon.php - Version 2.04 - 11-Nov-2015 -->
<!-- refetch seconds=3600 -->
<!-- using Cached version of ./cache/USNO-moondata.txt -->
<!-- unchunking response -->
<!-- in=860 out=860 bytes -->
<!-- processing JSON entries for Moon data -->
<!-- json_decode returns - No errors -->
<!-- note: 'curphase' not in JSON. Used 'closestphase' instead. -->
<!-- note: 'fracillum' not in JSON, 'illumination' set to '50%' based on moon phase of 'First Quarter'. -->
<!-- USNOdata
Array
(
[beginciviltwilight] => 06:13
[beginciviltwilightdate] => 03/04/2017
[sunrise] => 06:50
[sunrisedate] => 03/04/2017
[suntransit] => 13:26
[suntransitdate] => 03/04/2017
[sunset] => 20:03
[sunsetdate] => 03/04/2017
[endciviltwilight] => 20:40
[endciviltwilightdate] => 03/04/2017
[moonset] => 02:49
[moonsetdate] => 03/04/2017
[moonrise] => 11:20
[moonrisedate] => 03/04/2017
[moontransit] => 19:33
[moontransitdate] => 03/04/2017
[moonsetnext] => 03:44
[moonsetnextdate] => 04/04/2017
[moonphase] => First Quarter
[illumination] => 50%
[hoursofpossibledaylight] => 13:13
)
-->
:clap:

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Error regarding USNO Sunmoon data

Postby Toxic17 » Mon Apr 03, 2017 5:48 pm

saratogaWX wrote:But... the API is now working again. From a view-source of your homepage


yep thats right, just the data folder was completely missing from http://aa.usno.navy.mil/data/ when the error appeared. looks liek all the links are now working again from that site:

http://www.usno.navy.mil/USNO/astronomi ... a-services
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
Toxic17
Posts: 526
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Error regarding USNO Sunmoon data

Postby Toxic17 » Wed May 03, 2017 2:54 pm

I'm seeing problems again with this script. anyone else? looks like the site is down.
Regards Simon
https://www.conligwx.org
https://www.conligwx.org/pws/
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
PaulMy
Posts: 1537
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Error regarding USNO Sunmoon data

Postby PaulMy » Wed May 03, 2017 3:14 pm

Yes, I also get this:
http://www.komokaweather.com/komokaweat ... ronomy.php
Warning: Invalid argument supplied for foreach() in /home/content/96/5379896/html/komokaweather-ca/get-USNO-sunmoon.php on line 359
Warning: Invalid argument supplied for foreach() in /home/content/96/5379896/html/komokaweather-ca/get-USNO-sunmoon.php on line 368


Paul

User avatar
saratogaWX
Posts: 829
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Error regarding USNO Sunmoon data

Postby saratogaWX » Wed May 03, 2017 3:57 pm

This time, their DNS is fine, it's just the server that's having a problem.
<!-- loading ./cache/USNO-moondata.txt from http://api.usno.navy.mil/rstt/oneday?da ... 4323&tz=-7 -->
<!-- GET /rstt/oneday?date=05/03/2017&coords=37.27153397,-122.02274323&tz=-7 HTTP/1.1
Host: api.usno.navy.mil Port: 80 IP=199.211.133.93-->
<!-- Network error: Connection timed out (110) -->
<!-- HTTP stats: dns=0.136 conn=5.008 put=n/a get( blocks)=n/a close=n/a total=5.144 secs -->
<!-- fetch function elapsed= 5 secs. -->


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 3 guests