2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 19:32:42 +00:00

HMCCU: Ignore temporary programs

git-svn-id: https://svn.fhem.de/fhem/trunk@17446 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
zap 2018-10-01 16:17:02 +00:00
parent 17c8d2a25e
commit 113f0830ff
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # 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 - change: 19_Revolt: allow adjustment of energy value, filtering of
implausible values implausible values
- bugfix: 72_XiaomiDevice: better handling of definition w/ missing token - bugfix: 72_XiaomiDevice: better handling of definition w/ missing token

View File

@ -4,7 +4,7 @@
# #
# $Id$ # $Id$
# #
# Version 4.3.002 # Version 4.3.003
# #
# Module for communication between FHEM and Homematic CCU2. # Module for communication between FHEM and Homematic CCU2.
# #
@ -108,7 +108,7 @@ my %HMCCU_CUST_CHN_DEFAULTS;
my %HMCCU_CUST_DEV_DEFAULTS; my %HMCCU_CUST_DEV_DEFAULTS;
# HMCCU version # HMCCU version
my $HMCCU_VERSION = '4.3.001'; my $HMCCU_VERSION = '4.3.003';
# Default RPC port (BidCos-RF) # Default RPC port (BidCos-RF)
my $HMCCU_RPC_PORT_DEFAULT = 2001; my $HMCCU_RPC_PORT_DEFAULT = 2001;
@ -1405,7 +1405,7 @@ sub HMCCU_Set ($@)
if (exists ($hash->{hmccu}{prg})) { if (exists ($hash->{hmccu}{prg})) {
my @progs = (); my @progs = ();
foreach my $p (keys %{$hash->{hmccu}{prg}}) { 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) { if (scalar (@progs) > 0) {
my $prgopt = "execute:".join(',', @progs); my $prgopt = "execute:".join(',', @progs);
@ -4126,6 +4126,7 @@ sub HMCCU_GetDeviceList ($)
my $typeprefix = ''; my $typeprefix = '';
if ($hmdata[0] eq 'D') { if ($hmdata[0] eq 'D') {
# Device
next if (scalar (@hmdata) != 6); next if (scalar (@hmdata) != 6);
# 1=Interface 2=Device-Address 3=Device-Name 4=Device-Type 5=Channel-Count # 1=Interface 2=Device-Address 3=Device-Name 4=Device-Type 5=Channel-Count
$objects{$hmdata[2]}{addtype} = 'dev'; $objects{$hmdata[2]}{addtype} = 'dev';
@ -4145,6 +4146,7 @@ sub HMCCU_GetDeviceList ($)
} }
} }
elsif ($hmdata[0] eq 'C') { elsif ($hmdata[0] eq 'C') {
# Channel
next if (scalar (@hmdata) != 4); next if (scalar (@hmdata) != 4);
# 1=Channel-Address 2=Channel-Name 3=Direction # 1=Channel-Address 2=Channel-Name 3=Direction
$objects{$hmdata[1]}{addtype} = 'chn'; $objects{$hmdata[1]}{addtype} = 'chn';
@ -4155,6 +4157,7 @@ sub HMCCU_GetDeviceList ($)
$objects{$hmdata[1]}{chndir} = $hmdata[3]; $objects{$hmdata[1]}{chndir} = $hmdata[3];
} }
elsif ($hmdata[0] eq 'I') { elsif ($hmdata[0] eq 'I') {
# Interface
next if (scalar (@hmdata) != 4); next if (scalar (@hmdata) != 4);
# 1=Interface-Name 2=Interface Info 3=URL # 1=Interface-Name 2=Interface Info 3=URL
my $ifurl = $hmdata[3]; my $ifurl = $hmdata[3];
@ -4190,6 +4193,7 @@ sub HMCCU_GetDeviceList ($)
} }
} }
elsif ($hmdata[0] eq 'P') { elsif ($hmdata[0] eq 'P') {
# Program
next if (scalar (@hmdata) != 4); next if (scalar (@hmdata) != 4);
# 1=Program-Name 2=Active-Flag 3=Internal-Flag # 1=Program-Name 2=Active-Flag 3=Internal-Flag
$hash->{hmccu}{prg}{$hmdata[1]}{active} = $hmdata[2]; $hash->{hmccu}{prg}{$hmdata[1]}{active} = $hmdata[2];