mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 17:12:32 +00:00
weather station correction
git-svn-id: https://svn.fhem.de/fhem/trunk@5262 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
86fa125855
commit
bc04024555
@ -873,15 +873,15 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
$w = ($w & 0x3fff)/10;
|
$w = ($w & 0x3fff)/10;
|
||||||
$wd = $wd * 5;
|
$wd = $wd * 5;
|
||||||
my $sM = "state:";
|
my $sM = "state:";
|
||||||
if($t) {$sM .= "T: $t " ;push @evtEt,[$shash,1,"temperature:$t" ];}
|
if(defined $t) {$sM .= "T: $t " ;push @evtEt,[$shash,1,"temperature:$t" ];}
|
||||||
if($h) {$sM .= "H: $h " ;push @evtEt,[$shash,1,"humidity:$h" ];}
|
if(defined $h) {$sM .= "H: $h " ;push @evtEt,[$shash,1,"humidity:$h" ];}
|
||||||
if($w) {$sM .= "W: $w " ;push @evtEt,[$shash,1,"windSpeed:$w" ];}
|
if(defined $w) {$sM .= "W: $w " ;push @evtEt,[$shash,1,"windSpeed:$w" ];}
|
||||||
if($wd) {$sM .= "R: $wd " ;push @evtEt,[$shash,1,"windDirection:$wd" ];}
|
if(defined $wd) {$sM .= "R: $wd " ;push @evtEt,[$shash,1,"windDirection:$wd" ];}
|
||||||
if($wdr){$sM .= "IR: $wdr ";push @evtEt,[$shash,1,"windDirRange:$wdr" ];}
|
if(defined $ir) {$sM .= "IR: $ir " ;push @evtEt,[$shash,1,"windDirRange:$ir" ];}
|
||||||
if($r) {$sM .= "WD: $r " ;push @evtEt,[$shash,1,"rain:$r" ];}
|
if(defined $r) {$sM .= "WD: $r " ;push @evtEt,[$shash,1,"rain:$r" ];}
|
||||||
if($ir) {$sM .= "WDR: $ir ";push @evtEt,[$shash,1,"isRaining:$ir" ];}
|
if(defined $wdr){$sM .= "WDR: $wdr ";push @evtEt,[$shash,1,"isRaining:$wdr" ];}
|
||||||
if($s) {$sM .= "S: $s " ;push @evtEt,[$shash,1,"sunshine:$s" ];}
|
if(defined $s) {$sM .= "S: $s " ;push @evtEt,[$shash,1,"sunshine:$s" ];}
|
||||||
if($b) {$sM .= "B: $b " ;push @evtEt,[$shash,1,"brightness:$b" ];}
|
if(defined $b) {$sM .= "B: $b " ;push @evtEt,[$shash,1,"brightness:$b" ];}
|
||||||
push @evtEt,[$shash,1,$sM];
|
push @evtEt,[$shash,1,$sM];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1351,7 +1351,6 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
$physLvl = ReadingsVal($name,"phyLevel",$val)
|
$physLvl = ReadingsVal($name,"phyLevel",$val)
|
||||||
if(!$physLvl); #not updated? use old or ignore
|
if(!$physLvl); #not updated? use old or ignore
|
||||||
my $vs = ($val==100 ? "on":($val==0 ? "off":"$val")); # user string...
|
my $vs = ($val==100 ? "on":($val==0 ? "off":"$val")); # user string...
|
||||||
|
|
||||||
push @evtEt,[$shash,1,"level:$val"];
|
push @evtEt,[$shash,1,"level:$val"];
|
||||||
push @evtEt,[$shash,1,"pct:$val"]; # duplicate to level - necessary for "slider"
|
push @evtEt,[$shash,1,"pct:$val"]; # duplicate to level - necessary for "slider"
|
||||||
push @evtEt,[$shash,1,"deviceMsg:$vs$target"] if($chn ne "00");
|
push @evtEt,[$shash,1,"deviceMsg:$vs$target"] if($chn ne "00");
|
||||||
@ -1774,8 +1773,7 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
no strict "refs";
|
no strict "refs";
|
||||||
my @ret = &{"CUL_HM_Parse$st"}($mFlg,$mTp,$src,$dst,$p,$target);
|
my @ret = &{"CUL_HM_Parse$st"}($mFlg,$mTp,$src,$dst,$p,$target);
|
||||||
use strict "refs";
|
use strict "refs";
|
||||||
push @entities,@ret;
|
push @evtEt,@ret;
|
||||||
push @evtEt,[$shash,1,""] if (@ret);
|
|
||||||
}
|
}
|
||||||
else{########################################################################
|
else{########################################################################
|
||||||
; # no one wants the message
|
; # no one wants the message
|
||||||
@ -3115,6 +3113,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
|||||||
}
|
}
|
||||||
elsif($cmd =~ m/^(up|down|pct)$/) { #########################################
|
elsif($cmd =~ m/^(up|down|pct)$/) { #########################################
|
||||||
my ($lvl,$tval,$rval) = ($a[2],"","");
|
my ($lvl,$tval,$rval) = ($a[2],"","");
|
||||||
|
$lvl =~ s/(\d*\.?\d*).*/$1/;
|
||||||
if ($cmd ne "pct"){#dim [<changeValue>] ... [ontime] [ramptime]
|
if ($cmd ne "pct"){#dim [<changeValue>] ... [ontime] [ramptime]
|
||||||
$lvl = 10 if (!defined $a[2]); #set default step
|
$lvl = 10 if (!defined $a[2]); #set default step
|
||||||
$lvl = -1*$lvl if ($cmd eq "down");
|
$lvl = -1*$lvl if ($cmd eq "down");
|
||||||
|
@ -1655,7 +1655,7 @@ $culHmChanSets{"ROTO_ZEL-STG-RM-FWT02"} = $culHmChanSets{"HM-CC-TC02"};
|
|||||||
LOWBAT => '00,2,$val=(hex($val)&0x80)?1:0',
|
LOWBAT => '00,2,$val=(hex($val)&0x80)?1:0',
|
||||||
NBR => '02,2,$val=(hex($val))',
|
NBR => '02,2,$val=(hex($val))',
|
||||||
VALUE => '04,2,$val=(hex($val))',} },
|
VALUE => '04,2,$val=(hex($val))',} },
|
||||||
"42" => { txt => "SwitchLevel", params => {
|
"42" => { txt => "SwitchLevel" , params => {
|
||||||
BUTTON => '00,2,$val=(hex($val)&0x3F)',
|
BUTTON => '00,2,$val=(hex($val)&0x3F)',
|
||||||
NBR => '02,2,$val=(hex($val))',
|
NBR => '02,2,$val=(hex($val))',
|
||||||
LEVEL => '04,2,$val=(hex($val))',} },
|
LEVEL => '04,2,$val=(hex($val))',} },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user