Tides

Post Reply
User avatar
livejerseyweather
Observer
Observer
Posts: 13
Joined: Sat Mar 09, 2019 5:56 pm
Location: Jersey
Station model: Davis Vantage Pro 2 Plus
Software: Weather Display
Contact:

Tides

Post by livejerseyweather » Sun Sep 29, 2019 9:58 am

Hi all
Not sure if anyone else has issues but it appears I no longer have data for the tide block I am getting a Data N/A on mine and looking at some of yours you appear to have the same? Any ideas?

Thanks

Ethan

hcorrin
Observer
Observer
Posts: 40
Joined: Tue Sep 05, 2017 10:55 am
Location: Ballaugh
Station model: Davis VP2
Software: Weather Display
Contact:

Re: Tides

Post by hcorrin » Sun Sep 29, 2019 9:29 pm

Hi
mine is the same but it is getting the cache file but it is 145kb it was 79kb so something has changed
Image

chrimu
Observer
Observer
Posts: 18
Joined: Wed Feb 28, 2018 6:16 pm
Station model: Homematic
Software: Homematic scripts

Re: Tides

Post by chrimu » Thu Oct 03, 2019 9:02 pm

Yepp, same here (N/A)…

Cheers,
Christian

User avatar
John B
Forecaster
Forecaster
Posts: 211
Joined: Sun Aug 20, 2017 11:59 pm
Location: Blaxland, N.S.W., Australia
Station model: La Crosse WS2355
Software: Weather Display
Contact:

Re: Tides

Post by John B » Fri Oct 04, 2019 4:04 am

Indeed, Ethan, you are not alone. :(

User avatar
lemimi
Forecaster
Forecaster
Posts: 105
Joined: Wed Dec 12, 2018 3:31 pm
Location: France - Normandie
Station model: Brandson 304557
Contact:

Re: Tides

Post by lemimi » Sat Oct 05, 2019 3:52 am

Same for me too.
Have a nice day ... Michel

User avatar
meteocaldas
Language Admin
Language Admin
Posts: 111
Joined: Fri Aug 25, 2017 7:56 pm
Location: Caldas da Rainha, Portugal
Station model: OS WMR-88A
Software: Cumulus
Contact:

Re: Tides

Post by meteocaldas » Thu Oct 10, 2019 9:09 pm

Same problem here :cry:

I have been cheking the link that the tidesBlock.php uses to parse tide times, and it seems ok, but... it has a different "look" from the page that they had when Jachym wrote the script.
This change in page layout is probably the reason why the script isn't working now.

The link to get the tide times is the one we have in settings.php and looks like:
$urlTides = 'https://www.tide-forecast.com/locations/{name of the location-name of country}/tides/latest';

If you put this link on your browser, it will return a valid page and tide times are ok for the referred location, so my conclusion is that the problem is not in the url itself.

I am not an expert and probably I am going to say something ridiculous at any expert eyes, but my idea is :
1- The $urlTides is read in xml and converted to the txt file named cacheTides.txt
2-This file is "parsed" and tide times are then extrated from it.
3- The script was written for a different XML layout and the problem is that current XML layout outputs a cacheTides.txt that can not be parsed with old script.
4 - Unfortunately this process uses XML that is much more difficult for me to understand, compared to a json process, so I am not able to understand how tide times are parsed. Sometimes it is just a matter of changing little things in the original script, but it requires a good knowledge on XML.

In other words, we are totally dependent of the good will of a XML expert to solve the problem :-)

Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Tides

Post by Jachym » Sun Oct 13, 2019 6:19 am

Hi guys,
I looked at the page and I had to delete both the block and the plugin. Even though the URL remained the same, the format of the page is completely different as well as Terms and conditions.

I was unable to find any free API that would provide similar data in a machine-readable format and this page is now copyrighted.

This is unfortunately what happens when you rely on third-party sites. I wish Meteotemplate was self-reliant and I never had to worry about something constantly changing, however this, given the page purpose, will never happen...

User avatar
John B
Forecaster
Forecaster
Posts: 211
Joined: Sun Aug 20, 2017 11:59 pm
Location: Blaxland, N.S.W., Australia
Station model: La Crosse WS2355
Software: Weather Display
Contact:

Re: Tides

Post by John B » Sun Oct 13, 2019 11:41 pm

Thanks, Jáchym, for investigating for us all, 'tis much appreciated, regardless of the disappointing outcome.

Cheers,
John

User avatar
lemimi
Forecaster
Forecaster
Posts: 105
Joined: Wed Dec 12, 2018 3:31 pm
Location: France - Normandie
Station model: Brandson 304557
Contact:

Re: Tides

Post by lemimi » Mon Oct 14, 2019 6:31 am

sniff, sniff,
No problem, I just removed this block.
And a big thank you for all the work done.

Good day everyone ... Michel

Post Reply