possible minor bug(s) in internet_weather.pl (or "A windy day") etc.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

possible minor bug(s) in internet_weather.pl (or "A windy day") etc.

ricks03
mh 2.100

Well, today here is REALLY windy, and tripping all of my outside
motion detectors (which tell me someone's outside).

so I decided to figure out where the wind stuff was, and mute MH when
the wind speed was high.

Long story short, still don't have that working, but, in
internet_weather.pl in some log cases it's set to report the
non-internet information.  if you're not using weather_use_internet
in mh.ini, and have no weather station, it doesn't report correctly.
Current:
         print_log "Weather:Wind is $Weather{Wind}";
         print_log "Weather:Wind Chill is $Weather{WindChill}" if
$Weather{WindChill};
         print_log "Weather:Humidity is $Weather{Humid}%";

Where it should really all be the internet variables (note the
addition of "I" or "Internet" in many cases:
Corrected:
         print_log "Weather:Wind is $Weather{WindI}";
         print_log "Weather:Wind Chill is $Weather{WindChillI}" if
$Weather{WindChillI};
         print_log "Weather:Humidity is $Weather{HumidInternet}%";

Also this line
             $Weather{WindGustSpeed} = $Weather{WindGustPseedI};
should be
             $Weather{WindGustSpeed} = $Weather{WindGustSpeedI};

On the bright side, I found weather_use_internet for mh.private.ini
which I didn't know about before, so all of the variables now are
available for my use where I couldn't figure out why before!  (and
let's me fix my internet_usgs.pl module the same way).

Finally, is there a reason weather_com seems to use slightly
different variables (such as $Weather{wind} instead of $Weather{Wind}

Finally, in the updates file for 2.99 it says

Mark Radke updated code/common/weather_rrd_update.pl to correctly
calculates the sea level pressure if the weather_uom_baro variable is
set to mb. Mark also created code/common/weather_summary.pl to update
the $Weather{Summary_Short} used in the web status bar.

yet this file (weather_summary.pl) isn't in the 2.100 distro?

Okay, that's enough for now
:-)

Rick


Rick Steeves
[hidden email]                               http://www.sinister.net



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: possible minor bug(s) in internet_weather.pl (or "A windy day") etc.

Bruce Winter
> Long story short, still don't have that working, but, in
> internet_weather.pl in some log cases it's set to report the
> non-internet information.  if you're not using weather_use_internet in
> mh.ini, and have no weather station, it doesn't report correctly.
> Current:
>         print_log "Weather:Wind is $Weather{Wind}";
>         print_log "Weather:Wind Chill is $Weather{WindChill}" if
> $Weather{WindChill};
>         print_log "Weather:Humidity is $Weather{Humid}%";
>
> Where it should really all be the internet variables (note the addition
> of "I" or "Internet" in many cases:
> Corrected:
>         print_log "Weather:Wind is $Weather{WindI}";
>         print_log "Weather:Wind Chill is $Weather{WindChillI}" if
> $Weather{WindChillI};
>         print_log "Weather:Humidity is $Weather{HumidInternet}%";

I think the original code is ok.  A few lines up from the above code you
can see the xyzI data gets copied into the xyz entries.


> Also this line
>             $Weather{WindGustSpeed} = $Weather{WindGustPseedI};
> should be
>             $Weather{WindGustSpeed} = $Weather{WindGustSpeedI};

Yep, thats a typo.  Fixed that one.


> Finally, is there a reason weather_com seems to use slightly different
> variables (such as $Weather{wind} instead of $Weather{Wind}

That code/public/weather_com.pl code is pretty old.  Looks like it
doesn't follow the current conventions, like the code/common/*weather*
code does.

> Finally, in the updates file for 2.99 it says
>
> Mark Radke updated code/common/weather_rrd_update.pl to correctly
> calculates the sea level pressure if the weather_uom_baro variable is
> set to mb. Mark also created code/common/weather_summary.pl to update
> the $Weather{Summary_Short} used in the web status bar.
>
> yet this file (weather_summary.pl) isn't in the 2.100 distro?

Good catch.   Must have finger fumbled that file.   I found that file in
my local google cache (Google Desktop is amazing!) and copied it over.

Bruce


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: possible minor bug(s) in internet_weather.pl (or "A windy day") etc.

ricks03

At 10:13 PM 1/27/2006, Bruce Winter wrote:
>>Corrected:
>>         print_log "Weather:Wind is $Weather{WindI}";
>>         print_log "Weather:Wind Chill is $Weather{WindChillI}" if
>> $Weather{WindChillI};
>>         print_log "Weather:Humidity is $Weather{HumidInternet}%";
>
>I think the original code is ok.  A few lines up from the above code
>you can see the xyzI data gets copied into the xyz entries.

But it only gets copied in if you have the weather_use_internet = 1
set in mh.ini
Shouldn't it report what the values are even if that ini entry isn't
set? So that the local module reports its (local) data correctly,
even sans ini entry?

Rick
PS Glad to see the others were useful. That the correct format/method
to report issues?



Rick Steeves
[hidden email]                               http://www.sinister.net



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: possible minor bug(s) in internet_weather.pl (or "A windy day") etc.

Bruce Winter
> But it only gets copied in if you have the weather_use_internet = 1 set
> in mh.ini
> Shouldn't it report what the values are even if that ini entry isn't
> set? So that the local module reports its (local) data correctly, even
> sans ini entry?

I see now.  Yep, good point.  Copied in your changes, thanks.

Bruce


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365