Page 4 of 4

Re: PHP Script - RealTimeLog PHP Script

Posted: Sun 30 Nov 2008 11:23 pm
by TNETWeather
Unless you have some way of having this script run once a minute, there is not much point in setting it up.

The error is something wrong on line 409 though I really can't tell what the issue is.

Re: PHP Script - RealTimeLog PHP Script

Posted: Sun 30 Nov 2008 11:38 pm
by firewall
Unless you have some way of having this script run once a minute, there is not much point in setting it up.
OK, thanks.

Re: PHP Script - RealTimeLog PHP Script

Posted: Sun 30 Nov 2008 11:42 pm
by andro700
I got mine working with the program that pinto posted System Scheduler. The graphs are updating. I used the script that he posted as well. Hats off to Kevin and Jozef for all the time you guys spend on this program.

Chuck

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 01 Dec 2008 1:54 pm
by andro700
Well I thought it was going good but when I got up this morning and checked it had stopped working last night around 2030. I fiddled with it and could not get it to work. the realtime.log would not update with new data. I deleted all the data in the realtime.log and no data still. Maybe I should not have done that. I don't know if I want to delete it because I had to open of a ticket with e-rice so I could change the permissions to 666. The script from what I can tell is running because I checked the log from System Scheduler and it had logged them each minute. Back to square one or just forget it since there is the problem with running cron jobs with e-rice.

Chuck

Re: PHP Script - RealTimeLog PHP Script

Posted: Tue 02 Dec 2008 3:32 pm
by andro700
I don't know whey but my realtime.log is not updating and I have the script that pinto posted on this thread. The only way it will update is if I debug the realtime.log then it will show on the log. I wish I knew what the heck the problem is. I had it working and just quit. I have it updating once a minute. Is the problem when I run the dubug that it makes it stop updating. I know it is probably a stupid question but just thought I had to ask. All the permissions are correct realtimelog.php is 755 and the realtime log is 666.

Chuck

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 3:22 pm
by TrOjAn
Hmm.. this is neat, however, after spending my day off, 9 hours so far ;) I am still getting errors.

The update script is fine, there is data in my realtime.log but I get this error on the debug page of wind.php,

DEBUG> DEBUG TURNED ON
DEBUG> Script is running in: cgi-fcgi mode
DEBUG> Server Path: /home/uktrashorg/public_html
DEBUG> Request URI: /graphs/wind.php?debug
DEBUG> Server Name: http://uktrash.org
DEBUG> PHP Self: /graphs/wind.php
DEBUG> Path is set to: /home/uktrashorg/public_html/graphs
DEBUG> JpGraph is set to: ../jpgraph/src/
DEBUG> obtaining data from: ../graphs/realtime.log
DEBUG> Obtained 15
DEBUG> Want to obtain 24
DEBUG> Starting Array Sweep
DEBUG> Collected 0 records.
DEBUG> TempUnit =
DEBUG> PressUnit =
DEBUG> RainUnit =
DEBUG> WindUnit =
DEBUG> Completed Array Sweep. Reversing Data

Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/uktrashorg/public_html/graphs/wind.php on line 127

Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/uktrashorg/public_html/graphs/wind.php on line 128

Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/uktrashorg/public_html/graphs/wind.php on line 129
DEBUG> Output of Xaxis Array

DEBUG> Output of Y1axis Array

DEBUG> Output of Y2axis Array

DEBUG> Starting Graph Creation
JpGraph Error Empty input data array specified for plot. Must have at least one data point.

Yes the files are in different locations but I am certain that the paths are correct in the configs..

Any help for a newbie :D

TrOjAn

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 3:47 pm
by TNETWeather
Your realtime.log file does not have anything for the graphs to plot.

The graphs are designed to look for timestamps that end in 00, or 00 30 or 00 15 30 45

You have none of these in your file.

Realtimelog.php works best if the data is updated once a minute.

Code: Select all

20--
2008-12-08 14:05:36 8.8 73 4.2 3.1 6.9 180 0.0 0.0 1021.2 S 1 mph C mb mm 13.7 -1.0 7.4 615.3 0.3 18.6 50 8.4 +1.0 9.6 13:51 -0.5 03:06 5.4 14:02 9.8 13:17 1029.2 00:09 1021.2 14:04 1.8.4 589 9.2 8.8 7.8 0 0 0
2008-12-08 14:05:36 8.8 73 4.2 3.1 6.9 180 0.0 0.0 1021.2 S 1 mph C mb mm 13.7 -1.0 7.4 615.3 0.3 18.6 50 8.4 +1.0 9.6 13:51 -0.5 03:06 5.4 14:02 9.8 13:17 1029.2 00:09 1021.2 14:04 1.8.4 589 9.2 8.8 7.8 0 0 0
2008-12-08 14:13:05 8.4 75 4.2 0.7 2.2 225 0.0 0.0 1021.2 SW 1 mph C mb mm 13.9 -1.0 7.4 615.3 0.3 18.6 50 8.4 +0.8 9.6 13:51 -0.5 03:06 5.4 14:02 9.8 13:17 1029.2 00:09 1021.1 14:08 1.8.4 589 8.3 8.4 7.4 0 0 0
2008-12-08 14:26:35 9.0 73 4.4 2.2 5.4 180 0.0 0.0 1020.8 S 1 mph C mb mm 14.5 -0.9 7.4 615.3 0.3 18.5 50 9.0 +0.8 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.8 14:25 1.8.4 589 10.7 9.0 8.1 0 0 0
2008-12-08 14:29:35 9.0 73 4.4 3.1 5.4 180 0.0 0.0 1020.8 S 1 mph C mb mm 14.6 -0.9 7.4 615.3 0.3 18.5 50 8.6 +0.8 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.8 14:25 1.8.4 589 9.2 9.0 8.1 0 0 0
2008-12-08 14:41:35 8.2 76 4.2 3.8 5.4 225 0.0 0.0 1020.7 SW 2 mph C mb mm 15.1 -0.9 7.4 615.3 0.3 18.5 50 7.4 +0.6 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.7 14:30 1.8.4 589 9.8 8.2 7.2 0 0 0
2008-12-08 14:41:35 8.2 76 4.2 3.8 5.4 225 0.0 0.0 1020.7 SW 2 mph C mb mm 15.1 -0.9 7.4 615.3 0.3 18.5 50 7.4 +0.6 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.7 14:30 1.8.4 589 9.8 8.2 7.2 0 0 0
2008-12-08 14:43:05 8.1 76 4.1 3.8 7.6 180 0.0 0.0 1020.9 S 2 mph C mb mm 15.2 -0.9 7.4 615.3 0.3 18.5 50 7.3 +0.5 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.7 14:30 1.8.4 589 9.2 8.1 7.1 0 0 0
2008-12-08 14:44:35 8.1 76 4.1 1.6 3.8 225 0.0 0.0 1020.8 SW 1 mph C mb mm 15.2 -0.9 7.4 615.3 0.3 18.5 50 8.1 +0.5 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.7 14:30 1.8.4 589 9.2 8.1 7.1 0 0 0
2008-12-08 14:53:35 7.7 78 4.1 1.6 5.4 270 0.0 0.0 1020.6 W 1 mph C mb mm 15.5 -0.8 7.4 615.3 0.3 18.5 50 7.7 +0.4 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.6 14:53 1.8.4 589 6.0 7.7 6.7 0 0 0
2008-12-08 14:56:35 7.7 78 4.1 2.2 5.4 315 0.0 0.0 1020.7 NW 1 mph C mb mm 15.6 -0.8 7.4 615.3 0.3 18.4 50 7.7 +0.3 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.6 14:53 1.8.4 589 5.4 7.7 6.7 0 0 0
2008-12-08 15:02:35 7.5 79 4.1 2.2 4.5 315 0.0 0.0 1020.7 NW 1 mph C mb mm 15.7 -0.8 7.4 615.3 0.3 18.4 50 7.5 +0.3 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.5 15:00 1.8.4 589 6.0 7.5 6.5 0 0 0
2008-12-08 15:04:05 7.5 79 4.1 0.7 3.8 225 0.0 0.0 1020.6 SW 1 mph C mb mm 15.8 -0.8 7.4 615.3 0.3 18.4 50 7.5 +0.3 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.5 15:00 1.8.4 589 6.0 7.5 6.5 0 0 0
2008-12-08 15:05:36 7.5 79 4.1 3.1 6.0 225 0.0 0.0 1020.7 SW 1 mph C mb mm 15.8 -0.8 7.4 615.3 0.3 18.4 50 6.9 +0.3 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.5 15:00 1.8.4 589 6.0 7.5 6.5 0 0 0
2008-12-08 15:37:06 6.9 80 3.7 2.2 3.8 270 0.0 0.0 1020.2 W 1 mph C mb mm 16.8 -0.7 7.4 615.3 0.3 19.3 51 6.9 -0.1 9.6 13:51 -0.5 03:06 5.4 14:02 10.7 14:18 1029.2 00:09 1020.2 15:24 1.8.4 589 6.9 6.9 5.8 0 0 0

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 4:04 pm
by TrOjAn
Ahaaa now that makes sense.. I am running the .vbs script via my home automation server every 90 seconds so I will have to wait for the info to come in at the hour +15 + 30 etc..

Thanks,

TrOjAn

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 4:27 pm
by TrOjAn
OK, had a mate re write the script for Homeseer Users ;) now triggering every 60 seconds.. data pouring in so Ill wait till the half hour mark and retry again

TrOjAn

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 5:26 pm
by TrOjAn
Kevin,

You say it takes data from 15, 30 45 and 00 so do we need to update every minute? I can schedule it to update every 15 minutes relative to the hour, would that work?

I am nearly there, it is complaining now of only having 1 point for data ie: 5pm it appears to not like the 15, 30 and 45

TrOjAn

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 7:33 pm
by pinto
they are looking fine to me

try

Code: Select all

 temp.php?freq=2&debug
freq=2 ~~ your script will use 00 15 30 and 45
no parameter ~~ your script wil use 00

(its in the documentation)

Re: PHP Script - RealTimeLog PHP Script

Posted: Mon 08 Dec 2008 7:44 pm
by TrOjAn
Jozef,

After I posted that I then went on to read the docs :oops: spotted that after, thanks for the reply and yes, they appear to be there now.. Ill see how it goes then sort out a donation I think.

TrOjAn