Page 1 of 1

Trouble getting ambientweather-plugin to work

Posted: Wed 31 Jul 2019 8:09 pm
by mstrandbo
I've never used Saratoga templates before, so I might have done some errors already.

But even after configuring my apikey and mac-address in the Settings-weather.php file, AWNtags.php keeps telling me I need to configure these variables.
AWNtags.php includes Settings.php though, not Settings-weather.php... So how would it know about my variables anyway?
I tried adding an php include Settings-weather.php to the Settings.php-file, and then opening AWNtags.php. That gave me a new error message:
Error: Ambientweather.net returns applicationKey-invalid. Fix in Settings-weather.php

Which is for the template and nothing I can change. Is something broken?

Re: Trouble getting ambientweather-plugin to work

Posted: Thu 01 Aug 2019 1:59 am
by saratogaWX
What is the URL to your website showing the problem?

Re: Trouble getting ambientweather-plugin to work

Posted: Thu 01 Aug 2019 6:47 am
by mstrandbo
Somehow it works better today, but I still needed my "hack" to make it work.

The URL is https://vær.strandbo.no/saratoga/wxindex.php at the moment.

I added
require_once("Settings-weather.php");

at the end in Settings.php, without that AWNtags.php just told me I needed to specify my AW-ids, and the main site just showed me some generic weather it seemed.
There's some quibbles to sort out still, but everything looks better today :)

Re: Trouble getting ambientweather-plugin to work

Posted: Thu 01 Aug 2019 2:23 pm
by saratogaWX
You may be using an old copy of the template. The template check utility (check-fetch-times.php) is from 2008.

You should download and install a current copy of that utility from here then I’ll be better able to diagnose the issues. If your template really comes from an original Weather-Display WD-World-ML, then you’ll need to use the Upgrade to V3 template on my site to get a complete set of replacement scripts that allow non-Weather-Display software to operate your website.

Re: Trouble getting ambientweather-plugin to work

Posted: Thu 01 Aug 2019 4:10 pm
by mstrandbo
Hmm, that's weird. I just downloaded everything yesterday. I'll doublecheck everything again tonight :)

Re: Trouble getting ambientweather-plugin to work

Posted: Thu 01 Aug 2019 10:29 pm
by saratogaWX
You may have downloaded the template from the old WD-only version. It currently says you're running
version. :shock:

Make sure you use https://saratoga-weather.org/wxtemplates/install.php as the source of the downloads.

If you'd used my /template/ directory.. that's the old (deprecated) one which will not work with anything but Weather-Display.

Re: Trouble getting ambientweather-plugin to work

Posted: Wed 07 Aug 2019 8:07 am
by mstrandbo
You might have been right :) It's working now after a reinstall and checking of dates :D

Re: Trouble getting ambientweather-plugin to work

Posted: Wed 07 Aug 2019 8:05 pm
by saratogaWX
Using https://vær.strandbo.no/saratoga/check- ... ?show=info shows a problem with the ./cache/ directory .. it's not working, so your site will be very slow as the template is unable to use cached responses from external websites.
Directories/files status for Base-World, AWN-Plugin

Status of needed subdirectories/images:

Settings.php Cache file directory in $SITE['cacheFileDir']='./cache/' exists, with permissions=drwxrwxr-x [0775]

Error: Unable to open/write to ./cache/test.txt file so so Cache directory is NOT fully functional.
You may need to use the control panel to change permissions to 766, then run the above URL to check for a success message writing the test file.
The ./cache/ directory should be writable by PHP.

Re: Trouble getting ambientweather-plugin to work

Posted: Thu 08 Aug 2019 10:19 am
by mstrandbo
I hadn't checked that yet - but I thought it was a bit slow :)
That did the trick, though. Thanks again, now I'll just have to find the time to customize it and get an DarkSky API-key.