If you are using Davis Personal/Professional weather stations(PWS) you will get a nice dashboard when you link your PWS to the Davis weatherlink(WL) site.
An add on is that you via API:s can get both the current weather, forecast and other data free of charge, via the aerisweather.com(AW) site.
This post will handle the setup and also a Node-Red dashboard interfacing the aeris API.
Introduction
The use case for me was that I wanted to get an alternative to Weather Underground(WU) and still getting forecasts to our weather site which is described here. The link from WL to WU is set up via WL, "Manage devices => Share & Uploads".
Setup
PW setup
To link your PWS data from WL to PW you will need keys which are found at the WL site
Login and choose "Account Information => API Key v2". If you don't have any keys click on "Generate v2 Token".
Register an account at pwsweather, add a new station and in input filed ”Hardware” click on ”LINK STATION” and from WL add
- In the field "Public Key" use API Key v2:
- In the field "Private Key" use API Secret:
In the dashboard you will see the status of the weather station and direct after a new registration it will turn to "INACTIVE". After the first records of data from Davis/WL it will turn to "INITIATING". During a period of up to 7 days your data will be validated and after that period, with OK data, it will change to "ACTIVE". Check out the the "FAQ => Station Status"
AW setup
To get access to the AW API you have to link your PW account to AW via this form.
After you loged on go to "APPS" and there will be a "Demo App" shown with "ID" and "SECRET". These should be included in the URL to retrieve data.
Custom designed dashboard
The shown dashboard is made using Node-Red(NR) and is a variant of other NR weather dashboards on this blog.
The flow is seen below.
In the "http request" node the URL is set for the conditions endpoint and it looks like
https://api.aerisapi.com//conditions/56.12,12.6?client_id=xx&client_secret=yy
The numbers are latitude/longitude for our place and the "xx" and "yy" should be substituted with your "ID" and "SECRET" from the AW site.
Wrap up
All the available AW endpoints are found here
It's nice to know that the the data from AW seems to be updated every 2 minute and thats despite I'm having a free account at WL which should only give me the data every 15 minutes ??
There is no error handling in the NR flow but You could add tests direct after the "http request" node with;
"msg.statusCode" is 200
"msg.payload.success" is "true"
No comments:
Post a Comment
Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !