From 2cdac4d897c4ef095ceabc8757c8706774eb0395 Mon Sep 17 00:00:00 2001 From: bjoernh <> Date: Sun, 6 Aug 2017 08:48:24 +0000 Subject: [PATCH] 4_CUL_TCM97001: Add rain/wind Sensor 10_IT: Add FreeTec update documentation git-svn-id: https://svn.fhem.de/fhem/trunk@14852 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 4 +- fhem/FHEM/10_IT.pm | 281 ++++++++++++++++++------- fhem/FHEM/14_CUL_TCM97001.pm | 392 +++++++++++++++++++++++++++++++++-- 3 files changed, 585 insertions(+), 92 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index c7d212c7c..c0c41a874 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,8 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. -..-.chamged: configDB: store files base64 encoded, Forum:#74302 + - changed: 14_CUL_TCM97001: Add rain/wind Sensor + - changed: 10_IT: Add FreeTec update documentation + - changed: configDB: store files base64 encoded, Forum:#74302 - bugfix: 93_DbLog, back to V2.22.0, Forum:#75039 - bugfix: 93_DbLog, V2.22.1, Forum:#74690, warning unitialized value - feature: 70_WINCONNECT: [WinWebGUI] - Fenster verstecken diff --git a/fhem/FHEM/10_IT.pm b/fhem/FHEM/10_IT.pm index 8b2928730..be96121a1 100644 --- a/fhem/FHEM/10_IT.pm +++ b/fhem/FHEM/10_IT.pm @@ -564,7 +564,7 @@ IT_Set($@) $onoffcode = $hash->{userV1setCodes}{$a[0]}; } } - if (length($onoffcode) == 4) { # EV1527 + if (length($onoffcode) == 4 && $hash->{READINGS}{protocol}{VAL} ne 'SBC_FreeTec') { # EV1527 $onoffcode = $bintotristate{substr($onoffcode,0,2)} . $bintotristate{substr($onoffcode,2,2)}; } $message = "is".uc($hash->{XMIT}.$onoffcode); @@ -640,13 +640,13 @@ IT_Set($@) $protocolId = 'P3#'; # IT V1 } } - if ($hash->{READINGS}{protocol}{VAL} ne "EV1527" && $hash->{READINGS}{protocol}{VAL} ne "V1") { # bei ITv1 und EV1527 wird das "is" am Anfang nicht entfernt + if ($hash->{READINGS}{protocol}{VAL} ne "EV1527" && $hash->{READINGS}{protocol}{VAL} ne "V1" && $hash->{READINGS}{protocol}{VAL} ne 'SBC_FreeTec') { # bei ITv1, SBC_FreeTec und EV1527 wird das "is" am Anfang nicht entfernt $message = substr($message,2); if (substr($message,0,1) eq "h") { # h entfernen falls am am Anfang $message = substr($message,1); } } - Log3 $hash, 4, "$io->{NAME} IT_set: sendMsg=" . $protocolId . $message . '#R' . $SignalRepeats . $ITClock; + Log3 $hash, 4, "$io->{NAME} IT_set: sendMsg=" . $protocolId . $message . '#R' . $SignalRepeats . $ITClock . $ITfrequency; IOWrite($hash, 'sendMsg', $protocolId . $message . '#R' . $SignalRepeats . $ITClock . $ITfrequency); } return $ret; @@ -994,8 +994,9 @@ IT_Parse($$) my $isEV1527 = undef; if (length($msg) == 7) { if ($msgcode) { # ITv1 or SBC_FreeTec - if (substr($msg,6, 1) eq '0' && substr($msgcode,8,2) ne 'FF') { # SBC_FreeTec - $housecode=substr($msgcode,0,8); + my $sbcFreeTec = substr($msgcode,0,8); + if (defined($modules{IT}{defptr}{lc("$sbcFreeTec")}) || substr($msg,6, 1) eq '0' && substr($msgcode,8,2) ne 'FF') { # SBC_FreeTec + $housecode=$sbcFreeTec; $onoffcode=substr($msgcode,length($msgcode)-4,4); Log3 $hash,5,"$ioname IT: SBC_FreeTec housecode = $housecode onoffcode = $onoffcode"; } else { # ITv1 @@ -1130,7 +1131,9 @@ IT_Parse($$) } $def=$modules{IT}{defptr}{lc($housecode)}; #$lh->{"learn"} = 'ON'; + foreach my $name (keys %{$def}) { + next if (IsIgnored($name)); if (length($msg) == 17 || length($msg) == 19) { if ($def->{$name}->{READINGS}{group}{VAL} != $groupBit || $def->{$name}->{READINGS}{unit}{VAL} != $unitCode) { next; @@ -1285,12 +1288,11 @@ sub IT_Attr(@)
For Intertechno protocol 3 the <housecode> is a 26-digits number. - Additionaly there are a 4-digits unit code and a 1-digit group code used. + Additionaly there is a 4-digits <unit code> and a 1-digit <group code>.