Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
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
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
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
Cumulus to clientrawhour.txt gives zero length file
-
- Posts: 99
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Cumulus to clientrawhour.txt gives zero length file
Hello Steve,
I want to make a file "clientrawhour.txt" which can be used with WU-Graphs v 1.8.0 from Radomir Luza to graph the last hour. Normally the file is being produced by Weather Display. I don't like WD, so I want to use Cumulus. I have made a clientrawhourT.txt file which is about 14K in size and have added the file to the internet files section. The file which being produced after the web tags are substituted has a size of zero! I think I know why. The clientrawhourT.txt is 14k (more than 500 web tags) and it contains only one line!
I am using version 1.9.4 build 1082. The file clientrawhourT.txt is being attached.
Dinant
I want to make a file "clientrawhour.txt" which can be used with WU-Graphs v 1.8.0 from Radomir Luza to graph the last hour. Normally the file is being produced by Weather Display. I don't like WD, so I want to use Cumulus. I have made a clientrawhourT.txt file which is about 14K in size and have added the file to the internet files section. The file which being produced after the web tags are substituted has a size of zero! I think I know why. The clientrawhourT.txt is 14k (more than 500 web tags) and it contains only one line!
I am using version 1.9.4 build 1082. The file clientrawhourT.txt is being attached.
Dinant
You do not have the required permissions to view the files attached to this post.
- 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: Cumulus to clientrawhour.txt gives zero length file
Have you tried just the first few entries to make sure you have your file settings and tick boxes all correct ?
......................Imagine, what you will KNOW tomorrow !
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
Yes, the parser which the web tags code uses can't cope with a line 14k characters long; there will be an error message to this effect in the diags file. I don't actually know what the limit is, sorry, but I suspect it is a lot less than 14k, possibly as low as 255.Dinant wrote: I think I know why. The clientrawhourT.txt is 14k (more than 500 web tags) and it contains only one line!
Steve
- 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: Cumulus to clientrawhour.txt gives zero length file
Will the graphics prog accept a line delimited files ?
As you are having to imitate a WD file there must be an interface which is parsing it to give the graphics prog what it really wants.
As you are having to imitate a WD file there must be an interface which is parsing it to give the graphics prog what it really wants.
......................Imagine, what you will KNOW tomorrow !
- mcrossley
- Posts: 12903
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
The realtimegaugesT.txt file worked OK with a single line slightly smaller than 2K characters.
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
Is rapidfire added to the logs on Wundergroound in that case you can use v1.79 of the graphs my daily graph is now updatet every 15 minutes http://www.apeldoorn.tk/weer/wugraphs.php
-
- Posts: 99
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
beteljuice wrote:Have you tried just the first few entries to make sure you have your file settings and tick boxes all correct ?
Yes, if I replace al spaces between the web tags by CR+LF, so everything web tag is on a separate line then it works fine. But that file isn't a clientrawhour.txt file as being produced by WD. As a result the hour tab in the WU-Graphs v 1.8.0 doesn't work.
Dinant
-
- Posts: 99
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
I am also using the realtimegaugesT.txt file. That file is in JSON format and about 2000 bytes and the longest line is about 46 bytes. After every comma in the file you may or may not enter a CR+LF. That's why this file is not a problem.mcrossley wrote:The realtimegaugesT.txt file worked OK with a single line slightly smaller than 2K characters.
Dinant
- mcrossley
- Posts: 12903
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
Yes but older versions which were slightly shorter were formatted as a single line, I only made it multi-line for readability in later versions, not because Cumulus couldn't parse it.Dinant wrote:I am also using the realtimegaugesT.txt file. That file is in JSON format and about 2000 bytes and the longest line is about 46 bytes. After every comma in the file you may or may not enter a CR+LF. That's why this file is not a problem.mcrossley wrote:The realtimegaugesT.txt file worked OK with a single line slightly smaller than 2K characters.
Dinant
-
- Posts: 99
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
Hello Steve,steve wrote:Yes, the parser which the web tags code uses can't cope with a line 14k characters long; there will be an error message to this effect in the diags file. I don't actually know what the limit is, sorry, but I suspect it is a lot less than 14k, possibly as low as 255.Dinant wrote: I think I know why. The clientrawhourT.txt is 14k (more than 500 web tags) and it contains only one line!
I have a question:
If I replace the space between the webtags by CR+LF (so one web tag on every line).
Is there a trick to concat the lines of the clientrawhour.txt file just before sending to the web?
Dinant
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
I have no idea, but someone else might.Dinant wrote:If I replace the space between the webtags by CR+LF (so one web tag on every line).
Is there a trick to concat the lines of the clientrawhour.txt file just before sending to the web?
Steve
- 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: Cumulus to clientrawhour.txt gives zero length file
... but as I suggested, modify the code to accept the input you are giving.WU-Graphs v 1.8.0 doesn't work.
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 273
- Joined: Tue 28 May 2013 1:06 am
- Weather Station: Davis VP2 Plus
- Operating System: Raspian Buster (RPi 3b)
- Location: Tulsa, OK
Re: Cumulus to clientrawhour.txt gives zero length file
Here's a vbscript you might usesteve wrote:I have no idea, but someone else might.Dinant wrote:If I replace the space between the webtags by CR+LF (so one web tag on every line).
Is there a trick to concat the lines of the clientrawhour.txt file just before sending to the web?
Open notepad and copy/paste the following:
Code: Select all
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\temp\clientrawday.txt", ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, vbCrLf, " ")
Set objFile = objFSO.OpenTextFile("C:\temp\clientrawday.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close
cscript script.vbs (or whatever name you wish to give the VBscript file).
You could also call this from task scheduler.
-
- Posts: 99
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Cumulus to clientrawhour.txt gives zero length file
That's a good suggestion and probably the quickest way to solve this problem!beteljuice wrote:... but as I suggested, modify the code to accept the input you are giving.WU-Graphs v 1.8.0 doesn't work.
I have examined the WU-Graphs v 1.8.0 php code.
On line 130 of WUG-inc-hour.php it says:
// extract data
$clRawData = @file_get_contents($clientRawHpath.'clientrawhour.txt');
// data to array
$Data = explode(' ', $clRawData);
I have change this into:
// extract data
$clRawData = @file_get_contents($clientRawHpath.'clientrawhour.txt');
// data to array
$Data = explode(chr(10), $clRawData);
Now the hour graphs are shown correctly with a clientrawhour.txt file generated by Cumulus.
See http://www.weerstationmarkelo.nl/grafieken/wu-grafieken
Thanks for your help.
Dinant