Author Topic: WU-History now works with WU/TMC API...  (Read 13448 times)

0 Members and 1 Guest are viewing this topic.

Offline weerheerhugowaard

  • Member
  • *
  • Posts: 3
    • Weerheerhugowaard
Re: WU-History now works with WU/TMC API...
« Reply #175 on: May 13, 2020, 12:42:27 PM »
Thank you Ken.
it works  [tup]

Offline jachen

  • Member
  • *
  • Posts: 39
    • Neue Wetterstation Widen
Re: WU-History now works with WU/TMC API...
« Reply #176 on: June 28, 2020, 05:32:24 AM »
Finding this hint saved me hours of headaching.

Thank you very much Professor Ken True.

Offline RBK

  • Member
  • *
  • Posts: 13
    • Lisle Weather
Re: WU-History now works with WU/TMC API...
« Reply #177 on: June 28, 2020, 05:57:23 PM »
Well, no success here and I can't figure out what's wrong.

lisleweather.com

WUID = KNYLISLE3

WCAPIkey = 4b82dbdaa082441382dbdaa082941326
« Last Edit: June 28, 2020, 06:54:44 PM by RBK »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History now works with WU/TMC API...
« Reply #178 on: June 28, 2020, 06:59:04 PM »
If I run view-source:https://lisleweather.com/WXDailyHistory.php?ID=KNYLISLE3&month=06&day=28&year=2020&format=1&graphspan=day&debug=y

I see
Quote
<!-- HTTP stats:  RC=401 dest=104.69.4.52
      Times: dns=1.011 conn=1.044 pxfer=1.163 get=0.034 total=1.198 secs -->
<!-- headers returned:
HTTP/1.1 401 Unauthorized
Content-Type: text/html
Content-Length: 133
Expires: Sun, 28 Jun 2020 22:53:03 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Sun, 28 Jun 2020 22:53:03 GMT
Connection: keep-alive
 -->
and the cache contents shows
Code: [Select]
{
  "metadata": {
    "transaction_id": "##############"
  },
  "success": false,
  "errors": [
    {
      "error": {
        "code": "CDN-0001",
        "message": "Invalid apiKey."
      }
    }
  ]
}

Check that you're using a NEW WU/TWC API key (not the key you'd used with the old WU-forecast.php)
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 RBK

  • Member
  • *
  • Posts: 13
    • Lisle Weather
Re: WU-History now works with WU/TMC API...
« Reply #179 on: June 28, 2020, 07:02:05 PM »
If I run view-source:https://lisleweather.com/WXDailyHistory.php?ID=KNYLISLE3&month=06&day=28&year=2020&format=1&graphspan=day&debug=y

I see
Quote
<!-- HTTP stats:  RC=401 dest=104.69.4.52
      Times: dns=1.011 conn=1.044 pxfer=1.163 get=0.034 total=1.198 secs -->
<!-- headers returned:
HTTP/1.1 401 Unauthorized
Content-Type: text/html
Content-Length: 133
Expires: Sun, 28 Jun 2020 22:53:03 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Sun, 28 Jun 2020 22:53:03 GMT
Connection: keep-alive
 -->
and the cache contents shows
Code: [Select]
{
  "metadata": {
    "transaction_id": "##############"
  },
  "success": false,
  "errors": [
    {
      "error": {
        "code": "CDN-0001",
        "message": "Invalid apiKey."
      }
    }
  ]
}

Check that you're using a NEW WU/TWC API key (not the key you'd used with the old WU-forecast.php)
I generated a new key today, that's what's got me stumped. I included the key in my post if that helps any.

OK, it seems that I had entries incorrect in WXDailyHistory.php. It seems to be working now.

« Last Edit: June 28, 2020, 07:23:35 PM by RBK »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History now works with WU/TMC API...
« Reply #180 on: June 28, 2020, 07:44:28 PM »
Great... don't forget to preload all the back data (from 2008 on is only available) using the method listed in the README.md
With that done once, you'll have all the data available for prior month/year queries.
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 RBK

  • Member
  • *
  • Posts: 13
    • Lisle Weather
Re: WU-History now works with WU/TMC API...
« Reply #181 on: June 28, 2020, 07:46:14 PM »
I did preload each year and that worked well.

Thank you sir!  [tup]

Offline jachen

  • Member
  • *
  • Posts: 39
    • Neue Wetterstation Widen
Re: WU-History now works with WU/TMC API...
« Reply #182 on: July 16, 2020, 09:39:18 AM »
Not sure if right but hang on my problem here:

There is one day of rain data (actually July 3, 2020) which is there but is not being transferred to monthly and yearly tables.

See day csv:
view-source:https://meteo.widen-online.ch/WXDailyHistory.php?ID=IAARGAUW3&month=07&day=3&year=2020&format=1&graphspan=day&debug=yes

Looking at monthly or yearly data July 3 row is missing:

https://meteo.widen-online.ch/wxwuhistory.php?ID=IAARGAUW3&month=7&day=3&year=2020&units=M&mode=3
 
I gave up trying to debug after several hours.

Wishing good health to everybody!

 

anything