Author Topic: WL API v2  (Read 652 times)

0 Members and 1 Guest are viewing this topic.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
WL API v2
« on: August 20, 2020, 12:54:35 AM »
Hi guys,

question for someone who tried to use the API V2 from WeatherLink.

Am I correct in thinking that there is a major bug in the API, where rain is not displayed? Three users of Meteotemplate gave me access to their api keys and secrets, in all cases there are parameters:

rain_day_mm
rain_day_in
rain_day_clicks

and similarly for month and rain. While the "clicks" parameter is always some number, the remaining two are blank. Is there some universal multiplier that I should multiply the "clicks" by to get the number? Is this the same for all Davis stations?

And if so, why are there the other parameters if they are not used.... only making it confusing.

Or am I missing something?


Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1140
    • Wilmslow Astro
Re: WL API v2
« Reply #1 on: August 20, 2020, 04:15:49 AM »
I'm not sure where you are seeing those fields? I don't see them in historic or current records.

In the current conditions record I see all the fields populated...
Code: [Select]
"rain_size": 2,
"rain_rate_last": 0,
"rain_rate_hi": 0,
"rainfall_last_15_min": 0,
"rain_rate_hi_last_15_min": 0,
"rainfall_last_60_min": 0,
"rainfall_last_24_hr": 15,
"rain_storm": 140,
"rain_storm_start_at": 1597553520,
"rainfall_daily": 5,
"rainfall_monthly": 219,
"rainfall_year": 2277,
"rain_storm_last": 51,
"rain_storm_last_start_at": 1597187460,
"rain_storm_last_end_at": 1597377661

Regarding clicks, you need to know the bucket size (inch or mm), that is defined in rain_size.

The API is documented here: https://weatherlink.github.io/v2-api/
Mark

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1140
    • Wilmslow Astro
Re: WL API v2
« Reply #2 on: August 20, 2020, 06:54:31 AM »
Ah, you are querying a VP2 station, I am querying a WLL, but according to the API documentation the WLL current data should be sending those rainfall _mm _in fields, but it isn't. It just provides the unit agnostic tip count fields.

I don't actually use the rainfall totals from the current conditions (only the storm values) in Cumulus so I've never noticed the discrepancy.
Mark

Offline Bigbaywx

  • Member
  • *
  • Posts: 1
    • BigbayWx
Re: WL API v2
« Reply #3 on: August 22, 2020, 07:48:13 AM »
While the "clicks" parameter is always some number, the remaining two are blank. Is there some universal multiplier that I should multiply the "clicks" by to get the number? Is this the same for all Davis stations?

FWIW

Taking the cover of the rain gauge off and looking under the tipping bucket a little graphic says each 'click' equals .01

 

anything