Author Topic: weatherlink.com API-v2 not usable for templates (?)  (Read 682 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1990
    • My PWS at Leuven Belgium Europe
weatherlink.com API-v2 not usable for templates (?)
« on: April 18, 2020, 05:47:44 AM »
The country is in "lockdown-light", my wife and I are in the high-risk group, so no visits, 1 hour outside, yes we know the drill.
For "husband appreciation day" I got the "on-top_of_my_list" present last week, a WeatherLink-Live device.
Today I started  to update the Leuven-Template and the PWS_dashboard to use the v2-API. Not yet available for (real or simulating) IP-loggers. But the WLL is "fully" supported by the v2_api => https://weatherlink.github.io/v2-api/

v2API is somewhat more complicated compared to the old API, but well documented
=> https://weatherlink.github.io/v2-api/authentication

No problem loading the latest measurement (optimistically named  /current/{station-id})
"Returns current conditions data for a weather station selected by a station ID passed as a path parameter."
To be honest, it is the latest measurement, up to 15 minutes old. Not really current.
The data part for the ISS contains 68 items of which
37 are about rain (clicks/mm/in - 2 min -> 24 hours -> month year a.s.o.)
12 about wind (direction,  speed 1min - 10 min)
1 temp, 1 chill, 1 thw, 1 wetbulb, 1 dew, 1 heat   a.s.o.
And a dozen or so technical items for their programmers

NO high-lows ? Were did they move the high-lows?   Maybe in the history: /historic/{station-id}
"Returns historic data for a weather station selected by a station ID passed as a path parameter, within a given time range."
Well the history spans up to 24 hours, albeit not in the "free" plan, you need an extra paid for plan and no high/lows either.

There are no daily, monthly, yearly high-lows for your WLL.
The same high-lows an average weather-station owner want to display on its website.

Davis want you to use a weather-program/computer  to load the free 15 minute or , extra paid for, 1 minute data to calculate the high-lows. Or a  weahter-program which can  get the data from the WLL in your LAN, no need to use a v2API.

My first conclusion:
If Davis ends the current xml API a lot of station owners which are using the xml for their website, will need to find another solution as the v2API is not usable for a weather-website.

Because you can not switch to v2API when it is available for your "WeatherLink IP / Vantage Connect / WeatherLink Network Annual Subscription".  In Record Types available: https://weatherlink.github.io/v2-api/data-structure-types the line which read "High/Low Record" is changed into "High/Low Record (deprecated)"

Wim

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1990
    • My PWS at Leuven Belgium Europe
Re: weatherlink.com API-v2 not usable for templates (?)
« Reply #1 on: April 18, 2020, 06:00:05 AM »
I forgot, if you are using an Davis IP-logger and are using the XML for your website:

Make a note of the device-id (mac address) of your Davis IP-logger and store it on a save place
If the IP-logger fails (as "a lot" of them are doing according to topics on this forum), you can not buy a new one and continue to use, as they are "out-of-stock / obsolete".

Buy an USB logger and buy (or assemble yourself) a Meteobridge which then can continue to upload to WL.com by mimicking your broken IP-logger. That gives you ample time to move  / adapt your website-scripts from the xml-API to a more modern approach.  I tested this and it works.

Or, I did not test this myself,  buy a WiFi-logger which can do the same trick of mimicking the broken IP-logger. You still need another weather-program when Davis drops the xmlAPI.

Probably there are multiple other working solutions, please post hem here.

Wim

Offline havtrail

  • Senior Contributor
  • ****
  • Posts: 206
    • Haverford Weather Station
Re: weatherlink.com API-v2 not usable for templates (?)
« Reply #2 on: April 18, 2020, 10:37:45 PM »
Wow, you have a "husband appreciation day"?   :shock:

Rich K.
Onset HOBO RX2102 Cellular
https://www.havtrail.com/weather/
NEWA https://newa.cornell.edu Haverford, PA

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1990
    • My PWS at Leuven Belgium Europe
Re: weatherlink.com API-v2 not usable for templates (?)
« Reply #3 on: April 19, 2020, 03:00:35 AM »
Wow, you have a "husband appreciation day"?   :shock:

Rich K.

Yes, it is not as known as fathers-day: https://nationaltoday.com/husband-appreciation-day/
And in Covid-19 lockdown Quarantine times, letís try to make any day a more pleasant day

Wim