Tides block stopped working

Post Reply
User avatar
Alexandros
Newbie
Newbie
Posts: 3
Joined: Fri May 11, 2018 4:16 pm
Location: Greece
Station model: DAVIS Pro 2 Wireless
Software: Meteobridge
Contact:

Tides block stopped working

Post by Alexandros » Sat Jul 07, 2018 5:27 pm

For some reason it is almost a week that Tides_1.2 block stopped working and in its place Data N/A is only shown. I checked the related url in https://www.tide-forecast.com to see if their server is down but their site is working fine for my chosen location. So I guess that the process of decoding and stripping their data in the php meteotemplate tidesBlock file should be amended to probably include any changes that tide-forecast might have done in their page.

Any help on above?

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 block stopped working

Post by hcorrin » Sat Jul 07, 2018 9:32 pm

Hi
just checked mine and I have the same but a cache file is created but the data in it is different to an older file I have on a backup
I also notice the plugin is giving the same error probably for the same reason
Image

User avatar
LOBWX
Forecaster
Forecaster
Posts: 104
Joined: Sun Mar 11, 2018 6:43 pm
Location: Los Osos, CA
Station model: Ambient WS 1401-IP
Software: MeteoBridge
Contact:

Re: Tides block stopped working

Post by LOBWX » Mon Jul 09, 2018 3:34 am

Same here - Data N/A
Just BE NICE! That's all it takes to be a decent human...

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 block stopped working

Post by meteocaldas » Mon Jul 09, 2018 9:14 am

Same here Data N/A.
TidesCache.txt is beeing created and updated but it looks like they have redesigned their html page and parsing data from there is not giving any results because their html code is somewhat different now.
I have been trying to fix the issue but my knowledge is too short for that and the result is always the same: no results :-)
Help, pleaseeee!
I had never imagined that there were so many fishermen visiting my site just looking for local beach weather, tides and moons :-)

http://www.meteocaldas.com/mtp
Image

User avatar
stewart45
Observer
Observer
Posts: 42
Joined: Sun Aug 20, 2017 1:29 pm
Location: Skelton-in-Cleveland,UK
Station model: Ecowitt
Software: pws-dashboard
Contact:

Re: Tides block stopped working

Post by stewart45 » Wed Jul 11, 2018 7:45 am

Same here, been down for a week now
Image

User avatar
Asobig
Advisor
Advisor
Posts: 72
Joined: Mon Aug 21, 2017 7:05 am
Location: Almere
Station model: Davis Vantage VP2+
Software: Meteobridge (Red)
Contact:

Re: Tides block stopped working

Post by Asobig » Wed Jul 11, 2018 8:33 pm

I think i figured out what changed in the html of the Tide-forcast website:
Do the following:

In tidesBlock.php change line 55 from:

Code: Select all

preg_match('/<h1 class="tab">Tide Times for (.*?)<\/h1>/',$html,$matchesPlace);
to:

Code: Select all

preg_match('/<h1 class="title is-4 has-text-primary has-text-centered">Tide Times for (.*?)<\/h1>/',$html,$matchesPlace);
Change line 71 from:

Code: Select all

preg_match('/\<section class="tide-events not_in_print"\>(.*)?\<\/section\>/',$html,$matches);
to:

Code: Select all

preg_match('/\<section class="section tides-content-table tide-events not_in_print is-imperial" >(.*)?\<\/section\>/',$html,$matches);
Change line 80 from:

Code: Select all

$explodeDays = explode('<td class="date"',$predictionDiv);
to:

Code: Select all

$explodeDays = explode('<th class="date "',$predictionDiv);
Change line 84 from:

Code: Select all

preg_match('/rowspan="[0-9]">(.*?)<\/td>(.*?)$/',$explodeDays[$i],$matches);
to:

Code: Select all

preg_match('/rowspan="[0-9]" >(.*?)<\/th>(.*?)$/',$explodeDays[$i],$matches);
Then the block is working again.

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 block stopped working

Post by John B » Thu Jul 12, 2018 3:11 am

Thanks, Asobig, there's a bucket of salt water heading your way. ;)

It surely works for me.

Regards,
John

User avatar
stewart45
Observer
Observer
Posts: 42
Joined: Sun Aug 20, 2017 1:29 pm
Location: Skelton-in-Cleveland,UK
Station model: Ecowitt
Software: pws-dashboard
Contact:

Re: Tides block stopped working

Post by stewart45 » Thu Jul 12, 2018 7:44 am

well done that man
Image

User avatar
xl1954
Newbie
Newbie
Posts: 4
Joined: Thu May 17, 2018 5:43 am
Location: France
Station model: Ecowitt
Software: API Meteotemplate
Contact:

Re: Tides block stopped working

Post by xl1954 » Thu Jul 12, 2018 8:39 am

Hello all

After the correction from Absoblg, all is running.

Thanks a lot

User avatar
Gus
Observer
Observer
Posts: 10
Joined: Sun Aug 20, 2017 11:17 pm
Location: Halethorpe, Maryland
Station model: Davis Vantage Pro 2+
Software: Weather Display
Contact:

Re: Tides block stopped working

Post by Gus » Thu Jul 12, 2018 1:52 pm

Followed Absobig's instructions and all is well. Had to make one change in line 71.
I had to change new line 71 from tide-events not_in_print is-imperial to tide-events not_in_print is-metric. This dependings what https://www.tide-forecast.com does not show as height, meters or feet.

preg_match('/\<section class="section tides-content-table tide-events not_in_print is-imperial" >(.*)?\<\/section\>/',$html,$matches);
- OR -
preg_match('/\<section class="section tides-content-table tide-events not_in_print is-metric" >(.*)?\<\/section\>/',$html,$matches);

Tide plugin can also be fixed by applying changes to ...
line 69
line 85
line 94
line 98
https://www.halethorpeweather.com/meteo ... /index.php

Thanks,
Gus
Davis VP2+, LabJack w/temp sensors & 1-Wire lightning counter on Trigkey G4 Mini PC, 12th Gen Intel Alder Lake N95 Processor, 16GB SDRAM, and 500GB SSD, Windows11
Image

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 block stopped working

Post by meteocaldas » Thu Jul 12, 2018 6:38 pm

Asobig wrote: Wed Jul 11, 2018 8:33 pm I think i figured out what changed in the html of the Tide-forcast website:
Do the following:.....
Then the block is working again.
Hi Asobig,
Thank you sooooo much!
Tide block is working perfectly again, and now all the fishermen in my area will be thanking you too :-)

http://www.meteocaldas.com/mtp
Image

User avatar
LOBWX
Forecaster
Forecaster
Posts: 104
Joined: Sun Mar 11, 2018 6:43 pm
Location: Los Osos, CA
Station model: Ambient WS 1401-IP
Software: MeteoBridge
Contact:

Re: Tides block stopped working

Post by LOBWX » Thu Jul 12, 2018 11:15 pm

For the life of me I can't get this block to work again? I installed the 1.3 block that was just updated in the blocks section http://www.meteotemplate.com/web/blocks.php

The block is caching the data from https://www.tide-forecast.com/locations ... des/latest

Im stumped???
Just BE NICE! That's all it takes to be a decent human...

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Tides block stopped working

Post by BlueBear » Fri Jul 13, 2018 2:02 am

In case you hadn't noticed, your tide plugin isn't working either!!!
Neither is mine :(

User avatar
LOBWX
Forecaster
Forecaster
Posts: 104
Joined: Sun Mar 11, 2018 6:43 pm
Location: Los Osos, CA
Station model: Ambient WS 1401-IP
Software: MeteoBridge
Contact:

Re: Tides block stopped working

Post by LOBWX » Fri Jul 13, 2018 3:05 am

I tried what Gus had posted but still the Block nor the Plugin are working :?:
Just BE NICE! That's all it takes to be a decent human...

User avatar
Alexandros
Newbie
Newbie
Posts: 3
Joined: Fri May 11, 2018 4:16 pm
Location: Greece
Station model: DAVIS Pro 2 Wireless
Software: Meteobridge
Contact:

Re: Tides block stopped working

Post by Alexandros » Fri Jul 13, 2018 3:41 pm

All is fine again. Asobig, thank you for your effort and especially your time.

dtwrlewis
Observer
Observer
Posts: 19
Joined: Sun Nov 19, 2017 7:24 pm
Location: Rothesay, NB, Canada
Station model: Ecowitt HP2553
Software: Ecowitt GW1100
Contact:

Re: Tides block stopped working

Post by dtwrlewis » Fri Jul 13, 2018 6:23 pm

This worked for me

Thanks

Gus wrote: Thu Jul 12, 2018 1:52 pm Followed Absobig's instructions and all is well. Had to make one change in line 71.
I had to change new line 71 from tide-events not_in_print is-imperial to tide-events not_in_print is-metric. This dependings what https://www.tide-forecast.com does not show as height, meters or feet.

preg_match('/\<section class="section tides-content-table tide-events not_in_print is-imperial" >(.*)?\<\/section\>/',$html,$matches);
- OR -
preg_match('/\<section class="section tides-content-table tide-events not_in_print is-metric" >(.*)?\<\/section\>/',$html,$matches);

Tide plugin can also be fixed by applying changes to ...
line 69
line 85
line 94
line 98
https://www.halethorpeweather.com/meteo ... /index.php

Thanks,
Gus
Image

User avatar
LOBWX
Forecaster
Forecaster
Posts: 104
Joined: Sun Mar 11, 2018 6:43 pm
Location: Los Osos, CA
Station model: Ambient WS 1401-IP
Software: MeteoBridge
Contact:

Re: Tides block stopped working

Post by LOBWX » Sat Jul 14, 2018 1:56 am

So I have tried to get this Tides Block to work again on two different servers with absolutely no luck. One is my paid hosted server and the other is on my PI3B+.

If someone would not mind posting their entire working tidesBlock.php here so I could try using it to rule out any syntax errors on my part. I would appreciate it.

Nevermind I got it to work again

~Bob~
Last edited by LOBWX on Wed Jul 18, 2018 5:01 am, edited 2 times in total.
Just BE NICE! That's all it takes to be a decent human...

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 block stopped working

Post by hcorrin » Tue Jul 17, 2018 9:39 pm

the block is working ok for me after the update, but when I tried the changes in the plugin, the page loads but no graph or data is showing and if metric is used instead of imperial I get data N/A

http://www.hc-iom.co.uk/template/plugin ... /index.php
Image

dtwrlewis
Observer
Observer
Posts: 19
Joined: Sun Nov 19, 2017 7:24 pm
Location: Rothesay, NB, Canada
Station model: Ecowitt HP2553
Software: Ecowitt GW1100
Contact:

Re: Tides block stopped working

Post by dtwrlewis » Thu Dec 06, 2018 2:19 pm

Data not available again.

Have they changed their formatting again?Anyone else having this problem?
Image

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 block stopped working

Post by John B » Thu Dec 06, 2018 10:29 pm

All fine here (Thu. 2018-12-06 22:30 UTC).

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:

Re: Tides block stopped working

Post by livejerseyweather » Mon Oct 07, 2019 6:31 pm

I think the formatting has changed again as all appears to be offline. Any ideas anyone?

User avatar
stewart45
Observer
Observer
Posts: 42
Joined: Sun Aug 20, 2017 1:29 pm
Location: Skelton-in-Cleveland,UK
Station model: Ecowitt
Software: pws-dashboard
Contact:

Re: Tides block stopped working

Post by stewart45 » Wed Oct 09, 2019 11:51 am

same problem here
Image

Post Reply