If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Yet Another Dayfile Reader (PHP)

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
pernaczy
Posts: 102
Joined: Thu Nov 15, 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: XP SP3
Location: Niesiolowice, Northern Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby pernaczy » Wed Dec 24, 2014 2:33 pm

dygon wrote:The file is in the folder daytime.txt Cumulus / data /
thank you

Hi,
Your file "basic.php" is looking for thr file "daytime.txt" ON THE SERVER. You MUST send the file "daytime.txt" to the server. This file is being created by Cumulus once a day (just after midnight) and located in the directory Cumulus/data. You must send it from there to the server only ONCE A DAY.
Cheers,
Piotr
The day when I have learned anything is not the lost one.

Image

dygon
Posts: 24
Joined: Tue Dec 02, 2014 9:04 pm
Weather Station: Oregon WMR200
Operating System: windows 7
Location: Italia

Re: Yet Another Dayfile Reader (PHP)

Postby dygon » Wed Dec 24, 2014 3:27 pm

Thanks for your help.
But how do I send the file to the server? and in which folder of my site I have to send it?

thanks again and sorry for my lack of experience and for my English.

User avatar
pernaczy
Posts: 102
Joined: Thu Nov 15, 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: XP SP3
Location: Niesiolowice, Northern Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby pernaczy » Wed Dec 24, 2014 4:11 pm

dygon wrote:Thanks for your help.
But how do I send the file to the server? and in which folder of my site I have to send it?
thanks again and sorry for my lack of experience and for my English.

1. To send "Dayfile.txt" file to the server I'm using "CumulusToolbox" application (you can find it here: http://wiki.sandaysoft.com/a/Toolbox)
2. Sorry for my mistake in my previous post. In fact the main file you need to configure is "betel_ReadDayfile.php (in line 27 you have to show the place you have the "dayfile.txt" file). Your "basic.php" file is just presenting all the rcords that are defined in the "betel_ReadDayfile.php" file.
Best Regards,
Piotr
The day when I have learned anything is not the lost one.

Image

dygon
Posts: 24
Joined: Tue Dec 02, 2014 9:04 pm
Weather Station: Oregon WMR200
Operating System: windows 7
Location: Italia

Re: Yet Another Dayfile Reader (PHP)

Postby dygon » Wed Dec 24, 2014 11:36 pm

thanks it works now!

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Yet Another Dayfile Reader (PHP)

Postby n9mfk » Mon Apr 27, 2015 2:56 pm

ok Im am just get this set up It looks grate when it first loads
but if I pick any thing it crashes What have i missed?


http://n9mfk.info/cumulus/wxdatasummary.php

http://n9mfk.info/data/dayfile.txt

Thanks Beau

User avatar
mcrossley
Posts: 4851
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby mcrossley » Mon Apr 27, 2015 3:08 pm

The reader script cannot be found...

http://n9mfk.info/cumulus/betel_readDayfile.php

User avatar
mcrossley
Posts: 4851
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby mcrossley » Mon Apr 27, 2015 3:16 pm

Also, you have a link at the bottom of each page saying it is 'valid XHTML 1.0', if you click it the first and only two pages I looked at on your site are not valid!

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Yet Another Dayfile Reader (PHP)

Postby n9mfk » Mon Apr 27, 2015 9:23 pm

Hi mark think l got it

http://n9mfk.info/cumulus/wxdatasummary.php?pane=1
looks like missing some 2009 data
I fixed the w3c on other pages
thanks Beau

water01
Posts: 1387
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Gurney Slade,Somerset, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby water01 » Mon Apr 27, 2015 9:41 pm

I think you temperature data is completely wrong or your living on Mercury, 230F in July 2012!!!!!!!!

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Yet Another Dayfile Reader (PHP)

Postby n9mfk » Mon Apr 27, 2015 11:15 pm

Hi David
here the noaa report for that date http://n9mfk.info/cumulus/wxnoaaclimate ... 2012&mo=07

what the best way to clean up my data file?
thanks beau

water01
Posts: 1387
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Gurney Slade,Somerset, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby water01 » Tue Apr 28, 2015 7:35 am

I am not the best person to ask as I have had no problems with my dayfile.txt. If I look around your site most of the other data seems to be correct for your part of the world.

I suggest you take a look at http://wiki.sandaysoft.com/a/Dayfile.txt and see if this will allow you to correct your data.

User avatar
steve
Cumulus Author
Posts: 25908
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: Davis VP2
Operating System: Raspbian
Location: Sanday, Orkney
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby steve » Tue Apr 28, 2015 7:54 am

The dayfile data looks fine to me, based on the NOAA report. But there's something odd about the summary page, it displays reasonable data when it first loads, but then starts going wrong when you start clicking the buttons. It looks like it's taking figures that are already in F and doing a C to F conversion on them. Misconfiguration somewhere?
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Like Cumulus and want to support it? Please donate! Image

water01
Posts: 1387
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Gurney Slade,Somerset, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby water01 » Tue Apr 28, 2015 8:06 am

The first Seasonal data display looks fine, and the first Max Temp display for 2015 looks fine then if you select another year it goes haywire, and then if you reclick on Seasonal it is also now incorrect, so I think Steve has spotted your problem i.e. not the data that is at fault but a problem in the dayfile reader in the temperature conversion.

The puzzling thing is that if you click on the temperature selection button and select C it does a conversion albeit on data that is incorrect somehow.

User avatar
beteljuice
Posts: 2445
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Tue Apr 28, 2015 10:22 am

It doesn't seem to be 'reading' the Saratoga $SITE variables (Units Of Measure).
Have you included them on the page as described in the 'How To ....' ?

If your template DOESN'T have the Saratoga $SITE[vars] then you will need to edit..

Code: Select all

/* Units Of Measure - *should* be able to 'read' saratogaWX templates
Your 'native' datafile units - these will also be the default display units (unless overwritten by 'cookies' OR saratogaWX)
'temp' = 'C' OR 'F'
'rain' = 'mm' OR 'in'
'wind' = 'mph' OR 'm/s' OR 'km/h' OR 'kts'
'baro' = 'hPa' OR 'mb' OR 'inHg'
Change in the array BELOW !
*/
$uom = array(
            'temp' => (isset($SITE['uomTemp']) ? substr($SITE['uomTemp'], -1) : 'C'),
            'rain' => (isset($SITE['uomRain']) ? substr($SITE['uomRain'], 1) : 'mm'),
            'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'km/h'),
            'baro' => (isset($SITE['uomBaro']) ? substr($SITE['uomBaro'], 1) : 'hPa')
        );
Image
......................Imagine, what you will KNOW tomorrow !

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Yet Another Dayfile Reader (PHP)

Postby n9mfk » Tue Apr 28, 2015 1:08 pm

Hi all,

I have now set the unis by had
also i have noted it look like some 2009 data is missing

in the last group
http://n9mfk.info/cumulus/wxdatasummary.php?pane=1

but us you look http://n9mfk.info/cumulus/wxnoaaclimate ... 2009&mo=01 its all there

thanks


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 2 guests