Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.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

Can not find the realtime.log file in realtimehighcharts

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
burgert
Posts: 3
Joined: Mon 23 Jun 2014 6:11 am
Weather Station: Oregon WMR200
Operating System: Windows 7
Location: South Africa

Can not find the realtime.log file in realtimehighcharts

Post by burgert »

I managed to gather the necessary components/modules to compile a private weather station. I am using Cumulus 1.9.4 (1095) together with Toolbox (v1), Highcharts and Realtimehighcharts. As a reseller I host my own website.
Because I am new to this level of coding I struggled quite a bit to get everything sorted out - thanks to this forum!!
My last hurdle is to get my realtimehighcharts working. I followed the instructions of Mark Crossley (http://wiki.sandaysoft.com/a/Highcharts_-_Realtime). I get my chart showing the realtime data from the realtime.txt file - however, there is no realtime.log to accumulate the data. As soon as I refresh the screen it starts then anew and don't show any older data. I am not sure where this realtime.log file must be and how it is generated? Must I define one? Linked to this problem might be my non understanding of the GNU Utilities as specified. I am not sure what the realtimelog.bat file is suppose to do (especially the tail.exe description) In my error log I get the following:
[27-Jun-2014 ...] PHP Warning: Cannot modify header information - headers already sent by (output started at xxx/weather/realtimehighcharts/realtimeLogParser.php:88) in xxx/weather/realtimehighcharts/realtimeLogParser.php on line 155.
This also indicates (line 88) that it cannot open the log file (echo "Failed to open log file.";)
Is there anybody that have experience with this part of the system? Please, any help will be highly appreciated.
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by water01 »

The realtimelog.bat file is a set of DOS commands run in Command Prompt window that produces the realtime.log file that is the basis of the data that Highcharts uses to produce the graph. It uses the tail command to truncate the file to 2 hrs worth of data.

Code: Select all

:start
copy /b realtime.log+realtime.txt realtime.tmp
tail --quiet --lines=120 realtime.tmp > realtime.log
choice /C N /T 59 /D N /M "Wait for timeout..."
goto start
The first line is just a label.
The second line copies the realtime.log, appending the realtime.txt produced by cumulus and putting the output in realtime.tmp.
The third line uses the tail command copy the last 120 lines (2hrs worth of data) from realtime.tmp to realtime.log which should be uploaded via Toolbox to your server so the graph can be produced.
The fourth line makes the .bat job pause for 59 seconds and when that point is reached line five returns to the Start label for the loop to start again.
My guess would be that you are failing to upload the realtime.log file to your server at least once per minute in Toolbox.
David
Image
burgert
Posts: 3
Joined: Mon 23 Jun 2014 6:11 am
Weather Station: Oregon WMR200
Operating System: Windows 7
Location: South Africa

Re: Can not find the realtime.log file in realtimehighcharts

Post by burgert »

Thank you water1.
I now have a better understanding of the .bat file and managed to get the realtime graph to display my realtimelog.txt values - but, it does not automatically update on the specified times. I can see the graph refreshes (it blinks) but no change in data. Only once I refresh the whole page (browser refresh) then the graph also updates. I had it to work for a short while but with all my fiddeling something was changed that causes this problem - if I only know what?
Can anybody give me some pointers to explore? Thanks
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by water01 »

Could you post the url of your site so we can take a look and see if we can diagnose the problem?
David
Image
burgert
Posts: 3
Joined: Mon 23 Jun 2014 6:11 am
Weather Station: Oregon WMR200
Operating System: Windows 7
Location: South Africa

Re: Can not find the realtime.log file in realtimehighcharts

Post by burgert »

Hi Water01.
My setup is still very tempory and Cumulus is not supplying data 24/7. I only link for testing purposes.
Will post again when system is up and running. Thanks.
happyweather123
Posts: 8
Joined: Mon 15 Aug 2016 5:41 pm
Weather Station: WS2080
Operating System: Windows XP SP3

Re: Can not find the realtime.log file in realtimehighcharts

Post by happyweather123 »

Hello, i am new here and want to finish my highcharts graphs that i use on Cumulus 1.9.4. I am again using Toolbox, i've already uploaded highcharts to my webserver. I made realtimelog.txt via Toolbox and i'm uploading it to my webserver every minute and have a purge selected for every day. I didn't use GNU Utility.
Everything there is very clever, but things get complicated, when i want to show up graphs on my webpage. Should i copy script code from realtimeCumulus.js to my website and what scripts do i need to write (<script src="........"></script>) to make highcharts graphs online. Or do i have to upload realtimeCumulus.js and realtimeCumulus.htm to my webserver, beacuse i tried to do that and i opened realtimeCumulus.htm on my webbrowser and it didn't show me a thing.

Can anyone give me more information or guide about that, beacuse i want to finish that graphs as soon as i can, possibly in few days from now, so please reply.

Thanks and hope see you very soon (on replies!)"
User avatar
mcrossley
Posts: 12691
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by mcrossley »

You will need to include the same files as in realtimeCumulus.htm in your web page...

Code: Select all

    <!-- JQuery script -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

    <!-- Basic Highcharts script -->
    <script src="./highcharts/js/highcharts.js"></script>
    <!-- Add some 'styling' -->
    <script src="./highcharts/js/themes/grid.js"></script>

    <!-- Additional files for the Highslide popup effect -->
    <script src="http://www.highcharts.com/highslide/highslide-full.min.js"></script>
    <script src="http://www.highcharts.com/highslide/highslide.config.js"></script>

    <script src="./realtimeCumulus.js"></script>
And the <div> to hold the graph...

Code: Select all

    <div id="container" style="min-width: 400px; height: 400px; margin-left: 10%; margin-right: 10%"></div>
If you put up a test page and provide a link I can take a look and see what is wrong.
happyweather123
Posts: 8
Joined: Mon 15 Aug 2016 5:41 pm
Weather Station: WS2080
Operating System: Windows XP SP3

Re: Can not find the realtime.log file in realtimehighcharts

Post by happyweather123 »

Well it appears like a blank space. Do i need to have the latest version of jquery or what? My website: http://benedikt.vreme-podnebje.si/realtimeGraphs.html
I have realtime.txt, realtimelog.txt, highcharts and also realtime.js i hope that's enough. It looks like there's nothing out there. I copied exactly as you wrote the code.
And i am using html document for sure.
User avatar
mcrossley
Posts: 12691
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by mcrossley »

OK, it is not finding the log parser script. It is trying to use...
http://benedikt.vreme-podnebje.si/realtimeLogParser.php

But that is giving a 'file not found' error.
happyweather123
Posts: 8
Joined: Mon 15 Aug 2016 5:41 pm
Weather Station: WS2080
Operating System: Windows XP SP3

Re: Can not find the realtime.log file in realtimehighcharts

Post by happyweather123 »

So do i need to make that file via batch that was in realtimeGraphs folder and send it to my website and that's fine. So i don't need the .bak or what is this file called to make commands via toolbox, beacuse i am already using toolbox with realtimelog.txt?

I did that and it says: "Failed to open log file.No valid data types supplied"

And i hope that realtimelog.txt won't extend too much, beacuse it has a larger size now.
User avatar
mcrossley
Posts: 12691
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by mcrossley »

You don't need to use the batch file if you are using toolbox.

OK, now you have a log file...
http://benedikt.vreme-podnebje.si/realtimelog.txt

But the log parser cannot find it...
http://benedikt.vreme-podnebje.si/realt ... speed&temp

So what have you configured in realtimeLogParser.php ? The defaults are...

Code: Select all

// The name of your realtime.txt log file
$logfile = 'realtime.log';
// The various delimiters used in your version of realtime.txt
$field_delimiter = ' ';
$date_delimiter = '/';
$time_delimiter = ':';
Yours should be...

Code: Select all

// The name of your realtime.txt log file
$logfile = 'realtimelog.txt';
// The various delimiters used in your version of realtime.txt
$field_delimiter = ' ';
$date_delimiter = '.';
$time_delimiter = ':';
User avatar
mcrossley
Posts: 12691
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by mcrossley »

Ah, I'd forgotten I added view=sce to that script! You have not edited realtimeLogParser.php to change the defaults...
http://benedikt.vreme-podnebje.si/realt ... p?view=sce
happyweather123
Posts: 8
Joined: Mon 15 Aug 2016 5:41 pm
Weather Station: WS2080
Operating System: Windows XP SP3

Re: Can not find the realtime.log file in realtimehighcharts

Post by happyweather123 »

That means i don't have to edit this? I mean realtimelog parser.php? What should i do then to fix that?
User avatar
mcrossley
Posts: 12691
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can not find the realtime.log file in realtimehighcharts

Post by mcrossley »

You need to edit realtimeLogParser.php and make the changes I posted above.
happyweather123
Posts: 8
Joined: Mon 15 Aug 2016 5:41 pm
Weather Station: WS2080
Operating System: Windows XP SP3

Re: Can not find the realtime.log file in realtimehighcharts

Post by happyweather123 »

Yes it's working! So does it update automaticaly when i add it to my website?

And i refreshed that page with realtime graph few times and it messed up. Why it shows different data and so?

It just shows one line with temperature and other data and instead of hours i can see years like 1970 and so on to 2016
Post Reply