|
Post by Jonathan on May 7, 2020 9:02:42 GMT -8
For some reason, I'm not able to get the html code to display using the example from WeatherStem below: I've blocked out my api key in the code below for privacy reasons. It's not showing the weather data when I click on the page I created on my website: www.stthomaspubliclibrary.ca/weathertest.htmlAny ideas? <!-- Meta data for API key and station identifier --> <meta name="WeatherSTEM-api-key" content="blocked out"> <!-- IMPORTANT! REPLACE "3zxaakeb" WITH YOUR REGISTERED API KEY --> <meta name="WeatherSTEM-station" content="skyweather/stplweather"> <!-- Replace "miamidade/rsmas" with your county/station --> <!-- JavaScript --> <script src="//code.jquery.com/jquery-1.12.0.min.js"></script> <!-- jQuery needs to load before the API file --> <script src="//static.weatherstem.com/api.min.js"></script> <!-- API file (must load after jQuery) --> <!-- HTML snippet (data-sensor attribute can be the name of any installed sensor) --> <div> <div> Live Weather Conditions from <span data-station-property="name"></span>: </div> <div> Current Temperature: <span data-sensor="Thermometer"></span> °F </div> <div> Current Humidity: <span data-sensor="Hygrometer"></span>% </div> <div> Current Rainfall: <span data-sensor="Rain Rate"></span> in/hr </div> <div> Current Dew Point: <span data-sensor="Dewpoint"></span> °F </div> <div> Current Pressure: <span data-sensor="Barometer"></span> inHg </div> </div>
|
|
|
Post by SDL on May 7, 2020 9:26:26 GMT -8
I'm going to pass this on to WeatherSTEM. Looks like it is not accepting the key.
BP
|
|
|
Post by Jonathan on May 8, 2020 4:27:33 GMT -8
This is the response I received from WeatherSTEM: "To call the WeatherSTEM API for SkyWeather, one would make an HTTPS POST to: skyweather.weatherstem.com/api They would send in 3 parameters: from to handle from and to would be GMT UNIX timestamps covering the temporal period of the query. handle would be the station handle. The return will be a JSON structure of the readings." So this time, I tried it with PHP, and this is the error that I received. I emailed back WeatherSTEM and they weren't able to help me further: Warning: file_get_contents(https://skyweather.weatherstem.com/api): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/stthom31/public_html/staff/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65) : eval()'d code on line 19 Any ideas?
|
|
|
Post by Jonathan on May 8, 2020 4:29:27 GMT -8
I'm going to pass this on to WeatherSTEM. Looks like it is not accepting the key. BP This is the response I received from WeatherSTEM: "To call the WeatherSTEM API for SkyWeather, one would make an HTTPS POST to: skyweather.weatherstem.com/apiThey would send in 3 parameters: from to handle from and to would be GMT UNIX timestamps covering the temporal period of the query. handle would be the station handle. The return will be a JSON structure of the readings." So this time, I tried it with PHP, and this is the error that I received. I emailed back WeatherSTEM and they weren't able to help me further: Warning: file_get_contents(https://skyweather.weatherstem.com/api): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/stthom31/public_html/staff/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65) : eval()'d code on line 19 Any ideas?
|
|
|
Post by Jonathan on May 18, 2020 5:38:00 GMT -8
Still having issues.
|
|
|
Post by SDL on May 19, 2020 15:16:22 GMT -8
On our list to get to testing.
BP
|
|