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 4018) - 28 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

Highcharts Tides

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Highcharts Tides

Post by Mapantz »

I've uploaded and filled in the necessary stuff, but I get a blank page and no cache file. :cry:
Image
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Highcharts Tides

Post by Big Daddy »

Sorry Mark, but it seems to throw up some other errors as well

PHP Warning: Missing argument 1 for uk7daytides::getTides(), called in /var/www/html/Tides/tideDemo.php on line 15 and defined in /var/www/html/Tides/uk7daytides.php on line 53, referer: http://192.168.0.5/Tides/
PHP Warning: Missing argument 2 for uk7daytides::getTides(), called in /var/www/html/Tides/tideDemo.php on line 15 and defined in /var/www/html/Tides/uk7daytides.php on line 53, referer: http://192.168.0.5/Tides/
PHP Notice: Undefined variable: stationId in /var/www/html/Tides/uk7daytides.php on line 55, referer: http://192.168.0.5/Tides/
PHP Notice: Undefined variable: duration in /var/www/html/Tides/uk7daytides.php on line 56, referer: http://192.168.0.5/Tides/

Doesnt seem to affect the drawing of the graphs.

Andy
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Highcharts Tides

Post by Big Daddy »

Hi Mapantz,

Had the same and already reported back to Mark.

It seems to be caused by the very first line of tideDemo.php file where it has this:
<?php require 'zbblock.php'; ?>

It looks for this file and as it doesnt find it hangs.

I removed it and all is ok.

Read my post on bottom of page 2 of this topic.

Andy
User avatar
mcrossley
Posts: 12692
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 Tides

Post by mcrossley »

The zbblock include shouldn't be there, let me take a look at the other errors, but it will be tomorrow now.

The idea of the class is that you can instantiate it once, then call getTide() multiple times with different station IDs, once for each port. If you do not pass a station ID, then it defaults to the one defined in the class file.

That was the theory anyway, I need to check if the files I zipped contained all the latest updates...
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Highcharts Tides

Post by Mapantz »

Big Daddy wrote: Sun 30 Dec 2018 9:44 pm Hi Mapantz,

Had the same and already reported back to Mark.

It seems to be caused by the very first line of tideDemo.php file where it has this:
<?php require 'zbblock.php'; ?>

It looks for this file and as it doesnt find it hangs.

I removed it and all is ok.

Read my post on bottom of page 2 of this topic.

Andy
I use zbblock myself, so it isn't that. I removed it for now anyway. :)

I've turned on error checking and nothing pops up.
Image
User avatar
mcrossley
Posts: 12692
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 Tides

Post by mcrossley »

Looks like I updated my local zip and never sync'd it to my server :bash:

I've also added a couple of examples of calling .getTide() to the sample HTML page.

Let's see if this is any better!
User avatar
jdc
Posts: 142
Joined: Tue 19 Jun 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10
Location: Portsoy,.
Contact:

Re: Highcharts Tides

Post by jdc »

I made this page recently using the API but don't have Mark's skills - so kept it simple.
I'd like to 'prettify' the chart a bit more sometime. :?
http://lethamshank.co.uk/met/localwx.htm?page=wx_tide

Going to download for improvement ideas. :oops:
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Highcharts Tides

Post by Big Daddy »

Hi Mark,
Thanks. Will take a look when I get back home in a couple of days. Have had to put my web stuff on hold for some sort of family New Year get together. Funny, it only seems like a week since we had the last get together.

Enjoy the New Year everyone and here is to keeping Cumulus alive.

Andy
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Highcharts Tides

Post by Big Daddy »

Hi Mark,
Firstly, a big thank you for putting this together and getting something out that I have been able to implement. I have spent a few days on this trying to learn whats going on and using some of the little knowledge I gleamed from working with the CumuluxMX charts to get the following.

http://midlifedad.me.uk/weather/boston_tides.php

You can click on the tides button in the top right and select different ports.

One thing I cant work out is that the 1 day zoom only works on the above page and not any of the other 5. All my PHP pages are identical with a couple of minor text changes and a change of name of the variable $data, which is $data on this page, $data2 one another, $data3 etc.

I cant really find any answer on the internet with teh exception that they are automatically disabled in highcharts / highstock if the rleveant data isnt present. When I inspect the webpage in Firefox I can see this particular zoom button shows as "disabled" on all pages except the one above where it say "normal"

Its not a big problem, more of a nicety.

Andy
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Highcharts Tides

Post by Mapantz »

I've just got around to the updated version. All working!

I'm just gonna add in my css and stuff. This is very useful to me. Thank you! :)
Image
User avatar
mcrossley
Posts: 12692
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 Tides

Post by mcrossley »

Big Daddy wrote: Sun 06 Jan 2019 4:43 pm One thing I cant work out is that the 1 day zoom only works on the above page and not any of the other 5. All my PHP pages are identical with a couple of minor text changes and a change of name of the variable $data, which is $data on this page, $data2 one another, $data3 etc.
I think may be because 1 day does not give you enough data points to draw the spline curve?
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Highcharts Tides

Post by Mapantz »

Just thought i'd pop back to this..

I forgot about it if i'm honest, but I want to load it up on my site properly now. I just noticed that the tide times are one and two hours behind. High tide in Swanage is at 11:37pm. My graph shows is at 9:27pm. The next low tide is tomorrow at 6:10am, my graph shows it as 5:03am. The next high tide is at 12:25pm, my graph shows 10:34am.

All a bit confusing!
Image
User avatar
mcrossley
Posts: 12692
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 Tides

Post by mcrossley »

The graphed times are in GMT - what source are you checking them against? Please use the UKHO
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Highcharts Tides

Post by Mapantz »

mcrossley wrote: Mon 22 Jul 2019 10:04 am The graphed times are in GMT - what source are you checking them against? Please use the UKHO
I actually use this website: https://tides4fishing.com/uk/england/swanage

As I do a lot of sea fishing, that is my most trusted source, even when checking on a mobile phone when I am actually at Swanage.

However, checking on UKHO site and adding the 1 hour for daylight savings my graph is showing times 2 hours early for each tide.

https://warehamwx.co.uk/tides.php
Image
User avatar
mcrossley
Posts: 12692
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 Tides

Post by mcrossley »

Ah, Swange! The Solent is odd because it has double tides, it always comes up on sailing courses, I wonder if the code copes with that...
Post Reply