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 4019) - 03 April 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 V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Highcharts 'Recent' graphs
Moderator: daj
-
- Posts: 53
- Joined: Wed 05 Dec 2012 8:39 am
- Weather Station: w1080
- Operating System: Virtualbox XP environment
- Location: Australia
- Contact:
Re: Highcharts 'Recent' graphs
I got the recent Charts Running. Just got to wait until my DB gets at least 48 hours of data now. I was getting ERROR - TZ Statement. For now i commented the lines out. The charts show a different time a few hours behind. How to fix that error, i'm not sure. I had trouble last time with the TZ statement as well.
IE : current time is 3:51pm , the chart is showing 8:51pm
IE : current time is 3:51pm , the chart is showing 8:51pm
-
- Posts: 3253
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Highcharts 'Recent' graphs
That is because the Time Zone function is causing a problem.
I changed mine to in order to get it to work,
but in Australia I presume that will be
I changed mine to
Code: Select all
$result = mysql_query("SET time_zone='+0:00'");
but in Australia I presume that will be
Code: Select all
$result = mysql_query("SET time_zone='+9:00'");
- mcrossley
- Posts: 12765
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts 'Recent' graphs
Which TZ statement works seems to depend on the version of MySQL, the hours version seems to be more universal, I will change the code to use that . Whichever, you should use UTC, otherwise bad things may start happening.
- meteotortosa
- Posts: 323
- Joined: Thu 04 Dec 2008 12:15 am
- Weather Station: Davis Vantage Pro2 Plus
- Operating System: Windows XP SP3
- Location: Tortosa-Baix Ebre- Catalonia
- Contact:
Re: Highcharts 'Recent' graphs
Any instruccions for install on my webserver?
For dummies, please
For dummies, please
Weather in Tortosa (NE Spain), updated every 15'
- mcrossley
- Posts: 12765
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts 'Recent' graphs
Not yet, a Wiki page to follow (sometime), too busy now.
- meteotortosa
- Posts: 323
- Joined: Thu 04 Dec 2008 12:15 am
- Weather Station: Davis Vantage Pro2 Plus
- Operating System: Windows XP SP3
- Location: Tortosa-Baix Ebre- Catalonia
- Contact:
Re: Highcharts 'Recent' graphs
Thanksmcrossley wrote:Not yet, a Wiki page to follow (sometime), too busy now.
Weather in Tortosa (NE Spain), updated every 15'
-
- Posts: 53
- Joined: Wed 05 Dec 2012 8:39 am
- Weather Station: w1080
- Operating System: Virtualbox XP environment
- Location: Australia
- Contact:
Re: Highcharts 'Recent' graphs
Set to UTC (+00:00) Works perfect
Site is nearly there - http://weatherstation.seqstorms.com/trends.php
Site is nearly there - http://weatherstation.seqstorms.com/trends.php
- BeaumarisWX
- Posts: 375
- Joined: Mon 09 Apr 2012 2:38 pm
- Weather Station: Davis VP2 Plus - 24hr FARS
- Operating System: Windows 10 Pro Hades Canyon
- Location: Beaumaris, Tasmania, AU
- Contact:
Re: Highcharts 'Recent' graphs
Hi Mark and TheKow,
I finally got around to converting to ImportCumulusv2 and upgraded all sql tables etc.
1: Now have 48 hr Recent Trends http://hrvistaweather.com/wxrecentChartsSQL.php converted, I noted on the original script and on (both your sites) that they are not true 48hr progressive periods so I modified mine to be exact 48hr (well within 1 minute of.
Changed :
Note: the age = 38 and the nth=1 (my data roughly in 1 min incidents.
2: Now have the HistoricCharts http://hrvistaweather.com/wxhistoricCharts.php converted and modified.
3: Have tried on many occasions to convert the original "Rolling 12hr Charts" http://hrvistaweather.com/wxhistoricCharts12hr.php which used Reltime/realtimeLog.txt, however completely stuck with that one, can't get it running.
Any tips on the above using MySql would be greatly appreciated, as there is no wiki as yet.
regards
I finally got around to converting to ImportCumulusv2 and upgraded all sql tables etc.
1: Now have 48 hr Recent Trends http://hrvistaweather.com/wxrecentChartsSQL.php converted, I noted on the original script and on (both your sites) that they are not true 48hr progressive periods so I modified mine to be exact 48hr (well within 1 minute of.
Changed :
Code: Select all
realtimeLogSqlv.php?recordAge=38&recordUnit=hour&press&nth=1
2: Now have the HistoricCharts http://hrvistaweather.com/wxhistoricCharts.php converted and modified.
3: Have tried on many occasions to convert the original "Rolling 12hr Charts" http://hrvistaweather.com/wxhistoricCharts12hr.php which used Reltime/realtimeLog.txt, however completely stuck with that one, can't get it running.
Any tips on the above using MySql would be greatly appreciated, as there is no wiki as yet.
regards
Tony Beaumaris, Tasmania (AUS)
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
- BeaumarisWX
- Posts: 375
- Joined: Mon 09 Apr 2012 2:38 pm
- Weather Station: Davis VP2 Plus - 24hr FARS
- Operating System: Windows 10 Pro Hades Canyon
- Location: Beaumaris, Tasmania, AU
- Contact:
Re: Highcharts 'Recent' graphs
Hi Mark,
Thanks but no, already had that running and returning data for weeks now.
My problem is working out how to re'script the "realtimeCumulus.js" file to use the "realtimeLogTable.php".
I run a cron job every 30 secs to import / update the Realtime table in MySql (even though FineOffset only produces 45 sec data I always do that as over/underlap ensures I get latest data as soon as available - works fine no issues there.
So can't figure out how to just use the "realtimeLogTable.php" to update the container every 30 secs ? (can't see point in looking at "realtime.txt) if that makes sense.
Anyway the old one still works and it's too late here now - will put back on shelf again till next weekend.
Thanks again.
Regards
Thanks but no, already had that running and returning data for weeks now.
My problem is working out how to re'script the "realtimeCumulus.js" file to use the "realtimeLogTable.php".
I run a cron job every 30 secs to import / update the Realtime table in MySql (even though FineOffset only produces 45 sec data I always do that as over/underlap ensures I get latest data as soon as available - works fine no issues there.
So can't figure out how to just use the "realtimeLogTable.php" to update the container every 30 secs ? (can't see point in looking at "realtime.txt) if that makes sense.
Anyway the old one still works and it's too late here now - will put back on shelf again till next weekend.
Thanks again.
Regards
Tony Beaumaris, Tasmania (AUS)
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
- BeaumarisWX
- Posts: 375
- Joined: Mon 09 Apr 2012 2:38 pm
- Weather Station: Davis VP2 Plus - 24hr FARS
- Operating System: Windows 10 Pro Hades Canyon
- Location: Beaumaris, Tasmania, AU
- Contact:
Re: Highcharts 'Recent' graphs
Hi Mark,
Forgot to ask - did you find the 48hr recordAge mod of any use.
ooh and just noticed your 12/24/48hr radio buttons - very nice - will have to pick your brains on those - will you be adding that to the wiki ?
Have a good week,
Cheers
Forgot to ask - did you find the 48hr recordAge mod of any use.
ooh and just noticed your 12/24/48hr radio buttons - very nice - will have to pick your brains on those - will you be adding that to the wiki ?
Have a good week,
Cheers
Tony Beaumaris, Tasmania (AUS)
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Highcharts 'Recent' graphs
Hi,
I started to use this script yesterday, it's working but i have a little time zone problem (like in ImportCumulusFile https://cumulus.hosiene.co.uk/viewtopic.p ... ile#p82245
If i let time zone to +0:00 the last datas in the graph shows 2 hours earlier.
I set time zone to +2:00 (French time zone) the last datas shown are ok.
In my test i can select 1,4, 8 hours (instead the 12,24,48) because my reltime database is a little too 'young'.
When i select 1 hours the graph shows 3 hours of data, with 4 hours selection i have 6 hours of data and with 8 hours selection i can see 10 hours of data.
There are always 2 hours more datas than the selection. 2 hours is my time zone difference from UTC!
I think Mark will answer this :
I started to use this script yesterday, it's working but i have a little time zone problem (like in ImportCumulusFile https://cumulus.hosiene.co.uk/viewtopic.p ... ile#p82245
If i let time zone to +0:00 the last datas in the graph shows 2 hours earlier.
I set time zone to +2:00 (French time zone) the last datas shown are ok.
In my test i can select 1,4, 8 hours (instead the 12,24,48) because my reltime database is a little too 'young'.
When i select 1 hours the graph shows 3 hours of data, with 4 hours selection i have 6 hours of data and with 8 hours selection i can see 10 hours of data.
There are always 2 hours more datas than the selection. 2 hours is my time zone difference from UTC!
I think Mark will answer this :
I need to look at the tz again, I thought that forcing the time zone to UTC would avoid these sorts of problems - obviously not.
- mcrossley
- Posts: 12765
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts 'Recent' graphs
OK, I see what is going wrong.
EDIT: Removed bit about commenting out the TZ it doesn't work!
What I was trying to do was make the scripts TZ independent - so your station could be in Europe and your server in the USA say. The idea was to force MySQL into using UTC (but still storing the date/time using your local time), the problem is that the NOW() statement respects the TZ statement and converts the current system time into UTC which of course does not match the stored data in local time.
The only solution I can think of at the moment where the browser client, weather station, and back-end server could all be in different TZs is to first query the table for the latest value and use that as the reference. That of course fails if the table hasn't been updated recently.
so...
http://weather.wilmslowastro.com/realti ... p?view=sce
Anyone else got any bright ideas? Kerry?
EDIT: Removed bit about commenting out the TZ it doesn't work!
What I was trying to do was make the scripts TZ independent - so your station could be in Europe and your server in the USA say. The idea was to force MySQL into using UTC (but still storing the date/time using your local time), the problem is that the NOW() statement respects the TZ statement and converts the current system time into UTC which of course does not match the stored data in local time.
The only solution I can think of at the moment where the browser client, weather station, and back-end server could all be in different TZs is to first query the table for the latest value and use that as the reference. That of course fails if the table hasn't been updated recently.
so...
Code: Select all
SELECT UNIX_TIMESTAMP(LogDateTime), [flds...]
FROM $logtable
WHERE LogDateTime > (SELECT MAX(LogDateTime) - INTERVAL $recordAge $recordUnit FROM $logtable)
ORDER BY LogDateTime ASC"
Anyone else got any bright ideas? Kerry?
- mcrossley
- Posts: 12765
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts 'Recent' graphs
Edited my post above, because there is one other factor in play - Highcharts is expecting the time stamp values to be in UTC, so altering the TZ in the MySQL queries means that you also have to alter the TZ in HighCharts away from default as well.