api.php not updating current data
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
api.php not updating current data
My weather page http://www.powellweather.net has quit updating the CurrentData and SSdials. In spite of everything I know to be true, I decided that it would be a simple fix, probably a password issue. Instead of developing a plan and proceeding systematically, I dove right in and starting making changes. Well if it's not the password it's probably . . .
I use Weather Display to send my data. WD is set up as: where /template is a subdomain of www.powellweather.net.
The file structure is root/www.powellweather.net/public_html/template
so
root/template.powellweather.net/public_html/ puts you in /template. This path operates without error in WD. This has been my setup until it stopped working.
My problem is I don't think that my current data is actually making it to /template on the host computer.
As I understand it, http://template.powellweather.net/public_html/api.php calls and
runs the script api.php on the web server. As api.php runs a file is created meteotemplateLive.txt and maybe apiCache.txt that are used by the various blocks for input.
I would think that the meteotemplateLive.txt file would have a current date and time stamp. That isn't happening. Is there a copy stored elsewhere than in /template
1st I would like to know if my logic is correct about api.php creating meteotemplateLive.txt.
2nd, how can I check if current data is being sent by WD to the web host.
And most important, how can I get everything back on line ASAP.
For extra credit, how does WD send current data as it calls api.php on the web server. Is it a txt string appended to the end of api.php?
As you can tell, I know about enough to be dangerous, and that's exactly what I did.
Thank you in advance for any help or words of wisdom.
Terry
I use Weather Display to send my data. WD is set up as: where /template is a subdomain of www.powellweather.net.
The file structure is root/www.powellweather.net/public_html/template
so
root/template.powellweather.net/public_html/ puts you in /template. This path operates without error in WD. This has been my setup until it stopped working.
My problem is I don't think that my current data is actually making it to /template on the host computer.
As I understand it, http://template.powellweather.net/public_html/api.php calls and
runs the script api.php on the web server. As api.php runs a file is created meteotemplateLive.txt and maybe apiCache.txt that are used by the various blocks for input.
I would think that the meteotemplateLive.txt file would have a current date and time stamp. That isn't happening. Is there a copy stored elsewhere than in /template
1st I would like to know if my logic is correct about api.php creating meteotemplateLive.txt.
2nd, how can I check if current data is being sent by WD to the web host.
And most important, how can I get everything back on line ASAP.
For extra credit, how does WD send current data as it calls api.php on the web server. Is it a txt string appended to the end of api.php?
As you can tell, I know about enough to be dangerous, and that's exactly what I did.
Thank you in advance for any help or words of wisdom.
Terry
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
Re: api.php not updating current data
davidefa, I changed the URL.
Shouldn't meteotemplate.txt in /template root change each time the api.php script is run?
I don't know how to tell if the api.php script is being call and run. That would tell me if Weather Display is sending data.
Thanks
Terry
Shouldn't meteotemplate.txt in /template root change each time the api.php script is run?
I don't know how to tell if the api.php script is being call and run. That would tell me if Weather Display is sending data.
Thanks
Terry
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: api.php not updating current data
Yes, the file is meteotemplateLive.txt, the date of the file should change each time api.php is called.
The attached file ( params.php ) simply dumps the GET parameters to a file ( params.txt )
If you point WD to this params.php you should see params.txt growing ( data are appended )
The attached file ( params.php ) simply dumps the GET parameters to a file ( params.txt )
If you point WD to this params.php you should see params.txt growing ( data are appended )
- Attachments
-
- params.php.zip
- (294 Bytes) Downloaded 492 times
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
Re: api.php not updating current data
Thank you, davidefa.
That's a cool script. It's filling with data.
So this data is passed thru api.php and used to create Meteotemplate.txt.
Meteotemplate.txt is not being updated so that would indicate that the api.php has been corrupted?
Do you agree?
That's a cool script. It's filling with data.
So this data is passed thru api.php and used to create Meteotemplate.txt.
Meteotemplate.txt is not being updated so that would indicate that the api.php has been corrupted?
Do you agree?
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
Re: api.php not updating current data
davidefa, That script was of tremendous value, it eliminated Weather Display as the problem. I had a newer version of Meteotemplate downloaded, so I copied the api.php script from it to the version I'm running.
Current conditions is now working with correct time and data. ssGauges isn't working but I suspect that's a file caching problem. Also I turned off Cloudflare when I starting having a problem.
Thanks again
Terry
Current conditions is now working with correct time and data. ssGauges isn't working but I suspect that's a file caching problem. Also I turned off Cloudflare when I starting having a problem.
Thanks again
Terry
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: api.php not updating current data
I think Jachym should chime in ( by the way are you using now a api.php from a different version or from same meteotemplate 15.0 as in your site?! )
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
Re: api.php not updating current data
I used the api file from v 15
I really need to update ver. I've put it off because everything had been working so well. Seems like every time I upgrade something, the upgrade breaks something.
I haven't seen Jachym on here much of late.
I really need to update ver. I've put it off because everything had been working so well. Seems like every time I upgrade something, the upgrade breaks something.
I haven't seen Jachym on here much of late.
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
clientraw.txt
I am still trying to understand the data import in MT.
Where does clientraw.txt come from. I don't see a reference to it in api.php. I do see the file in the WDclientraw directory, however it is almost a month old.
I'm assuming that the 'WD' is for WeatherDisplay. Is Weather Display supposed to create it or does MT create the file. Shouldn't it be in the root of \template and not in a subdirectory. Maybe my api.php isn't working correctly.
Or maybe I'm not seeing the forest for the trees. (Something my Father used to say)
Terry
Where does clientraw.txt come from. I don't see a reference to it in api.php. I do see the file in the WDclientraw directory, however it is almost a month old.
I'm assuming that the 'WD' is for WeatherDisplay. Is Weather Display supposed to create it or does MT create the file. Shouldn't it be in the root of \template and not in a subdirectory. Maybe my api.php isn't working correctly.
Or maybe I'm not seeing the forest for the trees. (Something my Father used to say)
Terry
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: api.php not updating current data
- what software are you using for the 'database update' ( feeding weather station data to meteotemplate )?
- does it call api.php directly?
- does it upload a text file and then a cron job calls update/update.php?
P.S.
By the way your signature points to
http://www.template.powellweather.net/indexDesktop.php
which have all icons not showing correctly ( and ssgauges are dead )
Even www.powellweather.net redirects to the same url
if I click on the home icon I'm redirected to
http://www.powellweather.net/template/indexDesktop.php
which shows your page correctly.
I don't know if this is important ( maybe is only 'signature related' ), but verify your configurations only use the second form
P.P.S.
My dumbness, you have already replied to my questions in the previous posts.
So your software is calling api.php directly, so no txt file is needed ( maybe this stale file was generated during some test you did )
- does it call api.php directly?
- does it upload a text file and then a cron job calls update/update.php?
P.S.
By the way your signature points to
http://www.template.powellweather.net/indexDesktop.php
which have all icons not showing correctly ( and ssgauges are dead )
Even www.powellweather.net redirects to the same url
if I click on the home icon I'm redirected to
http://www.powellweather.net/template/indexDesktop.php
which shows your page correctly.
I don't know if this is important ( maybe is only 'signature related' ), but verify your configurations only use the second form
P.P.S.
My dumbness, you have already replied to my questions in the previous posts.
So your software is calling api.php directly, so no txt file is needed ( maybe this stale file was generated during some test you did )
- WyoDog
- Advisor

- Posts: 67
- Joined: Wed Aug 23, 2017 6:39 pm
- Location: Powell, WY USA
- Station model: Davis Pro2
- Software: Weather Display
- Contact:
Re: api.php not updating current data
thank you David
My weather sticker isn't updating, it was previously. I was wondering if the weathersticker block got its data from clientraw.txt.
I think that I have the url issue sorted out. I had a re-direct pointing to itself. I'm hoping once the cache's have been flushed and rewritten, that it will have taken care of it by itself.
Thanks
Terry Foley
My weather sticker isn't updating, it was previously. I was wondering if the weathersticker block got its data from clientraw.txt.
I think that I have the url issue sorted out. I had a re-direct pointing to itself. I'm hoping once the cache's have been flushed and rewritten, that it will have taken care of it by itself.
Thanks
Terry Foley
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: api.php not updating current data
Yes, stickersWD need clientraw.txt file ( regularly updated ).To use this script [stickersWD] you need to be using the Weather Display software and have a periodically updated clientraw.txt file to your server.
The 'non standalone' stickers plugin should do the same ( extracting data from database ).