Sea temperature Block
-
- Observer
- Posts: 14
- Joined: Tue Aug 22, 2017 6:33 am
Sea temperature Block
The block seems broken ?
Any ideas on fixing it ?
Any ideas on fixing it ?
- Asobig
- Advisor
- Posts: 72
- Joined: Mon Aug 21, 2017 7:05 am
- Location: Almere
- Station model: Davis Vantage VP2+
- Software: Meteobridge (Red)
- Contact:
Re: Sea temperature Block
It seems that that they changed the output of the json-file, to make it work i changed the following things in the block:
Remove line 90 to 95, so this part:
Change line 117 from:
To:
Change lines 134 to 138, from:
To:
I tested it only with Celsius!
Remove line 90 to 95, so this part:
Code: Select all
for($i=0;$i<count($data);$i++){
$data[$i]['current'] = number_format(convertor($data[$i]['current'],"C",$displayTempUnits),1,".","");
$data[$i]['thisMonthMax'] = number_format(convertor($data[$i]['thisMonthMax'],"C",$displayTempUnits),1,".","");
$data[$i]['thisMonthAvg'] = number_format(convertor($data[$i]['thisMonthAvg'],"C",$displayTempUnits),1,".","");
$data[$i]['thisMonthMin'] = number_format(convertor($data[$i]['thisMonthMin'],"C",$displayTempUnits),1,".","");
}
Code: Select all
<?php echo floor($data[$i]['current'])?>.<span style="font-size:0.6em"><?php echo number_format(($data[$i]['current'] - floor($data[$i]['current']))*10,0,".","")?> <?php echo unitFormatter($displayTempUnits)?></span>
Code: Select all
<?php echo $data[$i]["current"];?> <?php echo unitFormatter($displayTempUnits)?></span>
Code: Select all
<td style="width:33%"><?php echo lang('maximumAbbr','c')?><br><?php echo floor($data[$i]['thisMonthMax'])?>.<span style="font-size:0.7em"><?php echo number_format(($data[$i]['thisMonthMax'] - floor($data[$i]['thisMonthMax']))*10,0,".","")?> <?php echo unitFormatter($displayTempUnits)?></span>
</td>
<td style="width:33%"><?php echo lang('avgAbbr','c')?><br><?php echo floor($data[$i]['thisMonthAvg'])?>.<span style="font-size:0.7em"><?php echo number_format(($data[$i]['thisMonthAvg'] - floor($data[$i]['thisMonthAvg']))*10,0,".","")?> <?php echo unitFormatter($displayTempUnits)?></span>
</td>
<td style="width:33%"><?php echo lang('minimumAbbr','c')?><br><?php echo floor($data[$i]['thisMonthMin'])?>.<span style="font-size:0.7em"><?php echo number_format(($data[$i]['thisMonthMin'] - floor($data[$i]['thisMonthMin']))*10,0,".","")?> <?php echo unitFormatter($displayTempUnits)?></span>
Code: Select all
<td style="width:33%"><?php echo lang('maximumAbbr','c')?><br><?php echo $data[$i]['thisMonthMax']?> <?php echo unitFormatter($displayTempUnits)?></span>
</td>
<td style="width:33%"><?php echo lang('avgAbbr','c')?><br><?php echo $data[$i]['thisMonthAvg']?> <?php echo unitFormatter($displayTempUnits)?></span>
</td>
<td style="width:33%"><?php echo lang('minimumAbbr','c')?><br><?php echo $data[$i]['thisMonthMin']?> <?php echo unitFormatter($displayTempUnits)?></span>
</td>
-
- Observer
- Posts: 14
- Joined: Tue Aug 22, 2017 6:33 am
Re: Sea temperature Block
Thank you very much !
Works perfectly
Regards,
Leon
Works perfectly

Regards,
Leon
-
- Observer
- Posts: 24
- Joined: Thu Nov 04, 2021 4:44 pm
- Location: Galargues 34
- Station model: Davis pro 2
- Software: Weatherlink
- Contact:
Re: Sea temperature Block
Hello, I also had the same problem. Great, thanks to your explanations it works...
thanks a lot for your help
thanks a lot for your help
-
- Forecaster
- Posts: 111
- Joined: Mon Jan 31, 2022 4:41 pm
- Location: Sint-Katelijne-Waver, Belgium
- Station model: Davis Vantage Pro 2
- Software: Meteobridge
- Contact:
Re: Sea temperature Block
thx it works, could you make an 'official' update block? @davidefa, thx!!!
- cw3beck
- Observer
- Posts: 22
- Joined: Sun Aug 20, 2017 5:48 pm
- Location: Huntsville, AL
- Station model: Davis Pro 2
- Software: Weather Display
- Contact:
Re: Sea temperature Block
Thanks! Worked for me as well. Cheers!
- MeteoElMasnou
- Observer
- Posts: 18
- Joined: Sat Feb 05, 2022 1:56 pm
- Location: El Masnou / Catalunya
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: Sea temperature Block
Hello,
I followed all the steps you indicate and I can't get it to work.
Could you post the modified seaTemperatureBlock.php file?
Thank you
I followed all the steps you indicate and I can't get it to work.
Could you post the modified seaTemperatureBlock.php file?
Thank you
- Asobig
- Advisor
- Posts: 72
- Joined: Mon Aug 21, 2017 7:05 am
- Location: Almere
- Station model: Davis Vantage VP2+
- Software: Meteobridge (Red)
- Contact:
Re: Sea temperature Block
Here is the (zipped) php file.
I hope it works:
https://www.asobig.com/uploads/seaTempe ... ck.php.zip
I hope it works:
https://www.asobig.com/uploads/seaTempe ... ck.php.zip
- MeteoElMasnou
- Observer
- Posts: 18
- Joined: Sat Feb 05, 2022 1:56 pm
- Location: El Masnou / Catalunya
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: Sea temperature Block
Great, working.Asobig wrote: ↑Fri Jan 27, 2023 9:37 pm Here is the (zipped) php file.
I hope it works:
https://www.asobig.com/uploads/seaTempe ... ck.php.zip
Thank you