October 15, 2020

WeatherLink weather template

Updated 2022-02-21 !

If You are interested in building Your own weathersite with information from Davis Weatherlink(DWL), and don't are a skilled programmer I can really recommend Node-Red(NR). In this post I give an example how to start with the NR dashboard GUI and DWL V1 API.


!! Please note new version with the latest v2 API !!

If You want a more advanced weather site/template this is a very nice one coded in PHP.


Intro
Here is a link to a quick NR intro.

In my case NR is installed on a Raspberry Pi but it could be installed on several other hardware platforms.

In this post there are information about the DWL API and in this flow i use the JSON REST API V1It is just a simple URL 


http://api.weatherlink.com/v1/NoaaExt.json?user=xxxx&pass=yyyy&apiToken=ZZZZ

where xxxx, yyyy and zzzz should be substituted with Your device ID, password and the token. The token is retrieved from the DWL site after You logged on.





















Install
Install the "node-red-dashboardnode which is used for the GUI part and then pick up the example flow here.

In the "Get input" part the http request is sent, once every minute, and the answer is converted to a JSObject in the "json"node. The URL is hardcoded in the "http-requestnode so here You have to change to Your credentials.

In the "Calculation" part, different data are picked up and processed with "function" or "change" nodes.

In the 3 "Column_x" parts, the data are displayed via "text", "chart" and "gauge"nodes.

Via the "inject" node "Reset Chart" all the charts will be cleared

The GUI URL is http://yourhost:1880/ui/

If You want to port the application to the WEB You must add security

Remark 
I did a check regarding temperature "feels like" or apparent temperature and found that the Australian way seems to be the best approximation. Here is the link to BOM and some other thoughts on Wikipedia. The BOM calculation is implemented in my NR flow 2019-10-10.

4 comments:

  1. Hi, I used your flow to get the vantage pro 2 measurement. If I put the same URL into a "http node request" after changing user, password and apiToken then I just receive "Unexpected token I in JSON at position 0"" error and "Invalid Request!"
    Could you please help me.
    abbas

    ReplyDelete
    Replies
    1. Hi, sometimes when copying text you will get hidden, non valid signs. Use a “raw” editor in pure text mode. Test in an ordinary browser.

      Delete
  2. Hello Pyssel ! Great example for Weatherlink 'talking ' to Davi's cloud server, but in my case, the raspberry is directly connected to the Envoy using a serial line. So, i would be interested in how i can get the data from the Envoy into that json format and then be able to display as nicely as you ahve created. Maybe you do hae some info or examples (for NodeRed, of course ;-)) best regards, Martin

    ReplyDelete
    Replies
    1. Hi and thanks! Sorry, but not familiar with Envoy, but after some Googling I would test with node "node-red-node-serialport" and 19.2 kbaud, 8N1.

      Delete

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !