Indoor stats problem

Ok, so I just created wxlocal5.html, and added all the tags for my indoor stats. In Web Files/Web Page Setup under “Special File Conversion (for text file only)”, in Local file name 3, I have added the filename wxlocal5.html, and in the “Remote file name 3” field I have entered indoorstats.php (even though it’s created in HTML, it will still work - I call the .php file from within the new web page template). I have it set to update every 60 seconds, but it doesn’t seem to want to update. Am I putting this file in the right area?

Thanks for any help!

Dan

does the wxlocal5.html file exist in the WD web files folder
also note that wx5.html is created in that folder and then uploaded as the remote file name you have set

Yes, the wxlocal5.html file exists in the c:\wdisplay\webfiles folder.

Are these the correct settings for the Special File Conversion? Note where I have wxlocal5.html and indoorstats.php in Local and Remote filename 3.

As I understand it, it will take the “c:\wdisplay\webfiles\wxlocal5.html” file which contains all of the indoor tags like %indoortemp%, etc., and write a file to “c:\inetpub\wwwroot\weather\indoorstats.php”, and translate all the values coming from the weather console, correct?

that looks correct
and I have tested and it works here
note that its not wx5.html that will get created but indoorstats.php, I put you wrong there
but why do you have the clientraw.txt file and the associated remote file in the list?

If you read this page, in theory it should show the current indoor stats, but as you can see, it still says it was updated on November 14, 2016, and won’t update. This is where my problem lies.

http://portcoquitlamweather.ca/indoorstats.php

I have clientraw.txt and the associated recordextra.txt file being created because recordextra.txt is required for a script I’m running which uses the data in clientraw.txt.

check that actual file indoorstats.php in the webfiles folder where WD is installed
is that up to date
that is the first step

Ok, because I run the Saratoga script on my page, maybe I should give you more of a breakdown:

  • I’ve created a file called indoorstats.html, containing all of my indoor tags and put it into the webfiles folder.
  • I used the new page php script file to create indoorstats.php in my web directory to call indoorstats.html in this manner:

<?php langtrans('Indoor Stats'); ?>

<?php include("indoorstats.html"); ?>
  • I’ve set the Special File conversion as shown above.

Have I done everything correctly?

I think that remote filename 3 should be “indoorstats.html” so that wxlocal5.html gets converted and uploaded as that for your php page to include it.

Martyn might be on to something
but it would be good if you could answer this question

check that actual file indoorstats.php in the webfiles folder where WD is installed is that up to date that is the first step

I thought I did answer it, but if I didn’t, yes, it is in the webfiles folder, but shouldn’t this be the file that gets uploaded to my wwwroot folder? And no, it’s not op to date.

try deleting the indoorstats.php file to see if it gets recreated
your web page script ,indoorstats.html, is trying to load itself, instead of indoorstats.php, that is what Martyn is pointing out

I am getting a bit confused, but basically if indoorstats.php is a template header, menu and footer page and has an include for indoorstats.html then the .html should be the frequently updating page (converted from wxlocal5.html) and the .php should not need to be updating as it is static content?
If your put your tags in an indoorstats.html page they will not get converted - WD only converts tags in wxlocal pages.
indoorstats.html does not exist on your server.
What is in wxlocal5.html? Is it just the indoor tags or is it the complete template for indoorstats.php as well as the tags?
If we know that we can go from there. Please attach your wxlocal5.html so we can have a look :slight_smile:

You’re exactly right, Martyn, you don’t seem confused at all.

indoorstats.php will never change. It calls via PHP include, indoorstats.html, but I’m having a heck of a time trying to get indoorstats.html to be created by WD.

Here is the contents of my wxlocal5.html file:

"Current temperature: %indoortemp%

did you delete the file indoorstats.php to see if WD creates it?

It calls via PHP include, indoorstats.htm
but that is not the case in the code you posted

indoorstats.php is a static file that will never change.

If I said that in a previous post, I’ve changed how I’m doing this slightly. I’m no longer using the Custom Webpage Setup for this, I’m only using the Internet File Creation & Uploads app (in the Control Panel). In File #26, wxlocal5.html, I’ve set it to be 1 minute updates. If I click the SET button, and then click the “Show Upload File Times”, it shows me the advanced settings for wxlocal5.html. Attached is a screen shot of what I’m seeing. It looks accurate, but I don’t know what’s missing, because this baby ain’t uploading every minute! :?


you now have the remote file name as indoorstats.html
when before you needed it as indoorstats.php

also you have set a remote directory that is a local directory
that is not correct

I don’t use FTP to upload all of my files, I have WD save them locally without the use or need for an FTP client, so my remote filename is correct and the path is correct. I want the remote filename to be indoorstats.html so that this is the file that is created when it processes wxlocal5.html. Indoorstats.php is a static file that will never change.

but you do not use a local folder name as the remote directory
believe me
instead you set the webfiles folder as to where you want the file created

have you tried deleting the indoorstats.html file to see if that gets recreated
in the WD web files folder location (as set in the webfiles/web page setup)

post a screen shot of the create times (and not the upload times, since you are not needing to use ftp upload to a remote FTP server (i.e you should not have those settings in use, only the file create times)

I finally got this working. I decided I wanted to add a few more parameters to the testtags.txt file, in this manner:

$indoortemp = ‘%indoortempinmetric%’; //indoor temperature
$maxindoorhum = ‘%maxindoorhum%’; //max indoor humidity
$minindoorhum = ‘%minindoorhum%’; //min indoor humidity

…etc…

Then I called them up in ajax-dashboard.php in this manner:

Temperature: <?php echo $indoortemp ?>

High Humidity: <?php echo $maxindoorhum ?>%

Low Humidity: <?php echo $minindoorhum ?>%

When the page refreshes every 5 minutes, I see this:

Temperature: 26.4
High Humidity: 43%
Low Humidity: 37%

It all seems to work flawlessly, and it’s a lot less convoluted than the other way I was trying to do this! I just have to make it look nice now by putting all the data I want displayed into a table.

Thanks to each of you who helped me get through this.

Dan