Sandaysoft

Support forum for Cumulus weather station software
It is currently Sat May 25, 2013 3:00 pm
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  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: External Tag files
PostPosted: Sat Sep 20, 2008 5:48 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
Really should be doing something else today, but... hey..

I created two tag files.

status-current.txt

Simulates a WD clientraw.txt file (close but not quite). The not quite part is that a WD clientraw.txt file uses values of a specific types regardless of what the user has chosen to view the data in. This is using the values as chosen by the user which means you have to know what those values are (it is in alltags.txt). However to attempt to use this output file like a real WD clientraw.txt file it would need to be processed on the web side.... something I will do next.

Also, I hard coded the station name, and the lat and long info as the tags didn't provide the right format for either. They would not change once you set it up anyway...

alltags.txt

** REPLACED BY XML FILE MENTIONED BELOW **
Contains all the known tags available in a single file.

I removed the <#wdirdata> and <#wspddata> tags though.

You can see the output of them via:

status-current.txt


The intention is to create a simple PHP based templated system that reads this data and displays current weather conditions dynamically.

A number of issues arise:

1) It appears that the process files are only uploaded when the full webpage is uploaded. Ideally, it would be as often as the realtime.txt file is. If there were a check mark on the settings page to indicate that should take place, that would be a nice option.

2) Obviously, there are a lot of tags that simply don't exist. Some comon ones are all of the Solar stuff (UV, Wm/2), some others like humidex etc...

3) Cumulus doesn't use a rename upload. This can cause issues if a file is being read and it has not yet been totally uploaded yet. When using a rename upload, the new file is uploaded using a tmp filename, and after it is uploaded, it is renamed to the real filename. This is a common feature for many data upload programs as it eliminates short pulls from the local server.
It would be nice to see that as an option in the ftp setup area.

It appears however, that the processed files are only uploaded at the same time as the rest of the full web. It would be nice if there were a check mark in the files are to stipulate that it should be sent at the same time as the realtim.txt file.

Oh, yeah... almost forgot...

Source for External Tag Files

Below are links to the source files of the two above:

status-current.src

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Last edited by TNETWeather on Wed Sep 24, 2008 2:46 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Sat Sep 20, 2008 5:51 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
BTW... the intention would be to create a "Cumulus" Standard set of export files including only what it actually can output rather than attempting to mimic something else.

I just wanted to try some basic WD like scripts on the basic clientraw like output to see what I was getting.

I would also build a Cumulus realtime.txt and other export file parser like I have for WD:

wd-parser.php

This is all if there is interest in it of course...

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Sat Sep 20, 2008 7:52 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17613
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
TNETWeather wrote:
1) It appears that the process files are only uploaded when the full webpage is uploaded. Ideally, it would be as often as the realtime.txt file is. If there were a check mark on the settings page to indicate that should take place, that would be a nice option.


Yes, agreed.

Quote:
2) Obviously, there are a lot of tags that simply don't exist. Some comon ones are all of the Solar stuff (UV, Wm/2), some others like humidex etc...


Yes - the tags don't exist because Cumulus doesn't currently handle any of the sensors at all that I don't own.

Quote:
3) Cumulus doesn't use a rename upload. This can cause issues if a file is being read and it has not yet been totally uploaded yet. When using a rename upload, the new file is uploaded using a tmp filename, and after it is uploaded, it is renamed to the real filename. This is a common feature for many data upload programs as it eliminates short pulls from the local server.
It would be nice to see that as an option in the ftp setup area.


Yes, agreed.

All good suggestions to add to the rapidly growing list. I think I will have to go open source and recruit some assistance ;)

Steve

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Sat Sep 20, 2008 10:06 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
Created a parsed XML file of all tags.

This basically is a text file that has all but a few of the tags in the format of an XML file. When parsed by Cumulus and uploaded to the server, the file becomes a file called alltags.rss which can then be parsed like a regular XML file.

Example:
** REPLACED BY NEWER XML FILE SEE BELOW **
alltags.rss

Notes:

Some info is hard coded like my url, station name etc...

3 tags were removed.

Temp Units
Latitude
and Longitude.

The use of &deg; is invalid in an RSS feed format.

Using PHP and the simplexml_load_file function, you can easily parse the XML data and generate a simple page. Didn't put a lot of time in this....

parse_xml.php

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Last edited by TNETWeather on Wed Sep 24, 2008 2:48 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Mon Sep 22, 2008 1:20 am 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
I am now parsing data exported from Cumulus to auto generate the signature at the bottom of my post. I had to remove some of the stuff from the script (Solar) and I see the weather conditions will remain at Sunny so I will need to remove that as well. The conditions is obtained in WD from a combined check of Metar data, solar data and rain tips.

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Mon Sep 22, 2008 8:51 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17613
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
TNETWeather wrote:
I am now parsing data exported from Cumulus to auto generate the signature at the bottom of my post.


I know of at least one Cumulus user who would be very interested in one of those!

Steve

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Mon Sep 22, 2008 1:31 pm 
Offline

Joined: Thu Jun 26, 2008 5:51 am
Posts: 97
Location: Slov.Konjice, Slovenia
Weather Station: Davis VP2 + Solar
Operating System: Win2k SP4@VIA EPIA800
This things are cool and big + for cumulus is that you can make whatever template you want to simulate other software outputs.

Im playing with lots of things these days using Cumulus export thingy :p
And im going to use that banner also soon :mrgreen:
Keep it up ! 8-)

_________________
Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Mon Sep 22, 2008 3:25 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
Nice to hear that it has interest...

There are a number of things in mind coming up....

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 3:13 am 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
One feature that would create a huge advantage to web making would be a switch that changes the extension that the template web files are uploaded to the website with.

Currently, they are uploaded as htm files.

File Extension: __ htm __ php __ asp

Then when the files are uploaded, they are uploaded using the selected extension instead of the default htm extension used now.

This would then allow PHP and ASP capable web pages which could then be used to create an included template system.

Right now if you want to do that, you basically have to upload a different set of files and pretty much dispose of the existing files that are uploaded.

An example of what an included file template system is, you can take a look at my example pages:

Constructing a Included Web Page System

This type of system makes making updates to web pages much easier since common areas are included by all the web pages (top section, menu section, footer section...etc).

I made some adjustments to the basic Cumulus pages the other day, and I had to make the same changes to each page for what would be in an included system common areas.

Changes that I made:

o Centered and boxed the top section (lat long and other info)
o Centered the title sections of various areas (removed the invalid caption center element).
o Changed the bottom menu, adding a link the my xml gen page and removing the forum and webcam links.
o Some other changes I cant recall right now.

Most of these would have been a single change in the section that was included instead of 7 different pages.

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 7:34 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17613
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
The web pages were originally created by Mrs L (and then abused a bit by me) using Dreamweaver, about which I know very little. But I do know that they are created using some sort of Dreamweaver templating system, which means that for us, changing any of the common parts involves changing just one file. So, it's rather like the "included" system you mention, except that the including is done locally rather than on the server.

They exist because they're our web pages, and they're really only included with Cumulus as examples of how the web tags work. It never occurred to me that most people would simply use the supplied examples instead of creating their own pages! I guess if I had known that they would get so much use, I might have done it slightly differently.

Incidentally, the webcam and forum links are easily removed from the processed pages by removing the links on the internet configuration screen in Cumulus.

Steve

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 9:49 am 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
I understand that.

That is a good method if you want to generate the web code on the weather workstation side. But you end up having to upload everything to the web server each time to update the pages the visitor sees.

I think if you blank out the webcam and forum links in Cumulus, the links are still on the page, they just don't go anywhere.

In any case, it really doesn't matter.

I rarely upload whole web pages now days, instead, preferring to upload just the data and let the web pages get what they need from that.

I figured that I would make sense to start with what most people are used to seeing. So I've already started converting your original style to a template style. When I am done, I will post instructions on how to use it and how to create the XML file it uses to get its data.

I've already done the core files and have completed two of the pages themselves, the index (current conditions) page and the today page. I will have the others finished when I get more time to play.

The style is that of your basic page with some slight tweaks, nothing radical, mostly playing around, but they are now PHP based files.

Experimental PHP Template:

http://cumulus.tnetweather.com/phpversion

They have the same info (hopefully).

Each page is created using includes of:

Settings.php - A basic overall configuration file that defines variable and some common functions.

w-top.php - The very top of every page (<html><head> ... )

w-station.php - The block with the lat long and other station info

... the page itself

w-menu.php - The menu block at the bottom of each page

w-footer.php - the final footer section for each page.

Note the w- preface is a style setting in the Settings.php file which allows me to make a completely new theme with the same data by just changing the style indicator in the Settings.php file.

The pages that have been done can be viewed as source (Note that I use a tab 4 structure)

Core Files
w-top.php
http://cumulus.tnetweather.com/phpversion/w-top.phps
w-footer.php
http://cumulus.tnetweather.com/phpversion/w-footer.phps
w-menu.php
http://cumulus.tnetweather.com/phpversion/w-menu.phps
w-station.php
http://cumulus.tnetweather.com/phpversion/w-station.phps

Pages Themselves
index.php
http://cumulus.tnetweather.com/phpversion/index.phps
today.php
http://cumulus.tnetweather.com/phpversion/today.phps

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 11:59 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17613
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
TNETWeather wrote:
I rarely upload whole web pages now days, instead, preferring to upload just the data and let the web pages get what they need from that.


Yes, this is exactly what I had in mind for Cumulus 2.

Quote:
The style is that of your basic page with some slight tweaks, nothing radical, mostly playing around, but they are now PHP based files.


And that's exactly what I thought I would do to start with for Cumulus 2.

These are great, many thanks. When I get time I will have a look at them in more detail, and start using them on my website.

Steve

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 7:09 pm 
Offline
User avatar

Joined: Thu Jun 19, 2008 7:45 am
Posts: 281
Location: Brampton, Cumbria, UK
Weather Station: Davis VP2 with solar
Operating System: Windows XP SP3
steve wrote:
TNETWeather wrote:
I am now parsing data exported from Cumulus to auto generate the signature at the bottom of my post.


I know of at least one Cumulus user who would be very interested in one of those!

Steve


Hope you are not talking about me behind my back !
:D :D

I must say that Kevins weather banner does look a little better than mine

_________________
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk | http://www.bramptonweather.co.uk/cumulus |
Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 7:16 pm 
Offline

Joined: Thu Aug 14, 2008 7:17 am
Posts: 141
Location: Broadstairs, Kent, UK
Weather Station: Davis VP1 with Solar
Paul C wrote:
steve wrote:
TNETWeather wrote:
I am now parsing data exported from Cumulus to auto generate the signature at the bottom of my post.


I know of at least one Cumulus user who would be very interested in one of those!

Steve


Hope you are not talking about me behind my back !
:D :D

I must say that Kevins weather banner does look a little better than mine


I recognise your banner :roll: :roll: I've not added mine to this forum yet since its not using Cumulus today. :roll: :roll:

I also recognise Kevin from another place :roll: :roll:

Stuart

_________________
Image


Top
 Profile  
 
 Post subject: Re: External Tag files
PostPosted: Tue Sep 23, 2008 8:08 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
Hello Stuart...

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Dave and 2 guests


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