From 8eda4a093ed75c88fcf6d131b92ed7133ea7bd40 Mon Sep 17 00:00:00 2001 From: sidey79 Date: Mon, 13 Apr 2020 21:14:53 +0000 Subject: [PATCH] 14_SD_WS.pm: removed IODEV Attribute Forum #109822 14_SD_WS07.pm: removed IODEV Attribute 14_Hideki.pm: removed IODEV Attribute 14_SD_WS_Maverick.pm: removed IODEV Attribute git-svn-id: https://svn.fhem.de/fhem/trunk@21666 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 4 ++++ fhem/FHEM/14_Hideki.pm | 20 ++------------------ fhem/FHEM/14_SD_WS.pm | 20 +++----------------- fhem/FHEM/14_SD_WS07.pm | 19 ++----------------- fhem/FHEM/14_SD_WS_Maverick.pm | 13 +++---------- 5 files changed, 14 insertions(+), 62 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index b9c49f1f1..04ef54c46 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,9 @@ # 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. + - change: 14_SD_WS_Maverick.pm: Attribute "IODev" in module deleted. + - change: 14_SD_WS07.pm: Attribute "IODev" in module deleted. + - change: 14_Hideki.pm: Attribute "IODev" in module deleted. + - change: 14_SD_WS.pm: Attribute "IODev" in module deleted. Forum #109822 - bugfix: 00_SIGNALduino: Workaround, sending muliple commands causes collison Forum: #110035 Fixed docs and return value for get raw command diff --git a/fhem/FHEM/14_Hideki.pm b/fhem/FHEM/14_Hideki.pm index c365e245f..4254a8111 100644 --- a/fhem/FHEM/14_Hideki.pm +++ b/fhem/FHEM/14_Hideki.pm @@ -9,6 +9,7 @@ # changed the way crc and decrypt is used hjgode 20171129 package main; +#use version 0.77; our $VERSION = version->declare('v3.4.3'); use strict; use warnings; @@ -26,9 +27,8 @@ Hideki_Initialize($) $hash->{Match} = "^P12#75[A-F0-9]{17,30}"; # Laenge (Anhahl nibbles nach 0x75 )noch genauer spezifizieren $hash->{DefFn} = "Hideki_Define"; $hash->{UndefFn} = "Hideki_Undef"; - $hash->{AttrFn} = "Hideki_Attr"; $hash->{ParseFn} = "Hideki_Parse"; - $hash->{AttrList} = "IODev do_not_notify:0,1 showtime:0,1" + $hash->{AttrList} = "do_not_notify:0,1 showtime:0,1" ." ignore:0,1" ." windDirCorr windSpeedCorr" ." $readingFnAttributes"; @@ -422,22 +422,6 @@ sub wind { return ($windchill,$windspeed,$windgust,$winddir,$winddirdeg,$winddirtext); } -sub -Hideki_Attr(@) -{ - my @a = @_; - - # Make possible to use the same code for different logical devices when they - # are received through different physical devices. - return if($a[0] ne "set" || $a[2] ne "IODev"); - my $hash = $defs{$a[1]}; - my $iohash = $defs{$a[3]}; - my $cde = $hash->{CODE}; - delete($modules{Hideki}{defptr}{$cde}); - $modules{Hideki}{defptr}{$iohash->{NAME} . "." . $cde} = $hash; - return undef; -} - 1; diff --git a/fhem/FHEM/14_SD_WS.pm b/fhem/FHEM/14_SD_WS.pm index 9c2c930ff..7b4a52230 100644 --- a/fhem/FHEM/14_SD_WS.pm +++ b/fhem/FHEM/14_SD_WS.pm @@ -29,6 +29,8 @@ package main; +#use version 0.77; our $VERSION = version->declare('v3.4.3'); + use strict; use warnings; # use Digest::CRC qw(crc); @@ -48,8 +50,7 @@ sub SD_WS_Initialize($) $hash->{DefFn} = "SD_WS_Define"; $hash->{UndefFn} = "SD_WS_Undef"; $hash->{ParseFn} = "SD_WS_Parse"; - $hash->{AttrFn} = "SD_WS_Attr"; - $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 showtime:1,0 " . + $hash->{AttrList} = "do_not_notify:1,0 ignore:0,1 showtime:1,0 " . "model:E0001PA,S522,TX-EZ6,other " . "max-deviation-temp:1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50 ". "max-deviation-hum:1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50 ". @@ -1129,21 +1130,6 @@ sub SD_WS_Parse($$) } -sub SD_WS_Attr(@) -{ - my @a = @_; - - # Make possible to use the same code for different logical devices when they - # are received through different physical devices. - return if($a[0] ne "set" || $a[2] ne "IODev"); - my $hash = $defs{$a[1]}; - my $iohash = $defs{$a[3]}; - my $cde = $hash->{CODE}; - delete($modules{SD_WS}{defptr}{$cde}); - $modules{SD_WS}{defptr}{$iohash->{NAME} . "." . $cde} = $hash; - return undef; -} - # Pruefsummenberechnung "reverse Galois LFSR with byte reflection" # Wird nur fuer TFA Drop Protokoll benoetigt # TFA Drop Protokoll benoetigt als gen 0x31, als key 0xf4 diff --git a/fhem/FHEM/14_SD_WS07.pm b/fhem/FHEM/14_SD_WS07.pm index 04c279c9e..2c3a89b6c 100644 --- a/fhem/FHEM/14_SD_WS07.pm +++ b/fhem/FHEM/14_SD_WS07.pm @@ -26,6 +26,7 @@ package main; +#use version 0.77; our $VERSION = version->declare('v3.4.3'); use strict; use warnings; @@ -41,8 +42,7 @@ SD_WS07_Initialize($) $hash->{DefFn} = "SD_WS07_Define"; $hash->{UndefFn} = "SD_WS07_Undef"; $hash->{ParseFn} = "SD_WS07_Parse"; - $hash->{AttrFn} = "SD_WS07_Attr"; - $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 showtime:1,0 " . + $hash->{AttrList} = "do_not_notify:1,0 ignore:0,1 showtime:1,0 " . "negation-batt:no,yes ". "max-deviation-temp:1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50 ". "offset-temp ". @@ -282,21 +282,6 @@ SD_WS07_Parse($$) return $name; } -sub SD_WS07_Attr(@) -{ - my @a = @_; - - # Make possible to use the same code for different logical devices when they - # are received through different physical devices. - return if($a[0] ne "set" || $a[2] ne "IODev"); - my $hash = $defs{$a[1]}; - my $iohash = $defs{$a[3]}; - my $cde = $hash->{CODE}; - delete($modules{SD_WS07}{defptr}{$cde}); - $modules{SD_WS07}{defptr}{$iohash->{NAME} . "." . $cde} = $hash; - return undef; -} - 1; diff --git a/fhem/FHEM/14_SD_WS_Maverick.pm b/fhem/FHEM/14_SD_WS_Maverick.pm index 51d5ac7d5..02574a879 100644 --- a/fhem/FHEM/14_SD_WS_Maverick.pm +++ b/fhem/FHEM/14_SD_WS_Maverick.pm @@ -17,6 +17,7 @@ package main; +#use version 0.77; our $VERSION = version->declare('v3.4.3'); use strict; use warnings; @@ -41,7 +42,7 @@ SD_WS_Maverick_Initialize($) $hash->{UndefFn} = "SD_WS_Maverick_Undef"; $hash->{ParseFn} = "SD_WS_Maverick_Parse"; $hash->{AttrFn} = "SD_WS_Maverick_Attr"; - $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 showtime:1,0 inactivityinterval " . + $hash->{AttrList} = "do_not_notify:1,0 ignore:0,1 showtime:1,0 inactivityinterval " . "$readingFnAttributes "; $hash->{AutoCreate} = { "SD_WS_Maverick.*" => { ATTR => "event-min-interval:.*:300 event-on-change-reading:.*", FILTER => "%NAME", autocreateThreshold => "2:180"} }; @@ -254,15 +255,7 @@ sub SD_WS_Maverick_Attr(@) my ($cmd,$name,$attr_name,$attr_value) = @_; my $hash = $defs{$name}; if($cmd eq "set") { - if($attr_name eq "IODev") { - # Make possible to use the same code for different logical devices when they - # are received through different physical devices. - my $iohash = $defs{$attr_value}; - my $cde = $hash->{CODE}; - delete($modules{SD_WS_Maverick}{defptr}{$cde}); - $modules{SD_WS_Maverick}{defptr}{$iohash->{NAME} . "." . $cde} = $hash; - } - elsif($attr_name eq "inactivityinterval") { + if($attr_name eq "inactivityinterval") { if (!looks_like_number($attr_value) || int($attr_value) < 60 || int($attr_value) > 3600) { return "$name: Value \"$attr_value\" is not allowed.\n" ."inactivityinterval must be a number between 60 and 3600."