WXforum.net
June 19, 2013, 05:17:31 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6695  •  Posts: 181356  •  Topics: 18409
Please welcome KD0RII, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Yesterday rain is in reality, day -2  (Read 647 times)
0 Members and 1 Guest are viewing this topic.
druss67
Member
*
Offline Offline

Posts: 12



« on: April 22, 2012, 01:42:46 AM »

Hi everybody,

I am new french happy user of saratoga-weather script.
I use your script with a meteohub on a sheevaplug.
I read this forum since many months, this is first time I post here.

I have notice on my website a little bug.
Yesterday rain is not good, script show rain day -2.
See screenshots.

Can you tell me how and where 'yesterday' value is read ?

Many thanks in advance,
Regards.

Druss

http://meteo85220.me.funpic.org/wxindex.png
http://meteo85220.me.funpic.org/wu_history.png
http://meteo85220.me.funpic.org/wu_history_yesterday.png
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3783


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #1 on: April 22, 2012, 11:10:55 AM »

Hi Druss,

Meteohub does not provide a direct tag for 'yesterday' values, so a yesterday.html Meteohub template file is run at 23:59 to capture the day1_* tags and create yday-* tags as the file is uploaded to yesterday.php.

If you are running your Meteohub system with the local timezone set, and have the upload schedule for yesterday.html set as shown
then the capture of the day1_ values should be done ok.

It would help to have the URL to your weather website so I could check in greater detail.

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #2 on: April 27, 2012, 06:30:44 AM »

Hi Ken,

sorry for this late reply but I was on travel for my work.

http://druss.alwaysdata.net/meteo/wxindex.php

I will check configuration on my meteohub, I am not at home...

Many thanks for your help.

Druss
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3783


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #3 on: April 27, 2012, 01:34:25 PM »

Hi Druss,

Looking at http://druss.alwaysdata.net/meteo/MHtags.php?sce=dump shows
Quote
$WX['actual_utcdate'] = '20120427172518';
$WX['actual_utcdate2'] = '27.04.2012 17:25:18';

$WX['actual_localdate'] = '20120427192518';
$WX['actual_localdate2'] = '27.04.2012 19:25:18';
and http://druss.alwaysdata.net/meteo/yesterday.php?sce=view shows
Quote
$WX['yday_utcdate'] = '20120426215509';
$WX['yday_localdate'] = '20120426235509';
shows the yesterday data was captured on 2012-04-26 at 23:55:09 which seems to be working correctly (capturing day1_ data as yday_ data) so the cron on Meteohub seems to be working correctly.
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #4 on: April 28, 2012, 09:04:49 AM »

Hi Ken,

I have checked and for yesterday the value should be 3.0mm

Code:
$WX['yday_rain0_ratemax_time'] = '20120427200644';
$WX['yday_rain0_ratemax_mm'] = '0.8';
$WX['yday_rain0_total_mm'] = '3.00';
$WX['yday_rain0_total_time'] = '20120427235133';
$WX['yday_rain0_days'] = '1';

And if I look on my website yesterday value is 0.0

Code:
Rain Rate (/hr): 0.0 mm
Rain Yesterday: 0.00 mm
This Month: 80.30 mm

What I must understand ? I have to found a mistake on the script ?

Best regards,
Druss
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3783


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #5 on: April 28, 2012, 02:25:25 PM »

Ahh... found the issue.  In MH-defs.php there is
Code:
$yesterdayrain = MH_seqval('seqday1_rain0_total_mm',1,$uomrain);

I've done an update to the MH-defs.php to fix the issue.  Use the update utility to get the updated template (28-Apr-2012).

Sorry for the inconvenience!

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #6 on: April 28, 2012, 05:07:06 PM »

Hi Ken,

Thank you, I upload and test right now.

Best regards,
Druss
Logged
druss67
Member
*
Offline Offline

Posts: 12



« Reply #7 on: April 29, 2012, 03:12:36 AM »

Hi Ken,

You added this line in MH-defs.php, to solve the issue, no ?

Code:
if(isset($WX['yday_rain0_total_mm'])) {$yesterdayrain = $WX['yday_rain0_total_mm']; }

I have tested but issue is still here...
Or I have made a mistake, MH-defs-prototype.txt should be modified in MH-defs.php, no ?
Or, I need to use the template
Code:
http://druss.alwaysdata.net/meteo/MH-plugin/MHconfig/
?

Best regards,
Druss
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3783


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #8 on: April 29, 2012, 03:38:57 PM »

Hi Druss,

Yes, the update was to MH-defs-prototype.txt which should go in your ./MHconfig/ directory, then run (from your browser) ./MHconfig/index.php and click on the link for MH-defs.php and save the resulting file to your main website directory.
It's done that way since Meteohub includes both sensor-names and units in the tags (unlike the other weather software).

Yes, the one line was changed to test for and use the yday_rainN_total_UNITS value for $yesterdayrain.

Looking at http://druss.alwaysdata.net/meteo/MH-defs.php?sce=view shows you are still running V1.05, and not the fixed V1.06 version and that is likely the reason it is not yet working on your site.

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #9 on: April 29, 2012, 04:00:06 PM »

Hi Ken,

I am realy sorry for the misunderstanding.

It works perfectly now, many thanks for your help, Ken.

I wish you a nice day.

Best regards,
Régis
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.119 seconds with 19 queries.
anything