2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-26 04:24:53 +00:00

HMCCU: Version 5.0 Fixed cmd detection bug

git-svn-id: https://svn.fhem.de/fhem/trunk@25101 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
zap 2021-10-21 18:43:56 +00:00
parent ad83e0df00
commit 252ef55d4e
5 changed files with 24 additions and 10 deletions

@ -57,7 +57,7 @@ my %HMCCU_CUST_CHN_DEFAULTS;
my %HMCCU_CUST_DEV_DEFAULTS;
# HMCCU version
my $HMCCU_VERSION = '5.0 212921914';
my $HMCCU_VERSION = '5.0 212941907';
# Timeout for CCU requests (seconds)
my $HMCCU_TIMEOUT_REQUEST = 4;
@ -6860,10 +6860,16 @@ sub HMCCU_UpdateRoleCommands ($$;$)
}
}
}
else {
if (!HMCCU_IsValidParameter ($clHash, "$addr:$cmdChn", $psName, $dpt, $parAccess)) {
HMCCU_Log ($clHash, 4, "Invalid parameter $addr:$cmdChn $psName $dpt $parAccess");
next URCSUB;
}
}
my $paramDef = HMCCU_GetParamDef ($ioHash, "$addr:$cmdChn", $psName, $dpt);
if (!defined($paramDef)) {
HMCCU_Log ($ioHash, 3, "INFO: Can't get definition of datapoint $addr:$cmdChn.$dpt. Ignoring command $cmd for device $clHash->{NAME}");
HMCCU_Log ($ioHash, 4, "INFO: Can't get definition of datapoint $addr:$cmdChn.$dpt. Ignoring command $cmd for device $clHash->{NAME}");
next URCCMD;
}
$clHash->{hmccu}{roleCmds}{$cmdType}{$cmd}{subcmd}{$scn}{scn} = sprintf("%03d", $subCmdNo);
@ -6987,6 +6993,14 @@ sub HMCCU_UpdateRoleCommands ($$;$)
$parTypes[$pt]++;
$cnt++;
}
if ($cnt == 0) {
if (!exists($clHash->{hmccu}{roleCmds}{$cmdType}{$cmd}{subcount})) {
HMCCU_Log ($clHash, 4, "No datapoints found. Deleting command $cmd");
delete $clHash->{hmccu}{roleCmds}{$cmdType}{$cmd};
}
next URCCMD;
}
if ($parTypes[1] == 1 && $parTypes[2] == 0 && $cmdArgList ne '') {
# Only one variable argument. Argument belongs to a predefined value list

@ -30,7 +30,7 @@ sub HMCCUCHN_Set ($@);
sub HMCCUCHN_Get ($@);
sub HMCCUCHN_Attr ($@);
my $HMCCUCHN_VERSION = '5.0 212921914';
my $HMCCUCHN_VERSION = '5.0 212941907';
######################################################################
# Initialize module

@ -31,7 +31,7 @@ sub HMCCUDEV_Set ($@);
sub HMCCUDEV_Get ($@);
sub HMCCUDEV_Attr ($@);
my $HMCCUDEV_VERSION = '5.0 212921914';
my $HMCCUDEV_VERSION = '5.0 212941907';
######################################################################
# Initialize module

@ -39,7 +39,7 @@ require "$attr{global}{modpath}/FHEM/88_HMCCU.pm";
######################################################################
# HMCCURPC version
my $HMCCURPCPROC_VERSION = '5.0 212921914';
my $HMCCURPCPROC_VERSION = '5.0 212941907';
# Maximum number of events processed per call of Read()
my $HMCCURPCPROC_MAX_EVENTS = 100;

@ -1,5 +1,5 @@
UPD 2021-10-19_19:14:52 103909 FHEM/88_HMCCURPCPROC.pm
UPD 2021-10-18_19:13:22 85792 FHEM/HMCCUConf.pm
UPD 2021-10-19_19:14:52 44881 FHEM/88_HMCCUCHN.pm
UPD 2021-10-19_19:14:52 362815 FHEM/88_HMCCU.pm
UPD 2021-10-19_19:14:52 32541 FHEM/88_HMCCUDEV.pm
UPD 2021-10-21_19:07:03 103909 FHEM/88_HMCCURPCPROC.pm
UPD 2021-10-21_18:56:45 85792 FHEM/HMCCUConf.pm
UPD 2021-10-21_19:07:03 44881 FHEM/88_HMCCUCHN.pm
UPD 2021-10-21_19:07:03 363290 FHEM/88_HMCCU.pm
UPD 2021-10-21_19:07:03 32541 FHEM/88_HMCCUDEV.pm