From f12d60e996e7ab21543c40c1be2dd13529f748eb Mon Sep 17 00:00:00 2001
From: martinp876 <>
Date: Sun, 17 Sep 2017 18:00:26 +0000
Subject: [PATCH] 10_CUL_HM:update pctSlat
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@15085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
FHEM/10_CUL_HM.pm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/FHEM/10_CUL_HM.pm b/FHEM/10_CUL_HM.pm
index 009700509..96624079d 100755
--- a/FHEM/10_CUL_HM.pm
+++ b/FHEM/10_CUL_HM.pm
@@ -4049,6 +4049,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
@arr1 = ("--") if (!scalar @arr1);
my $usg = "Unknown argument $cmd, choose one of ".join(" ",sort @arr1);
$usg =~ s/ pct/ pct:slider,0,1,100/;
+ $usg =~ s/ pctSlat/ pctSlat:slider,0,1,100/;
$usg =~ s/ virtual/ virtual:slider,1,1,50/;
$usg =~ s/ color/ color:colorpicker,HUE,0,0.5,100/;
if ($usg =~ m/ tempTmplSet/){
@@ -4719,9 +4720,14 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
if ($slat eq "old") {$slat = "C9"}
elsif ($slat eq "noChng"){$slat = "CA"}
else{ $slat =~ s/(\d*\.?\d*).*/$1/;
+ return "Value $a[2] not allowed for slat" if ($slat > 100);
$slat = sprintf("%02X",$slat*2);
}
-
+ return "Value $a[2] not allowed for slat" if (hex($slat) > 202);
+ {return hex{"0xCA"}}
+ {return "test:".(hex{"ca"}+2)}
+ {return "CA"}
+ {return hex{"200"}}
CUL_HM_PushCmdStack($hash,"++$flag"."11$id$dst"."80${chn}CA$slat");
$state = "";
CUL_HM_UpdtReadSingle($hash,"levelSlat",$state,1);
@@ -8849,6 +8855,7 @@ sub CUL_HM_assignIO($){ #check and assign IO
,(grep {!defined $hash->{helper}{mRssi}{io}{$_}} @ioccu));
unshift @ios,@{$hash->{helper}{io}{prefIO}} if ($hash->{helper}{io}{prefIO});# set prefIO to first choice
foreach my $iom (@ios){
+ last if ($iom eq "none"); # if "none" is detected stop vccu auto assignment and try normal
if ( !$defs{$iom}
|| ReadingsVal($iom,"state","") eq "disconnected"
|| InternalVal($iom,"XmitOpen",1) == 0){# HMLAN/HMUSB/TSCUL?
@@ -10530,11 +10537,13 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
check which IO is operational and has the best RSSI performance for this device.
Optional a prefered IO - perfIO can be given. In case this IO is operational it will be selected regardless
of rssi values.
+ If none is detected in the prefIO list the mechanism is stopped and the IO as of IOdev is assigned
Example:
attr myDevice1 IOgrp vccu
attr myDevice2 IOgrp vccu:prefIO
attr myDevice2 IOgrp vccu:prefIO1,prefIO2,prefIO3
+ attr myDevice2 IOgrp vccu:prefIO1,prefIO2,none
attr myDevice1 IOgrp vccu
attr myDevice2 IOgrp vccu:prefIO1,prefIO2,prefIO3
+ attr myDevice2 IOgrp vccu:prefIO1,prefIO2,none