diff --git a/fhem/CHANGED b/fhem/CHANGED index 6d4e243df..d8a9f8253 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. + - change: 88_HMCCU: Minor improvements - feature: 70_ESCVP21net: added LS12000 (with POPLP, LENS, HLENS) - bugfix: 76_SMAInverter:fix new ETOTAL/LOADTOTAL bug - change: 76_SMAInverter: add new hybrid inverters, STPxx.0SE diff --git a/fhem/FHEM/88_HMCCU.pm b/fhem/FHEM/88_HMCCU.pm index 7fa2b9344..19d12693a 100755 --- a/fhem/FHEM/88_HMCCU.pm +++ b/fhem/FHEM/88_HMCCU.pm @@ -57,7 +57,7 @@ my %HMCCU_CUST_CHN_DEFAULTS; my %HMCCU_CUST_DEV_DEFAULTS; # HMCCU version -my $HMCCU_VERSION = '5.0 222751518'; +my $HMCCU_VERSION = '5.0 222930908'; # Timeout for CCU requests (seconds) my $HMCCU_TIMEOUT_REQUEST = 4; @@ -650,27 +650,29 @@ sub HMCCU_Attr ($@) elsif ($attrname eq 'ccuflags') { my $ccuflags = AttrVal ($name, 'ccuflags', 'null'); if ($attrval =~ /(intrpc|extrpc)/) { - HMCCU_Log ($hash, 1, "HMCCU: [$name] RPC server mode $1 no longer supported. Using procrpc instead"); + HMCCU_Log ($hash, 1, "RPC server mode $1 no longer supported. Using procrpc instead"); $attrval =~ s/(extrpc|intrpc)/procrpc/; $_[3] = $attrval; } } elsif ($attrname eq 'ccuGetVars') { my ($interval, $pattern) = split /:/, $attrval; - $pattern = '.*' if (!defined ($pattern)); + $interval = 60 if (!defined($interval) || $interval eq ''); + $pattern = '.*' if (!defined($pattern) || $pattern eq ''); + return "HMCCU: [$name] Interval is not numeric for attribute ccuGetVars" if (!HMCCU_IsIntNum($interval)); $hash->{hmccu}{ccuvarspat} = $pattern; $hash->{hmccu}{ccuvarsint} = $interval; - RemoveInternalTimer ($hash, "HMCCU_UpdateVariables"); + RemoveInternalTimer ($hash, 'HMCCU_UpdateVariables'); if ($interval > 0) { - HMCCU_Log ($hash, 2, "HMCCU: [$name] Updating CCU system variables every $interval seconds"); - InternalTimer (gettimeofday()+$interval, "HMCCU_UpdateVariables", $hash); + HMCCU_Log ($hash, 2, "Updating CCU system variables matching $pattern every $interval seconds"); + InternalTimer (gettimeofday()+$interval, 'HMCCU_UpdateVariables', $hash); } } elsif ($attrname eq 'eventMap') { my @av = map { $_ =~ /^rpcserver (on|off):(on|off)$/ || $_ eq '' ? () : $_ } split (/\//, $attrval); if (scalar(@av) > 0) { $_[3] = '/'.join('/',@av).'/'; - HMCCU_Log ($hash, 2, "HMCCU: [$name] Removed rpcserver entries from attribute eventMap"); + HMCCU_Log ($hash, 2, "Removed rpcserver entries from attribute eventMap"); } else { # Workaround because FHEM is ignoring error values for attribute eventMap @@ -7813,8 +7815,8 @@ sub HMCCU_ExecuteGetDeviceInfoCommand ($@) "
Unique control roles: $detect->{uniqueControlRoleCount}
"; } } - $devInfo .= "
Current state datapoint = $sc.$sd
"; - $devInfo .= "
Current control datapoint = $cc.$cd
"; + $devInfo .= "
Current state datapoint = $sc.$sd
" if ($sc ne '' && $sd ne ''); + $devInfo .= "
Current control datapoint = $cc.$cd
" if ($cc ne '' && $cd ne ''); $devInfo .= '
Device description

';
 	$result = HMCCU_DeviceDescToStr ($ioHash, $clHash->{TYPE} eq 'HMCCU' ? $address : $clHash);
 	$devInfo .= '
'; @@ -8224,6 +8226,7 @@ sub HMCCU_GetSCDatapoints ($) my ($clHash) = @_; my $type = $clHash->{TYPE}; + return ('', '', '', '', 0, 0) if ($type ne 'HMCCUDEV' && $type ne 'HMCCUCHN'); my ($sc, $sd) = HMCCU_StateDatapoint ($clHash); my ($cc, $cd) = HMCCU_ControlDatapoint ($clHash); @@ -8233,10 +8236,6 @@ sub HMCCU_GetSCDatapoints ($) return ($sc, $sd, $cc, $cd, $rsdCnt, $rcdCnt) if ($rsdCnt > 0 || $rcdCnt > 0); - # Detect by attributes - # ($sc, $sd, $cc, $cd, $rsdCnt, $rcdCnt) = HMCCU_DetectSCAttr ($clHash, $sc, $sd, $cc, $cd); - # return ($sc, $sd, $cc, $cd, $rsdCnt, $rcdCnt) if ($rsdCnt); - my $ioHash = HMCCU_GetHash ($clHash); return HMCCU_SetDefaultSCDatapoints ($ioHash, $clHash); } @@ -10973,7 +10972,8 @@ sub HMCCU_MaxHashEntries ($$)
  • ccuGetVars <interval>:[<pattern>]
    Read CCU system variables periodically and update readings. If pattern is specified - only variables matching this expression are stored as readings. + only variables matching this expression are stored as readings. Delete attribute or set + interval to 0 to deactivate the polling of system variables.

  • ccuReqTimeout <Seconds>
    Set timeout for CCU request. Default is 4 seconds. This timeout affects several diff --git a/fhem/FHEM/88_HMCCUCHN.pm b/fhem/FHEM/88_HMCCUCHN.pm index b7f771936..9d0360f5f 100644 --- a/fhem/FHEM/88_HMCCUCHN.pm +++ b/fhem/FHEM/88_HMCCUCHN.pm @@ -30,7 +30,7 @@ sub HMCCUCHN_Set ($@); sub HMCCUCHN_Get ($@); sub HMCCUCHN_Attr ($@); -my $HMCCUCHN_VERSION = '5.0 222751518'; +my $HMCCUCHN_VERSION = '5.0 222930908'; ###################################################################### # Initialize module diff --git a/fhem/FHEM/88_HMCCUDEV.pm b/fhem/FHEM/88_HMCCUDEV.pm index 44eb5388f..2b5a1ace7 100644 --- a/fhem/FHEM/88_HMCCUDEV.pm +++ b/fhem/FHEM/88_HMCCUDEV.pm @@ -31,7 +31,7 @@ sub HMCCUDEV_Set ($@); sub HMCCUDEV_Get ($@); sub HMCCUDEV_Attr ($@); -my $HMCCUDEV_VERSION = '5.0 222751518'; +my $HMCCUDEV_VERSION = '5.0 222930908'; ###################################################################### # Initialize module diff --git a/fhem/FHEM/88_HMCCURPCPROC.pm b/fhem/FHEM/88_HMCCURPCPROC.pm index 5c2d4f9ba..53125bbc5 100755 --- a/fhem/FHEM/88_HMCCURPCPROC.pm +++ b/fhem/FHEM/88_HMCCURPCPROC.pm @@ -39,7 +39,7 @@ use SetExtensions; ###################################################################### # HMCCURPC version -my $HMCCURPCPROC_VERSION = '5.0 222751518'; +my $HMCCURPCPROC_VERSION = '5.0 222930908'; # Maximum number of events processed per call of Read() my $HMCCURPCPROC_MAX_EVENTS = 100; diff --git a/fhem/FHEM/HMCCUConf.pm b/fhem/FHEM/HMCCUConf.pm index 5d3baed58..a87992a3d 100644 --- a/fhem/FHEM/HMCCUConf.pm +++ b/fhem/FHEM/HMCCUConf.pm @@ -140,7 +140,7 @@ $HMCCU_CONFIG_VERSION = '5.0'; F => 3, S => 'LUX', C => '', V => '', P => 2 }, 'MOTION_DETECTOR' => { - F => 3, S => 'MOTION', C => '', V => '', P => 1 + F => 3, S => 'MOTION', C => '', V => '', P => 2 }, 'MOTIONDETECTOR_TRANSCEIVER' => { F => 3, S => 'MOTION', C => 'MOTION_DETECTION_ACTIVE', V => 'active:1,inactive:0', P => 2 @@ -237,7 +237,7 @@ $HMCCU_CONFIG_VERSION = '5.0'; %HMCCU_READINGS = ( 'ACCELERATION_TRANSCEIVER' => - '^(C#\.)?MOTION:motion', + '^(C#\.)?MOTION:+motion', 'ARMING' => '^(C#\.)?ARMSTATE$:+armState', 'BLIND' => @@ -283,9 +283,9 @@ $HMCCU_CONFIG_VERSION = '5.0'; 'MOTION_DETECTOR' => '^(C#\.)?BRIGHTNESS$:brightness;(C#\.)?MOTION:motion', 'MOTIONDETECTOR_TRANSCEIVER' => - '^(C#\.)?ILLUMINATION$:brightness;^(C#\.)?MOTION$:motion;(C#\.)?MOTION_DETECTION_ACTIVE$:detection', + '^(C#\.)?ILLUMINATION$:+brightness;^(C#\.)?MOTION$:+motion;(C#\.)?MOTION_DETECTION_ACTIVE$:+detection', 'PRESENCEDETECTOR_TRANSCEIVER' => - '^(C#\.)?ILLUMINATION$:brightness;(C#\.)?PRESENCE_DETECTION_STATE:presence;(C#\.)?PRESENCE_DETECTION_ACTIVE:detection', + '^(C#\.)?ILLUMINATION$:+brightness;(C#\.)?PRESENCE_DETECTION_STATE:+presence;(C#\.)?PRESENCE_DETECTION_ACTIVE:+detection', 'SHUTTER_TRANSMITTER' => '^(C#\.)?LEVEL$:+pct,+level', 'SHUTTER_VIRTUAL_RECEIVER' =>