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
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
New addon: Live data on the web
Moderator: daj
- Stig
- Posts: 48
- Joined: Thu 14 Jan 2010 6:24 pm
- Weather Station: WMR928NX
- Operating System: Windows 7
- Location: Hareskov near Copenhagen
- Contact:
Re: New addon: Live data on the web
thanks for all your efforts DAJ, I have just installled your weather console as a meny option on my website,
but do not get any data into the console, it writes undefined in all boxes, could you tell me what I am missing
kind regards
Stig
my site: www.hareskovvejr.dk
but do not get any data into the console, it writes undefined in all boxes, could you tell me what I am missing
kind regards
Stig
my site: www.hareskovvejr.dk
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: New addon: Live data on the web
You've entered the URL of your realtime.txt file in wconsole.js as http://www.hareskovvejr.dk/realtime/realtime.txt which gives a 404; it looks like it should be http://www.hareskovvejr.dk/realtime.txtStig wrote:thanks for all your efforts DAJ, I have just installled your weather console as a meny option on my website,
but do not get any data into the console, it writes undefined in all boxes, could you tell me what I am missing
Steve
- daj
- Posts: 2041
- Joined: Tue 29 Jul 2008 8:00 pm
- Weather Station: WH1081
- Operating System: Pi & MX
- Location: SW Scotland
- Contact:
Re: New addon: Live data on the web
You could also get away with this...
As your realtime file seems to be in the root of your web server
Code: Select all
var realtime_location="realtime.txt";- Stig
- Posts: 48
- Joined: Thu 14 Jan 2010 6:24 pm
- Weather Station: WMR928NX
- Operating System: Windows 7
- Location: Hareskov near Copenhagen
- Contact:
Re: New addon: Live data on the web
thank you for your help
Stig
www.Hareskovvejr.dk
-
Synewave
- Posts: 642
- Joined: Mon 25 Jan 2010 1:55 pm
- Weather Station: Watson W-8681
- Operating System: Raspian
- Location: Brighton, UK
- Contact:
Re: New addon: Live data on the web
Hi David,gemini06720 wrote:David how about a loop within the JavaScrip file ... and no, I do not know how to do it...daj wrote:Yes, I'm trying to capture that problem and get it to ignore it. For now, I resolve it by staggering the timing. So if Cumulus is updating every 5 seconds, refresh the console maybe every 7![]()
In one of my PHP script I have the following:
What the code snippet basically do is:Code: Select all
$realtime = 'realtime.txt'; // relative FILE location of realtime.txt $fileOpenTries = 3; // number of open retries for realtime files $retrySleepTime = 5; // seconds to wait before next open retry ... for ($i = $fileOpenTries; $i > 0; $i--) { $dataraw = file_get_contents($realtime); if ($dataraw===false) { sleep($retrySleepTime); } else { break; } ...
- it tries to open the file;
- if it cannot get the content of the file, it waits for 5 seconds (as setup) and tries again to open the file;
- it will repeat the same open/wait loop 3 times (as setup) and then give up...![]()
But, that is a 15 seconds loop and that might be what is needed inside the JavaScript to eventually get the 'realtime.txt' information...![]()
Just a suggestion...
Did you come up with anything based on Ray's suggestion to prevent the 'undefined' data problem?
I've just been playing with the code for the past few hours and not really got anywhere with it. It's not just for the wconsole, I'm using a modified version of your script to drive most of my pages as realtime.
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: New addon: Live data on the web
Paul, I have been looking at other forums where similar questions/requests have been made, about some JavaScript code to check if a file exist and do something if it does exist and something else if it does not exist.Synewave wrote:...Did you come up with anything based on Ray's suggestion to prevent the 'undefined' data problem?
I've just been playing with the code for the past few hours and not really got anywhere with it. It's not just for the wconsole, I'm using a modified version of your script to drive most of my pages as realtime.
From what I have read, here are the consensus seems to be: "For security reasons JavaScript does not have any functions for file handling... Javascript is called "client-side programming" for a reason - it cannot manipulate server files or client files... Would you really want a JavaScript deleting your hard drive while you were surfing the Net...".
One user suggested the use of XMLHttpRequest Object - also check XMLHttpRequest Object for the use of the code...
The W3Schools site has, indeed, great information (ressources)...
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: New addon: Live data on the web
David,
the pop out does not seem to work in ff it works in ie
http://www.n9mfk.com/wconsole.html
Beau
the pop out does not seem to work in ff it works in ie
http://www.n9mfk.com/wconsole.html
Beau
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: New addon: Live data on the web
Beau, on my computer in the four browsers that I have installed, the pop-up weather console only works properly (opening in a new smaller window) in the Google Chrome browser:n9mfk wrote:...the pop out does not seem to work in ff it works in ie...
- in Opera, it opens what appears to be another windows but it is more like a frame within the original (starting) windows;
- in Internet Explorer, it opens a new full size window (because that is the way I have Internet Explorer setup);
- in Firefox, it also opens a full size window (because that is the way I have Firefox setup).
But the small lower-right-corner click-on box does open a new weather console in all 4 browsers...
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: New addon: Live data on the web
Ray, what is odd this on works http://www.grantownweather.co.uk/wconsole.html
but mine does not
but mine does not
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: New addon: Live data on the web
Beau, your weather console might not work with your Firefox, but it does work with my Firefox...n9mfk wrote:...but mine does not
Try running Firefox in safe mode, meaning that Firefox will not load any of it extensions ... might be worth the try...
-
Arnie
- Posts: 85
- Joined: Tue 05 Jan 2010 9:45 am
- Weather Station: La Crosse Ws 2355
- Operating System: Windows XP SP3
- Location: Wentworthville, Sydney Australia
- Contact:
Re: New addon: Live data on the web
Hi David
Great program, unfortunatly I can't seem to get it to work
Ive saved all the files to the root directory
www.wentworthvilleweather.com/wconsole.html
The "Weather Console" just does not load the data
Msg on screen "Reading data, one moment please"
That's as far as it goes
Any ideas
Regatds
Brian
Great program, unfortunatly I can't seem to get it to work
Ive saved all the files to the root directory
www.wentworthvilleweather.com/wconsole.html
The "Weather Console" just does not load the data
Msg on screen "Reading data, one moment please"
That's as far as it goes
Any ideas
Regatds
Brian
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: New addon: Live data on the web
You've got an extra 'var' keyword in your wconsole.js:Arnie wrote:The "Weather Console" just does not load the data
Msg on screen "Reading data, one moment please"
var var realtime_location="realtime.txt";
It should be:
var realtime_location="realtime.txt";
Steve
-
Arnie
- Posts: 85
- Joined: Tue 05 Jan 2010 9:45 am
- Weather Station: La Crosse Ws 2355
- Operating System: Windows XP SP3
- Location: Wentworthville, Sydney Australia
- Contact:
Re: New addon: Live data on the web
Working great
Thanks Steve
Thanks Steve
-
Areco747
- Posts: 102
- Joined: Sun 05 Oct 2008 2:13 pm
- Weather Station: WH-1081
- Operating System: Windows XP
- Location: San Antonio de Areco-Buenos Aires - Argentina
- Contact:
Re: New addon: Live data on the web
Why is not forecast in my "Weatherconsole" http://www.arecoclima.com.ar/console/wconsole.html
Can you help?
Many Thanks!
Can you help?
Many Thanks!
Mauricio
----------------------------------------------------------------------------------------

http://www.arecoclima.com.ar
----------------------------------------------------------------------------------------
http://www.arecoclima.com.ar
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: New addon: Live data on the web
Mauricio, when I access the link you provided, the weather console was displaying weather information - see the clip from your Web page: