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

    Windy station Posting

    Windy Stations
    2
    2
    433
    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.
    • Danzo8D
      Danzo8 | Premium
      last edited by Danzo8

      Hi, this is my first go at posting to windy, I just want to make sure i've got this right.

      my station is based on a raspberry Pi zero and has temp, pressure and humidity
      (for now, wind speed and more to come!)
      I'm currently trying to send these values to my registered station with the API key using a python script

      edit
      forgot to mention this is controlled by Cron and posts every 5 minutes as per the windy guidelines

      the script is as follows :

      *omitted*
      URL = 'https://stations.windy.com./pws/update/*MY-API-HERE*?'
      #while running
      try:
              #read the humidity and temperature
              humidity, temperature = Adafruit_DHT.read_retry(sensor, sensor_pin)
              #read the pressure
              pressure = bmp280.get_pressure()
      
              #set up URL PARAMS
             PARAMS = "temp={temperature}&pressure={pressure}&rh={humidity}".format(**vars())
              #deterimine if the reading is valid, and only print valid readings
      
            if humidity is not None and temperature is not None and pressure is not None:
               #post to windy station
                requests.get(url = URL, params = PARAMS)
      
      *omitted*
      
      1 Reply Last reply Reply Quote 0
      • B
        brendon2229
        last edited by

        Well you configured it really working. really thankful for you to as i was looking for the same script.

        Thanks a lot

        1 Reply Last reply Reply Quote 0
        • 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