Weather Software > WeatherLink/weatherlink.com by Davis Instruments

WeatherLink.com API for data retrieval

(1/10) > >>

saratogaWX:
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).

saratogaWX:
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
--- End quote ---

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


--- End quote ---

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 :)

dalecoy:

--- Quote from: saratogaWX on January 09, 2018, 07:43:41 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).

--- End quote ---

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

Jáchym:
MT only uses current conditions from the XML, will that remain?

saratogaWX:
Yes, the structures are mostly identical.  I've attached my stations old and new API queries to see them both.

Navigation

[0] Message Index

[#] Next page

Go to full version