diff --git a/fhem/CHANGED b/fhem/CHANGED index 73b122360..2f9cc3684 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,12 @@ # 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. - - bugfix: 14_SD_WS.pm: Corrected protocol 115 battery bit, + - feature: 10_SD_GT.pm: repeats can be configured via attribute + - change: 00_SIGNALduino.pm: clone Protocol Object for every definition + changed timer creation and deletion + use FHEM::Core::Timer::Helper + - bugfix: 00_SIGNALduino.pm: make SIGNALduino_IdList more robust + use FHEM::Core::Utils::Math round function + - bugfix: 14_SD_WS.pm: Corrected protocol 115 battery bit, added batChange bit corrected calculation for negative temperatures - feature: 14_SD_WS.pm: add TFA 30.3151 (T/H-transmitter) diff --git a/fhem/FHEM/10_SD_GT.pm b/fhem/FHEM/10_SD_GT.pm index 9d36c64b7..ef7893cde 100644 --- a/fhem/FHEM/10_SD_GT.pm +++ b/fhem/FHEM/10_SD_GT.pm @@ -15,7 +15,7 @@ use warnings; use GPUtils qw(GP_Import GP_Export); use FHEM::Meta; -our $VERSION = '1.0'; +our $VERSION = '1.1'; # Export to main context with different name GP_Export(qw( @@ -50,7 +50,7 @@ sub Initialize { $hash->{SetFn} = \&Set; $hash->{ParseFn} = \&Parse; $hash->{Match} = '^P49#[A-Fa-f0-9]+'; - $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 showtime:1,0 $main::readingFnAttributes"; + $hash->{AttrList} = "IODev repeats:1,2,3,4,5,6,7,8,9,12,15 showtime:0,1 disableSetAllFunction:0,1 do_not_notify:0,1 ignore:0,1 showtime:0,1 $main::readingFnAttributes"; $hash->{AutoCreate} = {'SD_GT_LEARN' => {FILTER => '%NAME', autocreateThreshold => '5:180', GPLOT => q{}}}; return FHEM::Meta::InitMod( __FILE__, $hash ); } @@ -209,7 +209,7 @@ sub Set { my $ret = undef; my $EMPTY = q{}; - if (not defined $cmd) { return "The command \"set $name\" requires at least one of the arguments: \"on\" or \"off\"" }; + if (not defined $cmd) { return "The command \"set $name\" requires at least one of the arguments: \"on\" or \"off\"" }; if ($cmd eq q{?}) { if ($hash->{DEF} ne 'LEARN') { @@ -227,7 +227,7 @@ sub Set { if ($cmd eq 'off') { $sendCodesStr = ReadingsVal($name, 'CodesOff', $EMPTY) }; @sendCodesAr = split /[,]/xms , $sendCodesStr; $sendCodesCnt = scalar @sendCodesAr; - if ($sendCodesCnt < 1) { return "$name: No codes available for sending, please press buttons on your remote for learning." }; + if ($sendCodesCnt < 1) { return "$name: No codes available for sending, please press buttons on your remote for learning." }; my ($index) = grep { $sendCodesAr[$_] eq $sendCode } (0 .. $sendCodesCnt - 1); if (not defined $index) { $index = -1 }; $index++; @@ -237,7 +237,7 @@ sub Set { Log3 $name, 3, "$ioname: SD_GT set $name $cmd"; Log3 $name, 4, "$ioname: SD_GT_Set $name $cmd ($sendCodesCnt codes $sendCodesStr - send $sendCode)"; - if ($hash->{DEF} =~ /_all$/xms) { # send button all + if ($hash->{DEF} =~ /_all$/xms && AttrVal($name,'disableSetAllFunction', 0) == 0) { # send button all my $systemCode = ReadingsVal($name, 'SystemCode', $EMPTY); foreach my $d (keys %defs) { # sucht angelegte SD_GT mit gleichem Sytemcode if(defined($defs{$d}) && $defs{$d}{TYPE} eq 'SD_GT' && $defs{$d}{DEF} =~ /$systemCode/xms && $defs{$d}{DEF} =~ /[ABCD]$/xms && ReadingsVal($d, 'state', $EMPTY) ne $cmd) { @@ -247,10 +247,10 @@ sub Set { } } - my $msg = 'P49#0x' . $sendCode . '#R4'; + my $msg = 'P49#0x' . $sendCode . '#R' . $repeats; Log3 $name, 5, "$ioname: $name SD_GT_Set first set sendMsg $msg"; IOWrite($hash, 'sendMsg', $msg); - $msg = 'P49.1#0x' . $sendCode . '#R4'; + $msg = 'P49.1#0x' . $sendCode . '#R' . $repeats; Log3 $name, 5, "$ioname: $name SD_GT_Set second set sendMsg $msg"; IOWrite($hash, 'sendMsg', $msg); @@ -365,7 +365,7 @@ sub Parse { if (defined $level) { Log3 $name, 4, "$ioname: SD_GT_Parse code $rawData, $name, button $level $state" }; - if (defined $level && $level eq 'all') { # received button all + if (defined $level && $level eq 'all' && AttrVal($name,'disableSetAllFunction', 0) == 0) { # received button all foreach my $d (keys %defs) { # sucht angelegte SD_GT mit gleichem Sytemcode if(defined($defs{$d}) && $defs{$d}{TYPE} eq 'SD_GT' && $defs{$d}{DEF} =~ /$systemCode/xms && $defs{$d}{DEF} =~ /[ABCD]$/xms && ReadingsVal($d, 'state', $EMPTY) ne $state) { readingsSingleUpdate($defs{$d}, 'state' , $state , 1); @@ -473,7 +473,7 @@ sub getSystemCodes { =begin html - +

SD_GT