SP Weather module updated with new API and performance boost - JoomShaper

SP Weather module updated with new API and performance boost

30 January 2019
Hits 8,962
3 min read
SP Weather module updated with new API and performance boost

There is an English proverb “A ring around the sun or moon, means that rain will come real soon”. The nature is full of mystery. Weather is one of its most fickle elements. The ancient human being used to observe the surrounding signs to predict the weather. But today, you don’t have to look here and there. Weather update is now at your fingertips through lots of tools available on different platforms.

For Joomla websites, we have the SP Weather module to show the weather updates and forecasts on board. And today is a good sunny day for all of the SP Weather users. Because the module has just got an important update. Let’s check what’s new in SP Weather v2.3 starting with the changelog.

SP Weather v2.3 changelog

  • Update: Introduced OpenWeatherMap API
  • Update: Dropped Yahoo Weather API
  • Update: Caching improved
  • Update: Performance improved

New OpenWeatherMap API

The SP Weather module was originally based on Yahoo Weather API. Recently, we have been receiving user reports that the Yahoo Weather API unexpectedly causes errors and the forecasts go offline. You put the module on your site to show weather information to the visitors, but if they don’t get it, that will turn out to be a bad UX. With today’s update, we’ve solved this problem.

The Yahoo API has been dropped and replaced with the new OpenWeatherMap API. The latest one has a good reputation and track record of stability and service. Most importantly, you will no longer face the issues you’ve been experiencing.  

SP Weather module updated with new API and performance boost

SP Weather Demo: The weather is now awesome. Enjoy your time!

How to use OpenWeatherMap API?

Step 1: At first visit the official OpenWeatherMap registration page and signup for an API key. After logging-in to your user account there, you will see an API keys tab on the dashboard. Click that, and copy your API key.

SP Weather module updated with new API and performance boost

Step 2: Login to your Joomla site’s admin control panel. Click Modules on the left. Find the SP Weather module in the list appeared. Click SP Weather, and that will take you to its backend. There you will find the API KEY field to enter your OpenWeatherMap API key. Paste the API key (which you’ve just got in the step 1) in the API KEY field and save.

SP Weather module updated with new API and performance boost

You can also adjust the module settings to modify the appearance of the weather update information on your site.

Along with the weather API update, we've improved the caching system and overall performance of the SP Weather module. Try yourself to feel the change.  

Good to know

The SP Weather module helps you display the current weather condition and forecasts on a Joomla site for a given city. You can set the city name, translated name of the location, weather status, humidity, wind condition, forecast and so on.

The forecast display can be customized using options like block/list layouts, number of forecast days, separator, temperature unit etc. The module has a cache functionality that makes the weather condition loading faster. The cache cleans automatically at a preset interval.

I’m really excited about the SP Weather update that will bring the weather information back to all of the Joomla sites that use this module. Kudos to our R&D team for the update. Please let us know your feedback and suggestions. Thank you!

Live Demo    Free Download SP Weather Rate on JED

Arafat Bin Sultan

Arafat Bin Sultan

Arafat is a tech-enthusiast with a keen interest in space, photography, and video making.
I
infoParigi.it
5 years ago
Great job, now is working ok!
Rifat Wahid Alif
Rifat Wahid Alif
5 years ago
Thanks for using SP Weather.
SA
Schlittler Andreas
5 years ago
:( sorry It don't work -

[url="https://glnachrichten.schlittler.net/httpdocs/index.php/de/component/sppagebuilder/?view=page&id=245 "]see all parameters and error message[/url]

see given parameters on

[img]https://glnachrichten.schlittler.net/httpdocs/images/2019/01/31/openweather_not_work1.png[/img]

[img]https://glnachrichten.schlittler.net/httpdocs/images/2019/01/31/openweather_not_work4.png[/img]

[img]https://glnachrichten.schlittler.net/httpdocs/images/2019/01/31/openweather_not_work3.png[/img]

[img]https://glnachrichten.schlittler.net/httpdocs/images/2019/01/31/openweather_not_work2.png[/img]

so WHAT's the CASE??

Thank You for analize that. I waste a lot of time
Rifat Wahid Alif
Rifat Wahid Alif
5 years ago
Hi,
I have tried your location in my localhost. It's working perfectly. Could you please Make sure that your server does allow [b]fopen[/b] and [b]cURL[/b]?
Here are my screenshots:
1. http://prntscr.com/mf6ttj
2. http://prntscr.com/mf6ues

- Thanks
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url] with 5 API platform.
Bob Bishop
Bob Bishop
5 years ago
Does not work sorry. Why do you need a subscription to access forums for free stuff?
Rifat Wahid Alif
Rifat Wahid Alif
5 years ago
Hi,
Thanks for using SP Weather module. Could you please share your issue what you are facing?

- Thanks
Bob Bishop
Bob Bishop
5 years ago
I am getting the following

[code type="xml"]
Can't forecast decode data. Also make sure your location is current. Verify your location from here https://openweathermap.org/find
[/code]

This is on a website based on a UK server but a holiday rental site for Lanzarote. I have checked on open weather and have the correct place name Arrecife, ES

Just not showing the weather
Paul Frankowski
Paul Frankowski
5 years ago
The forum, as you may know, is part of support. We will check your bug on Monday. Thanks for understanding.
Bob Bishop
Bob Bishop
5 years ago
OK Thanks
RS
Roman Sharipov
5 years ago
Did you solve this problem?

rsharipov about 3 days ago
I have the same problem (I checked different cities):
Can't current decode data. Also make sure your location is current. Verify your location from here https://openweathermap.org/find
RS
Roman Sharipov
5 years ago
I have the same problem (I checked different cities):
Can't current decode data. Also make sure your location is current. Verify your location from here https://openweathermap.org/find
S
Stephen
5 years ago
I've been having the same issue as well.
Rifat Wahid Alif
Rifat Wahid Alif
5 years ago
Hi,
Thanks for using this. Could you please share your city name?
M
merique
5 years ago
same here :(
P
peter
5 years ago
Yes, same problem here. Have verified location on openweathermap. Tried other locations as well. For example "London, UK" does not work. Saw the note about fopen and curl and those are enabled.
Generated a new API key just to be sure... no difference.
Thanks.
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url] with 5 API platform.
RS
Rand Schools
5 years ago
Hi,

I am facing the same issue, pleas update if you have any solution
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url] with 5 API platform.
P
peter
5 years ago
Ok - seems like the support from JoomShaper is pretty close to zero.
So I did some digging.

The problems is that the module strips out from the location string you enter. openweathermap.org does not like that and return unknown location. You can patch it on line #40 in mod_sp_weather/helper.php

orig:
$this->location = str_replace(' ', '', $this->params->get('location', 'Dhaka,BD'));

patch:
$this->location = str_replace(' ', '%20', $this->params->get('location', 'Dhaka,BD'));

It would have been neat if your GitHub repository was updated and I could have done a pull request.
But you’re welcome.
RS
Roman Sharipov
5 years ago
Thank you very much!
But your solution did not solve the problem.
P
peter
5 years ago
solved my problem
R
RayR
5 years ago
Didn't work for me either.
P
peter
5 years ago
BTW - also the constant SP_WEATHER_MODERATE_RAIN is missing from the language file so you would need to create a language override.

There are more issues so this is clearly not a quality product. Like why present temperature with 3 decimals? One is more than enough. It is "m/s" not "METER/SEC" etc.
MMDoege
MMDoege
5 years ago
We are very happy with OpenWetherMap as it works very well. Of course you have to add an additional qualifier as there many "Londons" or similar cases on this planet. We have never tried Yahoo or others as they often have limitations (eg. only cities in english) (OWM provides a Widget which does not go with our CI policy).

To comply with our spec's we ended up in reading OWM JSON returns as we haven't found someone providing a really nice ready-to-go weather module.

As we are a community platform provider a city id fixed in a module does not make any sense to us. JoomShaper has stopped here half way. We'ld buy a SP Weather Pro version when city is a variable which we will get from our member's geolocation.
D
Dimitris
5 years ago
same problem as the others, with Kerkyra, GR and also tried London, UK etc.

[code type="xml"]Can't forecast decode data. Also make sure your location is current. Verify your location from here https://openweathermap.org/find
[/code]

Peter's solution didn't help :/
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url] with 5 API platform.
PT
Peter Thomas
5 years ago
Same here.. J!3.9.3 with SP Weather module v2.3 - followed all instructions and verified location etc., but I get the same error as everyone else. Since updating to the Open Weathermap api, it's stopped working. I've tried re-installing the extension, created a new api key etc., but still no luck.

I appreciate that this is a free extension, but it would be [u]really[/u] helpful to everyone, if some kind soul from Joomshaper could kindly respond here with an explanation as to why it's not working.. at least so that we can get it working correctly.
SA
Sfirat Alexandru
5 years ago
I have solved the problem by disabling forecast.
SA
Sfirat Alexandru
5 years ago
I assume that to use forecast you have to pay subscription.
D
Dimitris
5 years ago
That did the trick!
PT
Peter Thomas
5 years ago
It didn't work for me.. forecast disabled, cleared the cache etc., but still getting the error message :(
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url] with 5 API platform.
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url] with 5 API platform. The free forecast is also included there.
D
Dimitris
5 years ago
I haven't checked if SP_WEATHER_MODERATE_RAIN is missing from the text as peter is saying but, "meteocons-cloudy-night" is missing from the css, and the relevant icon is not loading.
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url]
R
RayR
5 years ago
I'm having the same problem - "Can't forecast decode data. Also make sure your location.." but it works if I disable Forecast so it's not that it doesn't recognise the City Name. Any ideas from Joomshaper support?
PT
Peter Thomas
5 years ago
Disabling forecast doesn't work for me.. this is so annoying !
RS
Rand Schools
5 years ago
Im Having the same issue, pleas update us when you find solutions
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url]
A
Alvaro
5 years ago
Deactivating the forecast works, but the API key must have several hours to be created. I created a key 12 hours ago and that worked, but with the new key I created now for the domain it did not work.
A
Alvaro
5 years ago
We have verified it, disabling forecast works, but you have to wait at least 15 minutes after creating the KEY. This must depend on the country in which they are located, in some it may be more in others less, or perhaps for all the same. I share the tests that I did.
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url]
DM
Dimitris Mitsopoulos
5 years ago
Hi all,

i had the same problem as everyone here:

"Can't forecast decode data. Also make sure your location is current. Verify your location from here"

I tried to disable the forecast through the module's admin and it did work for me.

However, this is not an acceptable solution...

Has the support team found a way to properly solve this?

Please let us know, because it is not right to offer a module that dysfunctions..

Thank you
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url]
Rifat Wahid Alif
Rifat Wahid Alif
5 years ago
Thanks all for the wait, We are giving an update with the fix very soon.

- Thanks
SP Chaudhary
SP Chaudhary
5 years ago
Can't current decode data. Also make sure your location is current. Verify your location from here https://openweathermap.org/find

Page Error: https://app.box.com/s/5pqjeacdeh7sjqsde8zfwsaeehjx6ms7
SP Weather Setting: https://app.box.com/s/18lw4exxwftm5dcmyv4fit2x23ykv64b

Thanks,
SP Chaudhary
Rifat Wahid Alif
Rifat Wahid Alif
5 years ago
Hi,
Thanks for the comment, maybe your location will be: [b]Disa, IN[/b] (http://prntscr.com/n1iobm).
Bob Bishop
Bob Bishop
4 years ago
Has this been updated yet so it works?
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
SP Weather 3.0 is released: [url="https://www.joomshaper.com/blog/update-sp-weather-3-0-is-here-with-5-api-platforms"]here[/url]
MA
MIHAI ALIN
4 years ago
hi. any chance to see the temperature as integer number, without decimals ? I mean: 13 not 13,45 ?

Thank you
Carlos Moreira
Carlos Moreira
4 years ago
This is a shame.
Nothing works.
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Sorry for this inconvenience. Could you please paste this code on the following file [b]/modules/mod_sp_weather/mod_sp_weather.php[/b] on 118 number line:

[code type="php"]$data['query']['results']['channel']['item']['condition']['temp'] = round($data['query']['results']['channel']['item']['condition']['temp']);[/code]

We will add this option on the future update.

- Thanks
Carlos Moreira
Carlos Moreira
4 years ago
How can I display the degrees as integer, without the decimal point and the figures afterwards?
Rifat Wahid Alif
Rifat Wahid Alif
4 years ago
Hi,
We are sorry for this inconvenience, Could you please try this solution: https://www.joomshaper.com/blog/sp-weather-module-updated-with-new-api-and-performance-boost#comment-9475,8402

- Thanks
M
Miguel Ángel
3 years ago
Hola.
Después de pelearme bastante, he descubierto cómo redondear la temperatura.
Yo lo he probado con la API de Yahoo, que es la que uso; pero supongo que funcionará con todas.
En el mod_sp_weather, aproximadamente en la línea 112 has de sustituir el código que hay por éste:
} elseif ($platform == 'yahoo') {
$data['query']['results']['channel']['item']['condition']['temp'] = round($helper->tempConvert(round($data['current']->condition->temperature, 'c')), 2);

Sign up for our newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.