• | Premium

    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

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

    the script is as follows :

    URL = 'https://stations.windy.com./pws/update/*MY-API-HERE*?'
    #while running
            #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)

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

    Thanks a lot

Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps
Terms and Conditions     Privacy Policy