Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    How to add network of 10 weather station fron weatherlink

    Windy Stations
    6
    9
    2.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • glez_bG
      glez_b
      last edited by

      It is possible to add 10 weather stations vantage pro 2 plus to windy?

      1 Reply Last reply Reply Quote 0
      • galfertG
        galfert Meteorologist
        last edited by

        There are many software options to upload to Windy when using a Davis station. You mentioned Weatherlink but I'm unsure if you are referring to Weatherlink.com or the new WeatherLink Live device. Either way you might need to add some hardware/software to upload to Windy.

        As for uploading from a network of 10 VP2 hardware it depends on the software used as there are several options. It might require a separate Windy account (email) for each device. I do know of a way with the Meteobridge for example to upload to Windy from several stations using the same account. It requires sending data to Windy using the HTTP upload method with custom URL instead of using the built in Windy upload. This is because the default Windy upload defaults to station=0 which is your first listed Windy station ID on your Windy account. So to specify upload to a different Windy ID you use the custom HTTP upload method and then change the "station equal statement" to match the matching ID for example station=3 in the HTTP upload. It is possible to probably do this with other weather software but you'd have to research or ask. Check with the following other software to see how to change the station= upload with these other various software; Weather-Dispaly, Cumulus MX, WeeWx. For information on how to do this with Meteobridge here is a relevant link:
        https://www.wxforum.net/index.php?topic=36656.msg376837#msg376837

        galfertG 1 Reply Last reply Reply Quote 0
        • glez_bG
          glez_b
          last edited by

          Weather Stations send data to weatherlink.com via WeatherLinkIP

          1 Reply Last reply Reply Quote 1
          • galfertG
            galfert Meteorologist
            last edited by

            The WeatherLink IP alone is not going to help you send data to Windy.

            I recommend you run one of the following software that will read data from the WeatherLink IP in order to then send it to Windy. (listed in no special order). Which means you need a device on that local network to pickup data from the WeatherLink IP. This could be a Raspberry Pi in the case of some of this software or in case of the Meteobridge it is its own small device.

            • Cumulus MX
            • Meteobridge
            • Weather-Display
            • WeeWx
            1 Reply Last reply Reply Quote 0
            • galfertG
              galfert Meteorologist
              last edited by

              Another thought.... remember with WeatherLink.com you can send your data to CWOP. All CWOP stations automatically show up on Windy without you needing to open a Windy account nor do anything on the Windy side. So that is just another option. Data from CWOP is delayed 10 minutes and compared to a station that sends data directly to Windy then that is only delayed 5 minutes. So there is an advantage to uploading directly to Windy rather than via CWOP. Another advantage to sending directly to Windy is that only then does it give a forecast.

              JoanPerezJ 1 Reply Last reply Reply Quote 0
              • T
                TomSlavkovsky API developers | Premium
                last edited by

                @glez_b Hi, you can use suggested solutions by @galfert. Alternatively, you can use WifiLogger or a python script which I am enclosing below:

                #Copyright 2019 RODOLFO QUESADA ZUMBADO
                #
                #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
                #
                #The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
                #
                #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
                
                
                #requires python-pytz pkg installed via pip or pkg manager
                import urllib.request, json
                from datetime import datetime
                import pytz
                import time
                
                
                # davis weatherlink api docs
                # https://www.davisinstruments.com/blog/whats-new-weatherlink/
                
                # windy api docs
                # https://community.windy.com/topic/8168/report-you-weather-station-data-to-windy
                
                # this is a demo pws from davis
                demo_DID = "001D0A00DE6A"
                demo_ownerpass = "DEMO"
                demo_tokenid = "demo0a002bc5272033001d0a002bc527"
                
                ##############################################
                # fill below with actual pws values
                ##############################################
                my_tokenid = ""
                my_DID = ""
                my_ownerpass = ""
                ##############################################
                
                # davis xml api
                DID = demo_DID_DID
                ownerpass = demo_ownerpass
                tokenid = demo_tokenid
                # https://api.weatherlink.com/v1/NoaaExt.xml?user=001D0A00DE6A&pass=DEMO&apiToken=demo0a002bc5272033001d0a002bc527
                
                
                
                
                # davis json api
                json_noaa_ext_url = "https://api.weatherlink.com/v1/NoaaExt.json?user="+DID+"&pass="+ownerpass+"&apiToken="+tokenid+""
                print(json_noaa_ext_url)
                
                # station status (not to be polled!)
                
                
                while True:
                
                 with urllib.request.urlopen(json_noaa_ext_url) as url:
                  weatherlink_data = json.loads(url.read().decode())
                
                
                # windy api
                #    station - 32 bit integer; required for multiple stations; default value 0; alternative names: si, stationId
                #    shareOption - text one of: Open, Only Windy, Private; default value is Open
                #    name - text; user selected station name
                #    latitude - number [degrees]; required; north–south position on the Earth`s surface
                #    longitude - number [degrees]; required; east–west position on the Earth`s surface
                #    elevation - number [metres]; height above the Earth's sea level (reference geoid); alternative names: elev, elev_m, altitude
                #    tempheight - number [metres]; temperature sensor height above the surface; alternative names: agl_temp
                #    windheight - number [metres]; wind sensors height above the surface; alternative names: agl_wind
                
                # measurements
                
                #    station - 32 bit integer; required for multiple stations; default value 0; alternative names: si, stationId
                #    time - text; iso string formated time "2011-10-05T14:48:00.000Z"; when time (or alternative) is NOT present server time is used
                #    dateutc - text; UTC time formated as "2001-01-01 10:32:35"; (alternative to time)
                #    ts - unix timestamp [s] or [ms]; (alternative to time)
                #    temp - real number [°C]; air temperature
                #    tempf - real number [°F]; air temperature (alternative to temp)
                #    wind - real number [m/s]; wind speed
                #    windspeedmph - real number [mph]; wind speed (alternative to wind)
                #    winddir - integer number [deg]; instantaneous wind direction
                #    gust - real number [m/s]; current wind gust
                #    windgustmph - real number [mph]; current wind gust (alternative to gust)
                #    rh - real number [%]; relative humidity ; alternative name: humidity
                #    dewpoint - real number [°C];
                #    pressure - real number [Pa]; atmospheric pressure
                #    baromin - real number [inches Hg];
                #    precip - real number [mm]; precipitation over the past hour
                #    rainin - real number [in]; rain inches over the past hour (alternative to precip)
                #    uv - number [index];
                
                
                 windy_data = {}
                
                 windy_api_key = "some_api_key"
                
                ### must url-escape this value properly, later!
                # weatherlink_datetime_object = datetime.strptime(weatherlink_data["observation_time_rfc822"], '%a, %d %b %Y %H:%M:%S %z')
                # windy_data["dateutc"] = weatherlink_datetime_object.astimezone(pytz.utc).strftime('%Y-%m-%d %H:%M:%S')
                
                 windy_data["temp"] = weatherlink_data["temp_c"]
                 windy_data["windspeedmph"] = weatherlink_data["davis_current_observation"]["wind_ten_min_avg_mph"]
                 windy_data["winddir"] = weatherlink_data["wind_degrees"]
                 windy_data["windgustmph"] = weatherlink_data["davis_current_observation"]["wind_ten_min_gust_mph"]
                 windy_data["rh"] = weatherlink_data["relative_humidity"]
                 windy_data["dewpoint"] = weatherlink_data["dewpoint_c"]
                 windy_data["baromin"] = weatherlink_data["pressure_in"]
                 windy_data["rainin"] = weatherlink_data["davis_current_observation"]["rain_rate_in_per_hr"]
                 windy_data["uv"] = weatherlink_data["davis_current_observation"]["uv_index"]
                
                 print(windy_data)
                
                 windy_url = "https://stations.windy.com/pws/update/"+windy_api_key+"?temp="+windy_data["temp"]+""
                
                 for k,v in windy_data.items():
                  if k != "temp":
                   windy_url+="&"+k+"="+v
                
                 print(windy_url)
                
                 windy_response = urllib.request.urlopen(windy_url).read()
                
                 if windy_response == b'SUCCESS':
                  print("updated")
                 else:
                   exit(1)
                
                 time.sleep(600)```
                1 Reply Last reply Reply Quote 1
                • galfertG
                  galfert Meteorologist @galfert
                  last edited by

                  Newest Meteobridge update now supports custom station ID uploads. Basically it now supports &station=X standard.

                  1 Reply Last reply Reply Quote 0
                  • sschwetzS
                    sschwetz
                    last edited by sschwetz

                    I have updated this script to run as a cron job. This will pull the data direct from a Davis Weatherlink Live Receiver

                    
                    #!/bin/python3
                    #Copyright 2019 STEPHEN SCHWETZ
                    #Copyright 2019 RODOLFO QUESADA ZUMBADO
                    #
                    #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
                    #
                    #The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
                    #
                    #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
                    
                    
                    #requires python-pytz pkg installed via pip or pkg manager
                    import urllib.request, json
                    from datetime import datetime
                    import pytz
                    import time
                    
                    #address of weatherlink live 
                    local_address = "weatherlink live local ip"
                    windy_api_key = "windy_api”
                    # davis wetherlink live local api
                    #https://weatherlink.github.io/weatherlink-live-local-api/
                    
                    # windy api docs
                    # https://community.windy.com/topic/8168/report-you-weather-station-data-to-windy
                    
                    # davis json api
                    json_noaa_ext_url="http://"+local_address+"/v1/current_conditions"
                    print(json_noaa_ext_url)
                    
                    with urllib.request.urlopen(json_noaa_ext_url) as url:
                     weatherlink_data = json.loads(url.read().decode())
                    
                    # windy api
                    #    station - 32 bit integer; required for multiple stations; default value 0; alternative names: si, stationId
                    #    shareOption - text one of: Open, Only Windy, Private; default value is Open
                    #    name - text; user selected station name
                    #    longitude - number [degrees]; required; east–west position on the Earth`s surface
                    #    elevation - number [metres]; height above the Earth's sea level (reference geoid); alternative names: elev, elev_m, altitude
                    #    tempheight - number [metres]; temperature sensor height above the surface; alternative names: agl_temp
                    #    windheight - number [metres]; wind sensors height above the surface; alternative names: agl_wind
                    
                    # measurements
                    
                    #    station - 32 bit integer; required for multiple stations; default value 0; alternative names: si, stationId
                    #    time - text; iso string formated time "2011-10-05T14:48:00.000Z"; when time (or alternative) is NOT present server time is used
                    #    dateutc - text; UTC time formated as "2001-01-01 10:32:35"; (alternative to time)
                    #    ts - unix timestamp [s] or [ms]; (alternative to time)
                    #    temp - real number [°C]; air temperature
                    #    tempf - real number [°F]; air temperature (alternative to temp)
                    #    wind - real number [m/s]; wind speed
                    #    windspeedmph - real number [mph]; wind speed (alternative to wind)
                    #    winddir - integer number [deg]; instantaneous wind direction
                    #    gust - real number [m/s]; current wind gust
                    #    windgustmph - real number [mph]; current wind gust (alternative to gust)
                    #    rh - real number [%]; relative humidity ; alternative name: humidity
                    #    dewpoint - real number [°C];
                    #    pressure - real number [Pa]; atmospheric pressure
                    #    baromin - real number [inches Hg];
                    #    precip - real number [mm]; precipitation over the past hour
                    #    rainin - real number [in]; rain inches over the past hour (alternative to precip)
                    #    uv - number [index];
                    
                    
                    
                    windy_data = {}
                    
                    ### must url-escape this value properly, later!
                    # weatherlink_datetime_object = datetime.strptime(weatherlink_data["observation_time_rfc822"], '%a, %d %b %Y %H:%M:%S %z')
                    # windy_data["dateutc"] = weatherlink_datetime_object.astimezone(pytz.utc).strftime('%Y-%m-%d %H:%M:%S')
                    
                    temp_c = ((float(weatherlink_data['data']['conditions'][0]["temp"]) - 32) * 5/9)
                    windy_data["temp"] = str(temp_c)
                    windy_data["windspeedmph"] = str(weatherlink_data['data']['conditions'][0]["wind_speed_avg_last_1_min"])
                    windy_data["winddir"] = str(weatherlink_data['data']['conditions'][0]["wind_dir_scalar_avg_last_1_min"])
                    windy_data["windgustmph"] = str(weatherlink_data['data']['conditions'][0]["wind_speed_hi_last_2_min"])
                     
                    windy_data["rh"] = str(weatherlink_data['data']['conditions'][0]["hum"])
                    
                    dewpoint_c  = ((float(weatherlink_data['data']['conditions'][0]["dew_point"]) - 32) * 5/9)
                    windy_data["dewpoint"] = str(dewpoint_c)
                    windy_data["baromin"] = str(weatherlink_data['data']['conditions'][2]["bar_sea_level"])
                    windy_data["rainin"] = str(weatherlink_data['data']['conditions'][0]["rainfall_last_60_min"])
                    #windy_data["uv"] = weatherlink_data["davis_current_observation"]["uv_index"]
                    
                    windy_url = "https://stations.windy.com/pws/update/"+windy_api_key+"?temp="+windy_data["temp"]+""
                    
                    for k,v in windy_data.items():
                     if k != "temp":
                      windy_url+="&"+k+"="+v
                    
                    print(windy_url)
                    
                    windy_response = urllib.request.urlopen(windy_url).read()
                    
                    if windy_response == b'SUCCESS':
                     print("updated")
                    else:
                     print("failed")
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • JoanPerezJ
                      JoanPerez @galfert
                      last edited by

                      @galfert my station is in CWOP (DW9679) but it doesn`t appears on windy.

                      1 Reply Last reply Reply Quote 0
                      • KorinaK Korina referenced this topic on
                      • First post
                        Last post
                      Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
                      NodeBB & contributors, OSM & contributors, HERE maps
                      Terms of Use     Privacy Policy