Depreciated Code Review - Extra Temp sensor code - RESOLVED

I have been running 1wire extra temp sensors for quite a few years now with WD and they work great. I have crons running to pull the temp readings out of the clientraw file on the website every hour and drop the temp with timestamp into a file called attic.log which works perfectly. The problem I have is with the 2 files below - something is not right and likely depreciated when I transferred everything over when erice went away.

Can someone take a look at the attached files - atticdatapull.php and atticdelete.php to see if they see something that is depreciated. The problem I am having is the atticdatapull.php output is producing bad plots using the attic.log (the master data file). The purpose of the atticdatapull.php is to go into the master log file (attic.log) and just pull 26 temp readings for jpgraph. For the life of me I don’t know why I needed atticdelete.php but it was necessary.

Bad output from atticdatapull.php it should be reading the temps at the end of the log file and plotting but everything says 32 degrees and there is a 757 in there. X axis is in error:

X_Axis = e> ead> >
Y_Axis = 32 32 757.4 32 32 32 32 32 32 32

Can someone please review atticdatapull.php and atticdelete.php to see if they can see anything depreciated. This worked for years

Thanks VERY much in advance
John


atticdatapull.txt (1.42 KB)

atticdelete.txt (374 Bytes)

atticlog.txt (1.3 KB)

Can you post the whole atticdatapull ?

Never mind, just missing the ?>. I confirm your result, looking at it now :slight_smile:

I got it working for me after some filename confusion which was a clue, my conclusion is that your script is unable to access http://www.auburnweatherlive.com/attic.log and is parsing the error page.

Hey Niko - Thanks so much. For some reason the new hosting company does not allow .log access. I changed all references to .txt and everything works. Thanks VERY much !!! You can see the chart at the following address : www.auburnweatherlive.com/atticgraph.php

Good deal :smiley:

Thinking about this later I realized that 757.4 is the 403 error code converted to Fahrenheit :lol:

Hey Niko - the 403 translation to Fahrenheit is interesting :slight_smile:
I remembered the delete files are used to clean the log file as I was getting temp spikes at 200 degrees every once and a while messing up the scale.