Author Topic: WeatherLink.com API for data retrieval  (Read 3209 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6649
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
WeatherLink.com API for data retrieval
« on: January 09, 2018, 07:43:41 PM »
Wim,
I sent you an email with the response I got from Davis about the API.  The good news is that there IS an API replacement to the xml.php script, and it is available in both XML and JSON format.  The bad news is that it now requires the Davis Device ID and Davis Key (along with the weatherlink.com password for the registered user 'owning' the station).

I've rewritten slightly the WLCOM-plugin to use the new API and tested it with both a V1 website system and a V2 website system (both are WeatherLink 6.0.3 software submissions).  See here for more info.

What I don't know is how easy/hard it is to get the Device ID/Key for WLIP owners (since I don't have WLIP available).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6649
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WeatherLink.com API for data retrieval
« Reply #1 on: January 09, 2018, 07:52:33 PM »
For the record, here was the query I posted to the Davis Webmaster:
Quote
Gentlefolks,

With the V1.0 of weatherlink.com, you offered the xml.php script to obtain weather station conditions using user:pass access.

That appears to be missing in the V2.0 of your website.  Wim van der Kuil and I both wrote plugins for our weather software PHP website templates to allow users of the IP interface to have their own personal weather websites while submitting data directly to weatherlink.com.

Are there any plans (or could plans be made) to offer a similar interface (authenticated by user:pass) to return either the current XML data or a JSON equivalent?  It would be really helpful if you could do this.

My template set:  https://saratoga-weather.org/wxtemplates/  and the WLCOM V1.0 plugin configuration at
https://saratoga-weather.org/wxtemplates/Settings-config-WLCOM.php

Thanks in advance!

--

Best regards,
Ken

I received their response today
Quote
As a registered Davis API user you are receiving this email as a notice of important and upcoming changes to WeatherLink.com and its API.  Very soon, but no earlier than Nov 27, 2017, we will release a new website at weatherlink.com.  This new site will have, among other new features, a new live weather data page, the ability to graph your historical data and one username for all your Davis equipment that is pushing data to us.

When this site goes live, any new user added to the Davis network will be registered into this new site.  Customers who have previously registered will stay on the original version of weatherlink.com until we migrate them over to the new site in the coming months.

How you use the API to access data from users registered on the new site will change. Since the new site allows for one username for many weather stations your API call now must reference not the username and password but the DID and the account password.

·         You can still use the old method to access data from users registered on the original site... at least for a few months until all original users are migrated to the new site.

·         The new method will retrieve data from both sites... systems added to the new website AND older systems added to the original website.  You can use this new URL for all registered users.

·         If you have problems making this change quickly there is a workaround that will allow you to register new users on the original website even after the new site goes live... at least for a few months until all original users are migrated to the new site.

You’ll notice below that the URL is essentially the same but you will substitute the DID into the “user” field.

OLD method – Can only be used to access data registered on the original website.

XML
Current Conditions
http://api.weatherlink.com/v1/NoaaExt.xml?user=username&pass=password&apiToken=tokenID

Station Meta Data
http://api.weatherlink.com/v1/StationStatus.xml?user=username&pass=password&apiToken=tokenID

JSON
Current Conditions
http://api.weatherlink.com/v1/NoaaExt.json?user=username&pass=password&apiToken=tokenID

Station Meta Data
http://api.weatherlink.com/v1/StationStatus.json?user=username&pass=password&apiToken=tokenID

NEW method – can access data on both the original website and the new website

XML
Current Conditions
http://api.weatherlink.com/v1/NoaaExt.xml?user=DID&pass=password&apiToken=tokenID

Station Meta Data
http://api.weatherlink.com/v1/StationStatus.xml?user=DID&pass=password&apiToken=tokenID

JSON
Current Conditions
http://api.weatherlink.com/v1/NoaaExt.json?user=DID&pass=password&apiToken=tokenID

Station Meta Data
http://api.weatherlink.com/v1/StationStatus.json?user=DID&pass=password&apiToken=tokenID


DID=DeviceID
tokenID = Key

The XML returned from the query uses the same structure as the prior xml.php script returned, so no changes were needed there :)
« Last Edit: January 09, 2018, 07:56:28 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline dalecoy

  • Forecaster
  • *****
  • Posts: 6266
    • Lee's Summit, MO
Re: WeatherLink.com API for data retrieval
« Reply #2 on: January 09, 2018, 07:55:22 PM »
What I don't know is how easy/hard it is to get the Device ID/Key for WLIP owners (since I don't have WLIP available).

I don't have a WLIP.  I had no problem legitimately getting a DID and Key.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8567
    • Meteotemplate
Re: WeatherLink.com API for data retrieval
« Reply #3 on: January 09, 2018, 08:01:38 PM »
MT only uses current conditions from the XML, will that remain?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6649
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WeatherLink.com API for data retrieval
« Reply #4 on: January 09, 2018, 08:55:37 PM »
Yes, the structures are mostly identical.  I've attached my stations old and new API queries to see them both.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1224
    • Support site Leuven Template and scripts
Re: WeatherLink.com API for data retrieval
« Reply #5 on: January 10, 2018, 03:35:47 AM »
Wim,
 . . shortened . .

What I don't know is how easy/hard it is to get the Device ID/Key for WLIP owners (since I don't have WLIP available).
That DID is printed on a sticker on their WLIP.
Current owners of a WLIP do not have an apiToken, key or tokenID.
They do not need to as they are only accessing their own data.
They access their data using the xml request with username / password which were set up when they registered at weatherlink.com after their WLIP started sending data.

Big question: Do all these users need to get their own API-key?
Preliminary answer: Or is it the version 2 key they will get when they are moved to v2.

username  => v1 username as used on the website to get the blue window?
https://www.weatherlink.com/user/wvdkuil/index.php?view=main&headers=1

password => v1 password as used on the website to get to the account info?

How do these WLIP v1 users get the apiToken.
All data is on v1, no v2 account possible as that will be automatically done later this year ?

Today we use this simple https://www.weatherlink.com/xml.php?user=wvdkuil&pass=******

We could, if we get an apiToken, use for our v1 data:
http://api.weatherlink.com/v1/NoaaExt.xml?user=wvdkuil&pass=******&apiToken=?????

Changing the scripts for the differences is not a big deal, but what is the procedure for an owner to get that API-key now to test the new links? AND can they use the same API

=== New and remaining questions:
Pro account needed for WLIP owners?
My test v2 account is now the basic one after the trial period AND that does not allow me to access my own data. Just the bullitin
Quote
Upgrade to WeatherLink Pro to view Data
The Data section allows you to access all your raw sensor data at the click of a button. You can sort by date/time or data type and export any data set directly to an Excel-friendly .csv file. Upgrade to WeatherLink Pro to start using charts today!
$3.95 / month
Maybe that is the cause that I will not get the api working at all.

Are the high-low values updated 1/ hour?
As the archive records are uploaded only 1/hour, does that also affects the high-low values in the API data? The v1 high-lows seems to be updated more frequent.

Still in a positive as their seems to be a solution, and ample time to get the scrips adapted to function before and after the roll-over from v1 to v2.

Wim
« Last Edit: January 10, 2018, 03:57:21 AM by wvdkuil »
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #6 on: January 10, 2018, 03:49:36 AM »
What I don't know is how easy/hard it is to get the Device ID/Key for WLIP owners (since I don't have WLIP available).

Every device uploading to the weatherlink.com platform has a DID (either the MAC address for hardware devices like WLIP  - printed on the device's label - or Connect or a 'virtual' one in the case of the WLfW software).

I'm not sure that the tokenID is the same as the key, which may just be a string for initial sign-up. It may be a separate UUI-type token that you need to obtain from Davis on a per-account basis (remember that on WLC2, one account can have many stations reporting to it). Certainly, the CSV downloads from WLC2 need a UUI-type token.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #7 on: January 10, 2018, 04:04:31 AM »
Just checked out the JSON URL and it seems to work OK with one of our stations on the 2.0 platform, for which we have the special token. For anyone interested the JSON array returned (probably needs parsing externally) is:

{"credit":"Davis Instruments Corp.","credit_URL":"http:\/\/www.davisnet.com","disclaimer_url":"http:\/\/www.davisnet.com\/about\/terms.asp","copyright_url":"http:\/\/www.davisnet.com\/about\/terms.asp","privacy_policy_url":"http:\/\/www.davisnet.com\/about\/privacy.asp","image":{"url":"http:\/\/www.weatherlink.com\/images\/Logo_Davis_reflxblu.jpg","title":"Davis WeatherLink","link":"http:\/\/www.weatherlink.com"},"suggested_pickup":"15 minutes after the hour","suggested_pickup_period":"60","dewpoint_c":"6.7","dewpoint_f":"44.0","dewpoint_string":"44.0 F (6.7 C)","heat_index_c":"7.2","heat_index_f":"45.0","heat_index_string":"45.0 F (7.2 C)","location":"Ely, England, UK","latitude":"52.40168","longitude":"0.26157","observation_time":"Last Updated on Jan 10 2018, 9:01 am GMT","observation_time_rfc822":"Wed, 10 Jan 2018 09:01:49 +0000","pressure_in":"29.569","pressure_mb":"1001.3","pressure_string":"1001.3 mb","relative_humidity":"96","station_id":"Prodata","temp_c":"6.9","temp_f":"44.5","temperature_string":"44.5 F (6.9 C)","wind_degrees":"206","wind_dir":"Southwest","wind_kt":"0.0","wind_mph":"0.0","windchill_c":"7.2","windchill_f":"45.0","windchill_string":"45.0 F (7.2 C)","davis_current_observation":{"DID":"001D0A00023B","station_name":"Ely-JGD","observation_age":18,"dewpoint_day_high_f":"44","dewpoint_day_high_time":"7:41am","dewpoint_day_low_f":"42","dewpoint_day_low_time":"12:00am","dewpoint_month_high_f":"50","dewpoint_month_low_f":"25","dewpoint_year_high_f":"50","dewpoint_year_low_f":"25","heat_index_day_high_f":"45","heat_index_day_high_time":"7:41am","heat_index_month_high_f":"52","heat_index_year_high_f":"52","pressure_day_high_in":"29.602","pressure_day_high_time":"12:00am","pressure_day_low_in":"29.540","pressure_day_low_time":"4:59am","pressure_month_high_in":"30.359","pressure_month_low_in":"29.015","pressure_tendency_string":"Rising Slowly","pressure_year_high_in":"30.359","pressure_year_low_in":"29.015","rain_day_in":"0.0000","rain_month_in":"0.5200","rain_rate_day_high_in_per_hr":"0.0000","rain_rate_hour_high_in_per_hr":"0.0000","rain_rate_in_per_hr":"0.0000","rain_rate_month_high_in_per_hr":"1.1300","rain_rate_year_high_in_per_hr":"1.1300","rain_storm_in":"0.0000","rain_year_in":"0.5200","relative_humidity_day_high":"96","relative_humidity_day_high_time":"7:35am","relative_humidity_day_low":"94","relative_humidity_day_low_time":"12:00am","relative_humidity_month_high":"97","relative_humidity_in":"34","relative_humidity_in_day_high":"36","relative_humidity_in_day_high_time":"6:13am","relative_humidity_in_day_low":"31","relative_humidity_in_day_low_time":"12:00am","relative_humidity_in_month_high":"52","relative_humidity_in_month_low":"25","relative_humidity_in_year_high":"52","relative_humidity_in_year_low":"25","sunrise":"8:04am","sunset":"4:16pm","temp_day_high_f":"44.5","temp_day_high_time":"7:41am","temp_day_low_f":"43.1","temp_day_low_time":"12:00am","temp_month_high_f":"51.0","temp_month_low_f":"29.8","temp_year_high_f":"51.0","temp_year_low_f":"29.8","temp_in_day_high_f":"67.1","temp_in_day_high_time":"9:00am","temp_in_day_low_f":"56.6","temp_in_day_low_time":"6:32am","temp_in_f":"67.1","temp_in_month_high_f":"70.3","temp_in_month_low_f":"52.4","temp_in_year_high_f":"70.3","temp_in_year_low_f":"52.4","wind_day_high_mph":"7.0","wind_day_high_time":"12:36am","wind_month_high_mph":"10.0","wind_ten_min_avg_mph":"0.0","wind_ten_min_gust_mph":"0.0","wind_year_high_mph":"10.0","windchill_day_low_f":"43","windchill_day_low_time":"12:00am","windchill_month_low_f":"30","windchill_year_low_f":"30"},"time_to_generate":"0.007430 seconds"}

Edit: Re-parsed version:

{
"credit":"Davis Instruments Corp.",
"credit_URL":"http://www.davisnet.com",
"disclaimer_url":"http://www.davisnet.com/about/terms.asp",
"copyright_url":"http://www.davisnet.com/about/terms.asp",
"privacy_policy_url":"http://www.davisnet.com/about/privacy.asp",
"image":{
"url":"http://www.weatherlink.com/images/Logo_Davis_reflxblu.jpg",
"title":"Davis WeatherLink",
"link":"http://www.weatherlink.com"
},
"suggested_pickup":"15 minutes after the hour",
"suggested_pickup_period":"60",
"dewpoint_c":"6.7",
"dewpoint_f":"44.0",
"dewpoint_string":"44.0 F (6.7 C)",
"heat_index_c":"7.2",
"heat_index_f":"45.0",
"heat_index_string":"45.0 F (7.2 C)",
"location":"Ely, England, UK",
"latitude":"52.40168",
"longitude":"0.26157",
"observation_time":"Last Updated on Jan 10 2018, 9:01 am GMT",
"observation_time_rfc822":"Wed, 10 Jan 2018 09:01:49 +0000",
"pressure_in":"29.569",
"pressure_mb":"1001.3",
"pressure_string":"1001.3 mb",
"relative_humidity":"96",
"station_id":"Prodata",
"temp_c":"6.9",
"temp_f":"44.5",
"temperature_string":"44.5 F (6.9 C)",
"wind_degrees":"206",
"wind_dir":"Southwest",
"wind_kt":"0.0",
"wind_mph":"0.0",
"windchill_c":"7.2",
"windchill_f":"45.0",
"windchill_string":"45.0 F (7.2 C)",
"davis_current_observation":{
"DID":"001D0A00023B",
"station_name":"Ely-JGD",
"observation_age":18,
"dewpoint_day_high_f":"44",
"dewpoint_day_high_time":"7:41am",
"dewpoint_day_low_f":"42",
"dewpoint_day_low_time":"12:00am",
"dewpoint_month_high_f":"50",
"dewpoint_month_low_f":"25",
"dewpoint_year_high_f":"50",
"dewpoint_year_low_f":"25",
"heat_index_day_high_f":"45",
"heat_index_day_high_time":"7:41am",
"heat_index_month_high_f":"52",
"heat_index_year_high_f":"52",
"pressure_day_high_in":"29.602",
"pressure_day_high_time":"12:00am",
"pressure_day_low_in":"29.540",
"pressure_day_low_time":"4:59am",
"pressure_month_high_in":"30.359",
"pressure_month_low_in":"29.015",
"pressure_tendency_string":"Rising Slowly",
"pressure_year_high_in":"30.359",
"pressure_year_low_in":"29.015",
"rain_day_in":"0.0000",
"rain_month_in":"0.5200",
"rain_rate_day_high_in_per_hr":"0.0000",
"rain_rate_hour_high_in_per_hr":"0.0000",
"rain_rate_in_per_hr":"0.0000",
"rain_rate_month_high_in_per_hr":"1.1300",
"rain_rate_year_high_in_per_hr":"1.1300",
"rain_storm_in":"0.0000",
"rain_year_in":"0.5200",
"relative_humidity_day_high":"96",
"relative_humidity_day_high_time":"7:35am",
"relative_humidity_day_low":"94",
"relative_humidity_day_low_time":"12:00am",
"relative_humidity_month_high":"97",
"relative_humidity_in":"34",
"relative_humidity_in_day_high":"36",
"relative_humidity_in_day_high_time":"6:13am",
"relative_humidity_in_day_low":"31",
"relative_humidity_in_day_low_time":"12:00am",
"relative_humidity_in_month_high":"52",
"relative_humidity_in_month_low":"25",
"relative_humidity_in_year_high":"52",
"relative_humidity_in_year_low":"25",
"sunrise":"8:04am",
"sunset":"4:16pm",
"temp_day_high_f":"44.5",
"temp_day_high_time":"7:41am",
"temp_day_low_f":"43.1",
"temp_day_low_time":"12:00am",
"temp_month_high_f":"51.0",
"temp_month_low_f":"29.8",
"temp_year_high_f":"51.0",
"temp_year_low_f":"29.8",
"temp_in_day_high_f":"67.1",
"temp_in_day_high_time":"9:00am",
"temp_in_day_low_f":"56.6",
"temp_in_day_low_time":"6:32am",
"temp_in_f":"67.1",
"temp_in_month_high_f":"70.3",
"temp_in_month_low_f":"52.4",
"temp_in_year_high_f":"70.3",
"temp_in_year_low_f":"52.4",
"wind_day_high_mph":"7.0",
"wind_day_high_time":"12:36am",
"wind_month_high_mph":"10.0",
"wind_ten_min_avg_mph":"0.0",
"wind_ten_min_gust_mph":"0.0",
"wind_year_high_mph":"10.0",
"windchill_day_low_f":"43",
"windchill_day_low_time":"12:00am",
"windchill_month_low_f":"30",
"windchill_year_low_f":"30"
},
"time_to_generate":"0.007430 seconds"
}
« Last Edit: January 10, 2018, 04:17:14 AM by johnd »
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #8 on: January 10, 2018, 04:08:52 AM »
And XML here:

<current_observation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:noNamespaceSchemaLocation="http://www.weather.gov/view/current_observation.xsd">
<credit>Davis Instruments Corp.</credit>
<credit_URL>http://www.davisnet.com</credit_URL>
<disclaimer_url>http://www.davisnet.com/about/terms.asp</disclaimer_url>
<copyright_url>http://www.davisnet.com/about/terms.asp</copyright_url>
<privacy_policy_url>http://www.davisnet.com/about/privacy.asp</privacy_policy_url>
<image>
<url>
http://www.weatherlink.com/images/Logo_Davis_reflxblu.jpg
</url>
<title>Davis WeatherLink</title>
<link>http://www.weatherlink.com</link>
</image>
<suggested_pickup>15 minutes after the hour</suggested_pickup>
<suggested_pickup_period>60</suggested_pickup_period>
<dewpoint_c>6.7</dewpoint_c>
<dewpoint_f>44.0</dewpoint_f>
<dewpoint_string>44.0 F (6.7 C)</dewpoint_string>
<heat_index_c>7.2</heat_index_c>
<heat_index_f>45.0</heat_index_f>
<heat_index_string>45.0 F (7.2 C)</heat_index_string>
<location>Ely, England, UK</location>
<latitude>52.40168</latitude>
<longitude>0.26157</longitude>
<observation_time>Last Updated on Jan 10 2018, 9:06 am GMT</observation_time>
<observation_time_rfc822>Wed, 10 Jan 2018 09:06:49 +0000</observation_time_rfc822>
<pressure_in>29.569</pressure_in>
<pressure_mb>1001.3</pressure_mb>
<pressure_string>1001.3 mb</pressure_string>
<relative_humidity>96</relative_humidity>
<station_id>Prodata</station_id>
<temp_c>7.0</temp_c>
<temp_f>44.6</temp_f>
<temperature_string>44.6 F (7.0 C)</temperature_string>
<wind_degrees>206</wind_degrees>
<wind_dir>Southwest</wind_dir>
<wind_kt>0.0</wind_kt>
<wind_mph>0.0</wind_mph>
<windchill_c>7.2</windchill_c>
<windchill_f>45.0</windchill_f>
<windchill_string>45.0 F (7.2 C)</windchill_string>
<davis_current_observation>
<DID>001D0A00023B</DID>
<station_name>Ely-JGD</station_name>
<observation_age>54</observation_age>
<dewpoint_day_high_f>44</dewpoint_day_high_f>
<dewpoint_day_high_time>7:41am</dewpoint_day_high_time>
<dewpoint_day_low_f>42</dewpoint_day_low_f>
<dewpoint_day_low_time>12:00am</dewpoint_day_low_time>
<dewpoint_month_high_f>50</dewpoint_month_high_f>
<dewpoint_month_low_f>25</dewpoint_month_low_f>
<dewpoint_year_high_f>50</dewpoint_year_high_f>
<dewpoint_year_low_f>25</dewpoint_year_low_f>
<heat_index_day_high_f>45</heat_index_day_high_f>
<heat_index_day_high_time>7:41am</heat_index_day_high_time>
<heat_index_month_high_f>52</heat_index_month_high_f>
<heat_index_year_high_f>52</heat_index_year_high_f>
<pressure_day_high_in>29.602</pressure_day_high_in>
<pressure_day_high_time>12:00am</pressure_day_high_time>
<pressure_day_low_in>29.540</pressure_day_low_in>
<pressure_day_low_time>4:59am</pressure_day_low_time>
<pressure_month_high_in>30.359</pressure_month_high_in>
<pressure_month_low_in>29.015</pressure_month_low_in>
<pressure_tendency_string>Rising Slowly</pressure_tendency_string>
<pressure_year_high_in>30.359</pressure_year_high_in>
<pressure_year_low_in>29.015</pressure_year_low_in>
<rain_day_in>0.0000</rain_day_in>
<rain_month_in>0.5200</rain_month_in>
<rain_rate_day_high_in_per_hr>0.0000</rain_rate_day_high_in_per_hr>
<rain_rate_hour_high_in_per_hr>0.0000</rain_rate_hour_high_in_per_hr>
<rain_rate_in_per_hr>0.0000</rain_rate_in_per_hr>
<rain_rate_month_high_in_per_hr>1.1300</rain_rate_month_high_in_per_hr>
<rain_rate_year_high_in_per_hr>1.1300</rain_rate_year_high_in_per_hr>
<rain_storm_in>0.0000</rain_storm_in>
<rain_year_in>0.5200</rain_year_in>
<relative_humidity_day_high>96</relative_humidity_day_high>
<relative_humidity_day_high_time>7:35am</relative_humidity_day_high_time>
<relative_humidity_day_low>94</relative_humidity_day_low>
<relative_humidity_day_low_time>12:00am</relative_humidity_day_low_time>
<relative_humidity_month_high>97</relative_humidity_month_high>
<relative_humidity_in>35</relative_humidity_in>
<relative_humidity_in_day_high>36</relative_humidity_in_day_high>
<relative_humidity_in_day_high_time>6:13am</relative_humidity_in_day_high_time>
<relative_humidity_in_day_low>31</relative_humidity_in_day_low>
<relative_humidity_in_day_low_time>12:00am</relative_humidity_in_day_low_time>
<relative_humidity_in_month_high>52</relative_humidity_in_month_high>
<relative_humidity_in_month_low>25</relative_humidity_in_month_low>
<relative_humidity_in_year_high>52</relative_humidity_in_year_high>
<relative_humidity_in_year_low>25</relative_humidity_in_year_low>
<sunrise>8:04am</sunrise>
<sunset>4:16pm</sunset>
<temp_day_high_f>44.6</temp_day_high_f>
<temp_day_high_time>9:03am</temp_day_high_time>
<temp_day_low_f>43.1</temp_day_low_f>
<temp_day_low_time>12:00am</temp_day_low_time>
<temp_month_high_f>51.0</temp_month_high_f>
<temp_month_low_f>29.8</temp_month_low_f>
<temp_year_high_f>51.0</temp_year_high_f>
<temp_year_low_f>29.8</temp_year_low_f>
<temp_in_day_high_f>67.2</temp_in_day_high_f>
<temp_in_day_high_time>9:05am</temp_in_day_high_time>
<temp_in_day_low_f>56.6</temp_in_day_low_f>
<temp_in_day_low_time>6:32am</temp_in_day_low_time>
<temp_in_f>67.2</temp_in_f>
<temp_in_month_high_f>70.3</temp_in_month_high_f>
<temp_in_month_low_f>52.4</temp_in_month_low_f>
<temp_in_year_high_f>70.3</temp_in_year_high_f>
<temp_in_year_low_f>52.4</temp_in_year_low_f>
<wind_day_high_mph>7.0</wind_day_high_mph>
<wind_day_high_time>12:36am</wind_day_high_time>
<wind_month_high_mph>10.0</wind_month_high_mph>
<wind_ten_min_avg_mph>0.0</wind_ten_min_avg_mph>
<wind_ten_min_gust_mph>0.0</wind_ten_min_gust_mph>
<wind_year_high_mph>10.0</wind_year_high_mph>
<windchill_day_low_f>43</windchill_day_low_f>
<windchill_day_low_time>12:00am</windchill_day_low_time>
<windchill_month_low_f>30</windchill_month_low_f>
<windchill_year_low_f>30</windchill_year_low_f>
</davis_current_observation>
<time_to_generate>0.007274 seconds</time_to_generate>
</current_observation>
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1224
    • Support site Leuven Template and scripts
Re: WeatherLink.com API for data retrieval
« Reply #9 on: January 10, 2018, 09:37:37 AM »
Stop worrying, be happy.

The old non-api xml link
https://www.weatherlink.com/xml.php?user=_USERNAME_&pass=_PASSWORD_

and the new api links
http://api.weatherlink.com/v1/NoaaExt.xml?user=_USERNAME_&pass=_PASSWORD_&apiToken=_KEY_
http://api.weatherlink.com/v1/NoaaExt.xml?user=_DID_&pass=_PASSWORD_&apiToken=_KEY_
all report the same weather-data.

The new links have a few overhead fields extra and 1 extra weather-item, the  <wind_ten_min_gust_mph>

A current WLIP user at the v1 website needs to
1. sign on at weatherlink.com v2 and create a new account
     with a new (for them)  e-mail address, username and password
     Do not use your current v1 account as you are redirected to the v1 site.
2. ADD 1 "weather-station" of the same type as your current one but use the USB logger option
3. The result is a "Weatherlink Network" box (check Ken's post above)
     with  a  "DeviceID"  and  "key" , which is the "apiKey" or "tokenID" or whatever its name
The only important part for now is that "key", you can forget that "DeviceID"

If you forgot the real DID of your WLIP and it is not easy accessible, create the link below and  execute in your bowser:
http://api.weatherlink.com/v1/NoaaExt.xml?user=_USERNAME_&pass=_PASSWORD_&apiToken=_KEY_
_USERNAME_  = the name used on v1 of weatherlink.com to view the blue screen
_PASSWORD_ = the password to access(together with your name) your weatherlink account
_KEY_  = the one you got with your new account
You will get the xml data for your current WLIP and scan that for a new non-weather field <DID>001D0A000070</DID>
Now you have your DID also.

If you have you own weatherscript to load the weathelink.com data, replace the
https://www.weatherlink.com/xml.php?user=_USERNAME_&pass=_PASSWORD_
with the new api link with your DID , password and key
http://api.weatherlink.com/v1/NoaaExt.xml?user=_DID_&pass=_PASSWORD_&apiToken=_KEY_
All data should be loaded OK. 
You can forget about a move from v1 to v2 as the link is already a v2 one, it is OK for now and then.

The Leuven script tagsWLCOM.php will be available 20 January.  After some extra testing time , but mostly because my wife insist on going on our planned 1 week vacation tomorrow morning.

Wim
« Last Edit: January 10, 2018, 09:49:48 AM by wvdkuil »
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #10 on: January 10, 2018, 09:49:53 AM »
_KEY_  = the one you got with your new account

Can I just check: Have you confirmed that that short key actually works and that you don't need a new longer token?

ie does the download work for you from the 2.0 platform?
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1224
    • Support site Leuven Template and scripts
Re: WeatherLink.com API for data retrieval
« Reply #11 on: January 10, 2018, 10:01:23 AM »
_KEY_  = the one you got with your new account

Can I just check: Have you confirmed that that short key actually works and that you don't need a new longer token?

ie does the download work for you from the 2.0 platform?
Yes, the download works for both my new basic WLfW test station and for my (2) WLIP v1 stations and for another WLIPv1 station.

So it seems this new key can access all previous WLIP v1 stations as long as you know
1.  the username or DID
and
2. the v1 password.

I added on the same v2 account another USB station, received a new DID and key, used that new key, with the WLIP DID and password, and again: correct  data retrieved as with the previous key.

Which seems to be OK as the non-API link used until now can access all stations for which you have the correct username and password.

Wim
« Last Edit: January 10, 2018, 10:11:57 AM by wvdkuil »
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #12 on: January 10, 2018, 12:03:26 PM »
Yes, the download works for both my new basic WLfW test station and for my (2) WLIP v1 stations and for another WLIPv1 station.

Hmm, that's a little odd - not what I would have expected. Actually it looks like the key isn't being checked at all at present - seems to work for me just omitting the key term from the URL altogether. I suspect that this situation may just be temporary and that a different, longer key may be needed in future. Maybe it's an additional check that Davis haven't decided whether to include or not as yet.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline wicked

  • Member
  • *
  • Posts: 27
Re: WeatherLink.com API for data retrieval
« Reply #13 on: January 10, 2018, 12:08:41 PM »
For users like myself who have used only 2.0. Can I utilize the API links above with just me username and password or do I need to get an API token?

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #14 on: January 10, 2018, 12:21:50 PM »
For users like myself who have used only 2.0. Can I utilize the API links above with just me username and password or do I need to get an API token?

You need DID (not username) and password for 2.0.

Re the token, we don't know at present. Looks like the system has been designed to check for the token (but personally I don't this is the same as the sign-up key), but that check doesn't seem to be enabled at present AFAICS (unless some access token or IP address is being transparently remembered by my PC behind the scenes). You might be able to access with just the DID and a/c pw.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline wicked

  • Member
  • *
  • Posts: 27
Re: WeatherLink.com API for data retrieval
« Reply #15 on: January 10, 2018, 01:05:52 PM »
For users like myself who have used only 2.0. Can I utilize the API links above with just me username and password or do I need to get an API token?

You need DID (not username) and password for 2.0.

Re the token, we don't know at present. Looks like the system has been designed to check for the token (but personally I don't this is the same as the sign-up key), but that check doesn't seem to be enabled at present AFAICS (unless some access token or IP address is being transparently remembered by my PC behind the scenes). You might be able to access with just the DID and a/c pw.

mine also works with using my DID and password for 2.0 with no token.  thanks!

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #16 on: January 10, 2018, 01:08:08 PM »
mine also works with using my DID and password for 2.0 with no token.  thanks!

Interesting... Just be aware that this might not last (ie not needing the token).
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline wicked

  • Member
  • *
  • Posts: 27
Re: WeatherLink.com API for data retrieval
« Reply #17 on: January 10, 2018, 01:13:53 PM »
mine also works with using my DID and password for 2.0 with no token.  thanks!

Interesting... Just be aware that this might not last (ie not needing the token).

I am guessing that you are saying that possibly in the future you will need a "pro" account which will give you the token, correct?

Offline johnd

  • Forecaster
  • *****
  • Posts: 2697
    • www.weatherstations.co.uk
Re: WeatherLink.com API for data retrieval
« Reply #18 on: January 10, 2018, 02:39:50 PM »
I am guessing that you are saying that possibly in the future you will need a "pro" account which will give you the token, correct?

No, not necessarily, though it's a possibility. But the (direct) CSV downloads need a different type of token.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WeatherLink.com API for data retrieval
« Reply #19 on: January 10, 2018, 08:49:37 PM »
easy change, works for me,thanks guys !

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2004
  • www.desmoinesweather.org
    • Des Moines Iowa Weather and Climate
Re: WeatherLink.com API for data retrieval
« Reply #20 on: January 10, 2018, 11:43:39 PM »
Wim,  before you leave,
So in the file wsUserSettings.php
where it has the user name and PW   now, we would replace that with the new username and password and it should work?   
Davis VP2 Plus; 24h  FARS;  Soil Moisture/Temp Station;Weatherlink ;
https://www.desmoinesweather.org

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1224
    • Support site Leuven Template and scripts
Re: WeatherLink.com API for data retrieval
« Reply #21 on: January 11, 2018, 01:52:28 AM »
Wim,  before you leave,
So in the file wsUserSettings.php
where it has the user name and PW   now, we would replace that with the new username and password and it should work?
No, the link in the script itself had to be changed.  There is no hurry at all, just need some time to test. I have one testsite, my own backup site. If that works for a week, and if I get an answer about the api-key it is time to test on a real production site as yours. I contact you ASAP.
Wim
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WeatherLink.com API for data retrieval
« Reply #22 on: January 11, 2018, 02:02:48 AM »
the apitoken you set as the key that is on the side of the IP data logger
and the username you set as the DID number
and then the password is the password you have when logging into weatherlink.com

Offline wicked

  • Member
  • *
  • Posts: 27
Re: WeatherLink.com API for data retrieval
« Reply #23 on: February 20, 2018, 12:38:46 PM »
I may be missing this - but the json and xml files do not have/report THSW index.  I do see heat index.  Anyone know why this is not passed?

Offline dalecoy

  • Forecaster
  • *****
  • Posts: 6266
    • Lee's Summit, MO
Re: WeatherLink.com API for data retrieval
« Reply #24 on: February 20, 2018, 02:25:34 PM »
I may be missing this - but the json and xml files do not have/report THSW index.  I do see heat index.  Anyone know why this is not passed?

Because current THSW index is not available.