Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login
    1. Home
    2. simcom
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    simcom

    @simcom

    0
    Reputation
    2
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website www.simcom.gr Location Crete, Greece

    simcom Unfollow Follow

    Latest posts made by simcom

    • RE: Connect my tempest weather station to Windy

      @Daan-Bynens can this be of any help(?):
      https://community.windy.com/post/156032

      Regards,
      Kostas

      posted in Your Feedback and Suggestions
      S
      simcom
    • RE: Php script to upload WeatherFlow Tempest data

      Sorry but there is a mistake at the beginning of the script:

      // Download data from WeatherFlow Tempest station (use your own Token)
      $url = 'https://swd.weatherflow.com/swd/rest/observations/station/111120?token=XXXXXXXXXXXX';
      

      Instead of [111120], you should use [your own station id]. This [111120] is just my own station id.

      Cheers,
      Kostas

      posted in Windy Stations
      S
      simcom
    • Php script to upload WeatherFlow Tempest data

      Hi,

      I am using the following php script to grab data from my WeatherFlow Tempest station and then successfully upload them to Windy.com.
      A cron job is used to run it every 5 minutes.
      No additional weather software is needed.

      Enjoy,
      Kostas

      /*
       * This php script grabs data from a WeatherFlow Tempest station and 
       * uploads them to Windy.com.
       * Use a cron job to run it every 5 minutes.
       * No additional weather software is needed.
       */
      
      // Download data from WeatherFlow Tempest station (use your own Token)
      $url = 'https://swd.weatherflow.com/swd/rest/observations/station/111120?token=XXXXXXXXXXXX';
      
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_URL, $url);
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_HEADER, false);
      $data = curl_exec($curl);
      curl_close($curl);
      
      // Decode data so they can be used
      $data = json_decode($data);
      
      // Calculate variables
      $ts = urlencode($data->obs[0]->timestamp);
      $temp = urlencode($data->obs[0]->air_temperature);
      $wind = urlencode($data->obs[0]->wind_avg);
      $winddir = urlencode($data->obs[0]->wind_direction);
      $gust = urlencode($data->obs[0]->wind_gust);
      $rh = urlencode($data->obs[0]->relative_humidity);
      $dewpoint =  urlencode($data->obs[0]->dew_point);
      $mbar = urlencode($data->obs[0]->barometric_pressure);
      $precip = urlencode($data->obs[0]->precip);
      $uv = urlencode($data->obs[0]->uv);
      
      
      // Upload data to Windy.com (use your own Windy API-KEY)
      $url3 = "https://stations.windy.com/pws/update/API-KEY?winddir=$winddir&wind=$wind&gust=$gust&temp=$temp&precip=$precip&mbar=$mbar&dewpoint=$dewpoint&rh=$rh&uv=$uv";
      
      //var_dump($url3);   //test only
      
      $curl3 = curl_init();
      curl_setopt($curl3, CURLOPT_URL, $url3);
      curl_setopt($curl3, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl3, CURLOPT_HEADER, false);
      $data3 = curl_exec($curl3);
      curl_close($curl3);
      
      //var_dump($data3);   //test only
      
      
      posted in Windy Stations
      S
      simcom