Forecast Details not working Mobile

Post Reply
mikewaterford
Observer
Observer
Posts: 17
Joined: Tue Sep 26, 2017 7:52 pm
Station model: Davis Vantage Vue
Software: weather Display

Forecast Details not working Mobile

Post by mikewaterford » Fri Dec 08, 2023 11:03 am

When I check my website on mobile the forecast section is not updating. It shows 0 for all values.

Any ideas how to fix this?

https://www.waterford-weather.com is the address

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Forecast Details not working Mobile

Post by davidefa » Fri Dec 08, 2023 10:41 pm

This is due to darksky api 'going out of business' since last march, I have replaced it with openweathermap.org api ( which is still free for up to 1000 calls a day ).
You need to register and copy your openweathermap api key in the meteotemplate main setup in place of the darksky api key.
Then extract the attached mod in the main meteotemplate directrory ( it will overwrite ( the pages/lite/index.php script, so it is a good idea to backup the file, just in case you want to revert the mod )

P.S.
This mod is ok for both meteotemplate 18.0 and meteotemplate 19.0
Attachments
pages_lite_1.0.zip
(228.69 KiB) Downloaded 660 times
Image

mikewaterford
Observer
Observer
Posts: 17
Joined: Tue Sep 26, 2017 7:52 pm
Station model: Davis Vantage Vue
Software: weather Display

Re: Forecast Details not working Mobile

Post by mikewaterford » Sat Dec 09, 2023 8:36 pm

So in that lite folder I should just have the icons and index.php from what I downloaded??

Cheers

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Forecast Details not working Mobile

Post by davidefa » Sat Dec 09, 2023 9:13 pm

No, those are the only changes needed, extracting the archive only the index.php script, will be overwritten ( and a few icons added )
Image

mikewaterford
Observer
Observer
Posts: 17
Joined: Tue Sep 26, 2017 7:52 pm
Station model: Davis Vantage Vue
Software: weather Display

Re: Forecast Details not working Mobile

Post by mikewaterford » Mon Dec 11, 2023 12:12 pm

I followed the instructions as per post and the forecast page on mobile is still showing no updates. Other than adding the new api is there any other settings that need to be changed??

Cheers

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Forecast Details not working Mobile

Post by davidefa » Mon Dec 11, 2023 1:08 pm

Delete the file pages/forecast/cache/current.txt and reload the pages/lite/index.php page.
That file is cached for 15 minutes and I see contains the result of darksy api call.
( even simply reloading the page will delete the cache file )

P.S.
Forgot that I can test it myself, but i continue seeing ( in pages/forecast/cache/current.txt ) the result of the call to darksky api.
So double check that the pages/lite/index.php is indeed the script I posted ( and not the original one that should be dated 2018 )

P.P.S.
You deleted the cache file, but it is not regenerated calling pages/lite/index.php, so I suggest you to check the folder permission of pages/forecast/cache ( it should be writeable by php )
Image

mikewaterford
Observer
Observer
Posts: 17
Joined: Tue Sep 26, 2017 7:52 pm
Station model: Davis Vantage Vue
Software: weather Display

Re: Forecast Details not working Mobile

Post by mikewaterford » Tue Dec 12, 2023 11:15 am

Hi
I followed the instructions above with regards permissions etc. but still no updates to the forecasts.

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Forecast Details not working Mobile

Post by davidefa » Tue Dec 12, 2023 9:21 pm

I can see that your current.txt file contains:

Code: Select all

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
</body>
</html>
So something is not working properly.
If you want I can check directly on your server, but I need a write access to your server ( via ftp for example, or via the file manager of your server provider ).
If this is acceptable for you, you can pm me the access credentials.
Image

Post Reply