Sandaysoft

Support forum for Cumulus weather station software
It is currently Thu May 23, 2013 10:45 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 3:58 pm 
Offline

Joined: Sat Nov 10, 2012 2:26 am
Posts: 30
Location: Hermon, Maine USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7, Linux
Obviously doing something all wrong here, but I can't find it in the code. I'm using Mark's Highcharts - Realtime package and
TNET's Cumulus RealTimeLog Script on a Linux server.

This is what I get when I go to the chart on my site:

Image

Of course, today is May 1st, not June 4th.

If I wait approximately 2 minutes the chart flips back to this multi-year view:

Image

Anyone know what I'm doing wrong? Probably something easy that I am just overlooking.

You can see it for yourself at: http://cheesewhiz.dyndns.org/realtimeCumulus.htm

Thanks,

--Kurt


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 4:23 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Your realtime.log http://cheesewhiz.dyndns.org/realtime.log has other date seprators I'm not sure if this causes the probles, I think Mark has a better answer..

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 4:27 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Your realtime.log http://cheesewhiz.dyndns.org/realtime.log has other date seprators I'm not sure if this causes the probles, I think Mark has a better answer.. and there is someting wrong with realtimeLogParser.php view http://cheesewhiz.dyndns.org/realtimeLo ... p?sce=view

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 4:42 pm 
Offline

Joined: Sat Nov 10, 2012 2:26 am
Posts: 30
Location: Hermon, Maine USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7, Linux
Oh, you're right, Ron. Nice catch.

Getting a "No valid data types supplied" from realtimeLogParser.php.

I'll investigate that.

Thanks,

--Kurt


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 4:53 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
I think you have to change the following lines in the .php file

Code:
$field_delimiter = ' ';
$date_delimiter = '-';
$time_delimiter = ':';


according to your realtime.log good luck

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 5:28 pm 
Offline

Joined: Sat Nov 10, 2012 2:26 am
Posts: 30
Location: Hermon, Maine USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7, Linux
When I change:

Code:
$date_delimiter = '-';

The date displayed is Friday, Nov 3! :bash:


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Wed May 01, 2013 7:44 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
your datenotation is 2013-04-30 ergo yyyy-mm-dd

mine is dd-mm-yyyy http://apeldoorn.hollandweather.net/rt/ I think there should be changed somerthing in the script ( js script) unfortunally I've no idea what , wating for Mark Mc :?:

edit: the realtimeparser gives the same error anyway http://cheesewhiz.dyndns.org/realtimeLo ... p?sce=view

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Fri May 03, 2013 2:14 pm 
Offline

Joined: Sat Nov 10, 2012 2:26 am
Posts: 30
Location: Hermon, Maine USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7, Linux
I believe it is normal for realtimeparser.php to return that error without any input. According to the comments in Mark's PHP script:

Quote:
Call this script as e.g. ...realtimeLogParser.php?count=N&temp&dew
Where count=N returns the last N rows worth of data from the log file
if the count parameter is omitted all available records are returned.

So, I don't think that is the cause. I've double and triple checked all the Linux permissions and the time and date delimiters. No go.

These are the http calls to my server:

216.x.x.x [03/May/2013:10:03:23 -0400] "GET /realtimeLogParser.php?count=180&rfall&press&wspeed&temp HTTP/1.1" 200 14384 "http://cheesewhiz.dyndns.org/realtimeCumulus.htm" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
216.x.x.x - - [03/May/2013:10:04:23 -0400] "GET /realtime.txt?_=1367589862022 HTTP/1.1" 200 270 "http://cheesewhiz.dyndns.org/realtimeCumulus.htm" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
216.x.x.x - - [03/May/2013:10:05:23 -0400] "GET /realtime.txt?_=1367589922023 HTTP/1.1" 200 269 "http://cheesewhiz.dyndns.org/realtimeCumulus.htm" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"


I have no idea what the problem is.


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Fri May 03, 2013 2:20 pm 
Offline

Joined: Sat Nov 10, 2012 2:26 am
Posts: 30
Location: Hermon, Maine USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7, Linux
If I input the following URL: http://cheesewhiz.dyndns.org/realtimeLogParser.php?count=5&temp&dew

This is the output:

Code:
{"temp":[[1117879915000,54.4],[1117879975000,54.5],[1117880035000,54.5],[1117880095000,54.5],[1117880155000,54.6]],"dew":[[1117879915000,42.1],[1117879975000,42.2],[1117880035000,41.7],[1117880095000,41.7],[1117880155000,42.3]]}

So, I think it is working.


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Fri May 03, 2013 2:33 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2517
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
The realtimeLogParser is returning the incorrect date for some reason.

Can you look at your realtime table in MySQL and check what the date/times are showing up as there?

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Fri May 03, 2013 2:47 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
The data are not extracted from mysql but from http://cheesewhiz.dyndns.org/realtime.log

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Fri May 03, 2013 4:19 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2517
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Ah, sorry, still catching up from a few days away in Scotland.

Try the following script - I have added a config param of the date format ($date_format = 'dmy'; is the default), change that to 'ymd'
(I think 0.1 was the last one I used? Sorry but I am using the SQL version).

Renaming from .txt to .php obviously ;)


You do not have the required permissions to view the files attached to this post.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Sat May 04, 2013 2:59 am 
Offline

Joined: Sat Nov 10, 2012 2:26 am
Posts: 30
Location: Hermon, Maine USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7, Linux
That's done it Mark!

Your code, with the settings below, made it work:
Code:
// The name of your realtime.txt log file
$logfile = 'realtime.log';
// The various delimiters used in your version of realtime.txt
$field_delimiter = ' ';
$date_delimiter = '-';
$time_delimiter = ':';
$date_format = 'ymd';  // valid formats are 'dmy', 'mdy', and 'ymd'

Part of what was throwing me was the "The various delimiters used in your version of realtime.txt" line.
I believe that should read, at least in my case, "The various delimiters used in your version of realtime.log" because the delimiters in my realtime.txt and realtime.log files are not the same.
In any case, it would not have worked without the addition of your "$date_format = " snippet.

BTW, I do have MySql on my Linux box and would much prefer to have the capability to pull near-realtime and historical data from there. I know how to get the data into the db, I just don't know how to get it out. SO, if you happen to have some old code laying around that you aren't using... :)

Thanks so much...again!

--Kurt


Top
 Profile  
 
 Post subject: Re: HighCharts displaying wrong date
PostPosted: Sat May 04, 2013 1:27 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2517
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
N0BGS wrote:
That's done it Mark!
Great.
N0BGS wrote:
BTW, I do have MySql on my Linux box and would much prefer to have the capability to pull near-realtime and historical data from there. I know how to get the data into the db, I just don't know how to get it out. SO, if you happen to have some old code laying around that you aren't using... :)

Just take a look at my now/index page... ;)
http://weather.wilmslowastro.com/realti ... p?view=sce

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group