mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 05:01:57 +00:00
bugfix: enabled logging for 59_Weather.pm (Boris)
git-svn-id: https://svn.fhem.de/fhem/trunk@967 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5a14e9420e
commit
89229a4d6f
@ -3,6 +3,7 @@
|
|||||||
- feature: CUL_TX added (thanks to Peterp)
|
- feature: CUL_TX added (thanks to Peterp)
|
||||||
- feature: TCM120 / EnOcean parser added
|
- feature: TCM120 / EnOcean parser added
|
||||||
- feature: eventMap enhanced
|
- feature: eventMap enhanced
|
||||||
|
- bugfix: enabled logging for 59_Weather.pm (Boris)
|
||||||
|
|
||||||
- 2011-07-08 (5.1)
|
- 2011-07-08 (5.1)
|
||||||
- feature: smallscreen optimizations for iPhone
|
- feature: smallscreen optimizations for iPhone
|
||||||
|
@ -37,9 +37,9 @@ sub f_to_c($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
sub Weather_UpdateReading($$$$$) {
|
sub Weather_UpdateReading($$$$$$) {
|
||||||
|
|
||||||
my ($hash,$prefix,$key,$tn,$value)= @_;
|
my ($hash,$prefix,$key,$tn,$value,$n)= @_;
|
||||||
|
|
||||||
return 0 if(!defined($value) || $value eq "");
|
return 0 if(!defined($value) || $value eq "");
|
||||||
return 0 if($key eq "unit_system");
|
return 0 if($key eq "unit_system");
|
||||||
@ -59,7 +59,14 @@ sub Weather_UpdateReading($$$$$) {
|
|||||||
my $r= $hash->{READINGS};
|
my $r= $hash->{READINGS};
|
||||||
$r->{$reading}{TIME}= $tn;
|
$r->{$reading}{TIME}= $tn;
|
||||||
$r->{$reading}{VAL} = $value;
|
$r->{$reading}{VAL} = $value;
|
||||||
Log 5, "Weather $hash->{NAME}: $reading= $value";
|
|
||||||
|
my $name= $hash->{NAME};
|
||||||
|
Log 1, "Weather $name: $reading= $value";
|
||||||
|
|
||||||
|
#if(!$hash->{LOCAL}) {
|
||||||
|
DoTrigger($name, ReadingsVal($name, $reading, "")); # if($init_done);
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -75,6 +82,8 @@ sub Weather_GetUpdate($)
|
|||||||
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
my $n= 0;
|
||||||
|
|
||||||
|
|
||||||
# time
|
# time
|
||||||
my $tn = TimeNow();
|
my $tn = TimeNow();
|
||||||
@ -97,14 +106,14 @@ sub Weather_GetUpdate($)
|
|||||||
my $current = $WeatherObj->current_conditions;
|
my $current = $WeatherObj->current_conditions;
|
||||||
foreach my $condition ( keys ( %$current ) ) {
|
foreach my $condition ( keys ( %$current ) ) {
|
||||||
my $value= $current->{$condition};
|
my $value= $current->{$condition};
|
||||||
Weather_UpdateReading($hash,"",$condition,$tn,$value);
|
Weather_UpdateReading($hash,"",$condition,$tn,$value,$n);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $fci= $WeatherObj->forecast_information;
|
my $fci= $WeatherObj->forecast_information;
|
||||||
foreach my $i ( keys ( %$fci ) ) {
|
foreach my $i ( keys ( %$fci ) ) {
|
||||||
my $reading= $i;
|
my $reading= $i;
|
||||||
my $value= $fci->{$i};
|
my $value= $fci->{$i};
|
||||||
Weather_UpdateReading($hash,"",$i,$tn,$value);
|
Weather_UpdateReading($hash,"",$i,$tn,$value,$n);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(my $t= 0; $t<= 3; $t++) {
|
for(my $t= 0; $t<= 3; $t++) {
|
||||||
@ -112,14 +121,10 @@ sub Weather_GetUpdate($)
|
|||||||
my $prefix= sprintf("fc%d_", $t);
|
my $prefix= sprintf("fc%d_", $t);
|
||||||
foreach my $condition ( keys ( %$fcc ) ) {
|
foreach my $condition ( keys ( %$fcc ) ) {
|
||||||
my $value= $fcc->{$condition};
|
my $value= $fcc->{$condition};
|
||||||
Weather_UpdateReading($hash,$prefix,$condition,$tn,$value);
|
Weather_UpdateReading($hash,$prefix,$condition,$tn,$value,$n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$hash->{LOCAL}) {
|
|
||||||
DoTrigger($name, undef) if($init_done);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,3 +478,6 @@
|
|||||||
|
|
||||||
- Thu Jun 30 2011 (Maz Rashid)
|
- Thu Jun 30 2011 (Maz Rashid)
|
||||||
- Introducing 00_TUL.pm and 10_EIB.pm modules for connecting FHEM on EIB.
|
- Introducing 00_TUL.pm and 10_EIB.pm modules for connecting FHEM on EIB.
|
||||||
|
|
||||||
|
- Thu Aug 04 2011 (Boris)
|
||||||
|
- enabled logging for 59_Weather.pm
|
@ -20,7 +20,7 @@ xx: measured distance in cm
|
|||||||
code:
|
code:
|
||||||
|
|
||||||
hex bin
|
hex bin
|
||||||
37 00110111 30s message interval, normal operation
|
37 00110111 30min message interval, normal operation
|
||||||
B7 10110111 3s message interval, normal operation
|
B7 10110111 3s message interval, normal operation
|
||||||
F7 11110111 3s message interval, battery low
|
F7 11110111 3s message interval, battery low
|
||||||
|||+++++-- 0x17 always 0x17
|
|||+++++-- 0x17 always 0x17
|
||||||
|
Loading…
x
Reference in New Issue
Block a user