From 113f0830ff8e804e4acf76b0db574f6c52c8bf2d Mon Sep 17 00:00:00 2001 From: zap <> Date: Mon, 1 Oct 2018 16:17:02 +0000 Subject: [PATCH] HMCCU: Ignore temporary programs git-svn-id: https://svn.fhem.de/fhem/trunk@17446 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/88_HMCCU.pm | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 0a8fc3d65..12755ef13 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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: 88_HMCCU: Temporary CCU programs are ignored now. - change: 19_Revolt: allow adjustment of energy value, filtering of implausible values - bugfix: 72_XiaomiDevice: better handling of definition w/ missing token diff --git a/fhem/FHEM/88_HMCCU.pm b/fhem/FHEM/88_HMCCU.pm index c9a06c200..b559cb6bf 100755 --- a/fhem/FHEM/88_HMCCU.pm +++ b/fhem/FHEM/88_HMCCU.pm @@ -4,7 +4,7 @@ # # $Id$ # -# Version 4.3.002 +# Version 4.3.003 # # Module for communication between FHEM and Homematic CCU2. # @@ -108,7 +108,7 @@ my %HMCCU_CUST_CHN_DEFAULTS; my %HMCCU_CUST_DEV_DEFAULTS; # HMCCU version -my $HMCCU_VERSION = '4.3.001'; +my $HMCCU_VERSION = '4.3.003'; # Default RPC port (BidCos-RF) my $HMCCU_RPC_PORT_DEFAULT = 2001; @@ -1405,7 +1405,7 @@ sub HMCCU_Set ($@) if (exists ($hash->{hmccu}{prg})) { my @progs = (); foreach my $p (keys %{$hash->{hmccu}{prg}}) { - push (@progs, $p) if ($hash->{hmccu}{prg}{$p}{internal} eq 'false'); + push (@progs, $p) if ($hash->{hmccu}{prg}{$p}{internal} eq 'false' && $p !~ /^\$/); } if (scalar (@progs) > 0) { my $prgopt = "execute:".join(',', @progs); @@ -4126,6 +4126,7 @@ sub HMCCU_GetDeviceList ($) my $typeprefix = ''; if ($hmdata[0] eq 'D') { + # Device next if (scalar (@hmdata) != 6); # 1=Interface 2=Device-Address 3=Device-Name 4=Device-Type 5=Channel-Count $objects{$hmdata[2]}{addtype} = 'dev'; @@ -4145,6 +4146,7 @@ sub HMCCU_GetDeviceList ($) } } elsif ($hmdata[0] eq 'C') { + # Channel next if (scalar (@hmdata) != 4); # 1=Channel-Address 2=Channel-Name 3=Direction $objects{$hmdata[1]}{addtype} = 'chn'; @@ -4155,6 +4157,7 @@ sub HMCCU_GetDeviceList ($) $objects{$hmdata[1]}{chndir} = $hmdata[3]; } elsif ($hmdata[0] eq 'I') { + # Interface next if (scalar (@hmdata) != 4); # 1=Interface-Name 2=Interface Info 3=URL my $ifurl = $hmdata[3]; @@ -4190,6 +4193,7 @@ sub HMCCU_GetDeviceList ($) } } elsif ($hmdata[0] eq 'P') { + # Program next if (scalar (@hmdata) != 4); # 1=Program-Name 2=Active-Flag 3=Internal-Flag $hash->{hmccu}{prg}{$hmdata[1]}{active} = $hmdata[2];