Tides block stopped working
- Alexandros
- 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
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?
Any help on above?
-
hcorrin
- 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
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
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
- LOBWX
- 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
Same here - Data N/A
Just BE NICE! That's all it takes to be a decent human...
- meteocaldas
- 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
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

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
- Asobig
- 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
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:
to:
Change line 71 from:
to:
Change line 80 from:
to:
Change line 84 from:
to:
Then the block is working again.
Do the following:
In tidesBlock.php change line 55 from:
Code: Select all
preg_match('/<h1 class="tab">Tide Times for (.*?)<\/h1>/',$html,$matchesPlace);Code: Select all
preg_match('/<h1 class="title is-4 has-text-primary has-text-centered">Tide Times for (.*?)<\/h1>/',$html,$matchesPlace);Code: Select all
preg_match('/\<section class="tide-events not_in_print"\>(.*)?\<\/section\>/',$html,$matches);Code: Select all
preg_match('/\<section class="section tides-content-table tide-events not_in_print is-imperial" >(.*)?\<\/section\>/',$html,$matches);Code: Select all
$explodeDays = explode('<td class="date"',$predictionDiv);Code: Select all
$explodeDays = explode('<th class="date "',$predictionDiv);Code: Select all
preg_match('/rowspan="[0-9]">(.*?)<\/td>(.*?)$/',$explodeDays[$i],$matches);Code: Select all
preg_match('/rowspan="[0-9]" >(.*?)<\/th>(.*?)$/',$explodeDays[$i],$matches);- John B
- 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
Thanks, Asobig, there's a bucket of salt water heading your way. 
It surely works for me.
Regards,
John
It surely works for me.
Regards,
John
- xl1954
- 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
Hello all
After the correction from Absoblg, all is running.
Thanks a lot
After the correction from Absoblg, all is running.
Thanks a lot
- Gus
- 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
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
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
- meteocaldas
- 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
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
- LOBWX
- 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
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???
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

- 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
In case you hadn't noticed, your tide plugin isn't working either!!!
Neither is mine
Neither is mine
- LOBWX
- 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
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...
- Alexandros
- 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
All is fine again. Asobig, thank you for your effort and especially your time.
-
dtwrlewis
- 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
This worked for me
Thanks
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
- LOBWX
- 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
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~
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

- 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
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
http://www.hc-iom.co.uk/template/plugin ... /index.php
-
dtwrlewis
- 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
Data not available again.
Have they changed their formatting again?Anyone else having this problem?
Have they changed their formatting again?Anyone else having this problem?
- livejerseyweather
- 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
I think the formatting has changed again as all appears to be offline. Any ideas anyone?