Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

UV and SolarRad tags

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

UV and SolarRad tags

Post by GraemeT »

Steve,
I've been wondering, is there any way to populate the <#UV> and <#SolarRad> webtags from an external source, such as a textfile as you did with the <#currcond> webtag?
This would be a great asset for those whose stations don't monitor UV or Solar radiation, but who have data available from another source.

Cheers,
Cheers,
Graeme.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

If it was just a case of reading the contents of a file, then that's reasonably straightforward, I'd just clone the currcond code. We'd have to agree on exactly how it would work...
Steve
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: UV and SolarRad tags

Post by GraemeT »

It's entirely up to you Steve.

I'm thinking along the lines of currcond in that data is placed in a text file by some method (either by hand or some other process) and that textfile then read by cumulus to update cumulus.xml. I don't know if it would be easier for both values to be in the same file, but that would keep the number of files down - maybe even add it to currentconditions.txt.
These webtags are left empty unless one has a weather station to provide the data for them, and I'm thinking this could be a way of providing that data to cumulus.

I'll just say that if the option is there, people will work out a way of using it, however it's implemented.
Cheers,
Graeme.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

I'm thinking something general, so it can be expanded in future. A single file, called externaldata.txt, containing, to begin with, something like:

UV=10
SolarRad=25

This should be easy to set up, either automatically or manually. Cumulus would read the file each time an internet upload is scheduled. The easiest approach would be for Cumulus to simply update the UV and solarrad fields on the display, as it the value had come from the station. The web tag processing will then automatically pick it up. It probably needs a few options creating to indicate whether or not to process the file, to avoid unnecessary work where it's not being used.
Steve
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: UV and SolarRad tags

Post by GraemeT »

Sounds like just the ticket, Steve.
Cheers,
Graeme.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

While I've been thinking about the best way to do this to make it a general facility, it's occurred to me that there's an existing facility that you might be able to use. If a web tag has a colon in it, it's assumed to be a full hierarchic file name. The contents of the file are substituted for the tag. So if you arranged to have a file created with just the UV value in it (for example), you could specify a web tag such as <#C:\full\path\to\UV.txt> and the value would get inserted.
Steve
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UV and SolarRad tags

Post by mcrossley »

8-) I didn't know that Steve, now to think of a use for it... :geek:
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: UV and SolarRad tags

Post by GraemeT »

Thanks Steve,

I'll give it a try.
Cheers,
Graeme.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: UV and SolarRad tags

Post by beteljuice »

... you could specify a web tag such as <#C:\full\path\to\UV.txt> and the value would get inserted...
Now you tell us !
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

beteljuice wrote:Now you tell us !
It's been there for quite some time, but I'd completely forgotten. I was only reminded when I was looking at the code!
Steve
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: UV and SolarRad tags

Post by GraemeT »

Doesn't seem to work for me, Steve.

No matter what I put in the file, nor where I put it, when Cumulus processes cumuluswebtags.php
this....

Code: Select all

$UV                   = "<#D:\Web\htdocs\weather\data\UV.txt>";  //  current uv index 
is replaced with this....

Code: Select all

$UV                   = "";  //  current uv index
Might I going about this the wrong way or something?
Cheers,
Graeme.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

Looks OK to me. The UV.txt file definitely exists in that location? It's clearly finding and processing the tag, but for some reason not getting any content. Could you let me have a copy of the file with the tag in, and the uv.txt file?
Steve
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: UV and SolarRad tags

Post by gemini06720 »

Steve, I also get nothing when trying to import data from an external file, I tried giving the full path (such as 'C:\pathto\thefile\externaltags.txt') or the short path (such as 'externaltags.txt') or even the UNC type path (such as '\\NETWORKDRIVE\C_XAMPP_WEB\pathto\thefile\externaltags.txt') and even the Internet path type (such as 'file://NETWORKDRIVE\C_XAMPP_WEB\pathto\thefile\externaltags.txt') - nothing!

The file I am trying to include is a plain text file and contains two lines with the following tags:

Code: Select all

AV=10
InfraRedRad=25
I know the 2 tags have no meaning for/to Cumulus, but should still be imported as the data contained in those new tags could have been created by an external software.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

The UNC format definitely won't work, as it relies on the presence of a colon. This was presumably working at some point in the past, as someone must have asked for it. I'll investigate.
Steve
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: UV and SolarRad tags

Post by steve »

It appears that the Delphi tag parser truncates tags at the first non-alphanumeric character, so this facility can never have worked, and never will. Very odd.
Steve
Post Reply