From b0a3b40e38513eb089bda8bf5fafe15c6cb8227d Mon Sep 17 00:00:00 2001
From: klaus-schauer <>
Date: Mon, 7 Dec 2015 05:02:02 +0000
Subject: [PATCH] 10_EnOcean.pm: dimming and shutter profiles changed
git-svn-id: https://svn.fhem.de/fhem/trunk@10119 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/10_EnOcean.pm | 44 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/fhem/FHEM/10_EnOcean.pm b/fhem/FHEM/10_EnOcean.pm
index 0045b171a..7f26442d2 100755
--- a/fhem/FHEM/10_EnOcean.pm
+++ b/fhem/FHEM/10_EnOcean.pm
@@ -2368,6 +2368,13 @@ sub EnOcean_Set($@)
my $rampTime = AttrVal($name, "rampTime", 1);
my $sendDimCmd = 0;
$setCmd = 9;
+
+ if ($cmd =~ m/^\d+$/) {
+ # interpretive numeric value as dimming
+ unshift(@a, 'dim');
+ $cmd = 'dim';
+ }
+
if ($cmd eq "teach") {
# teach-in EEP A5-38-08, Manufacturer "Multi user Manufacturer ID"
#$data = "E047FF80";
@@ -2670,6 +2677,11 @@ sub EnOcean_Set($@)
my $blindFuncID;
if (defined $blindFunc {$cmd}) {
$blindFuncID = $blindFunc {$cmd};
+ } elsif ($cmd =~ m/^\d+$/) {
+ # interpretive numeric value as position
+ unshift(@a, 'position');
+ $cmd = 'position';
+ $blindFuncID = 4;
} else {
return "Unknown Gateway Blind Central Function " . $cmd . ", choose one of ". join(" ", @blindFunc);
}
@@ -2963,6 +2975,11 @@ sub EnOcean_Set($@)
my $ctrlFuncID;
if (exists $ctrlFunc{$cmd}) {
$ctrlFuncID = $ctrlFunc{$cmd};
+ } elsif ($cmd =~ m/^\d+$/) {
+ # interpretive numeric value as dimming
+ unshift(@a, 'dim');
+ $cmd = 'dim';
+ $ctrlFuncID = 6;
} else {
$cmdList .= "dim:slider,0,5,255 dimup:noArg dimdown:noArg on:noArg off:noArg stop:noArg rgb:colorpicker,RGB scene dimMinMax lampOpHours block meteringValue teach:noArg";
return SetExtensions ($hash, $cmdList, $name, @a);
@@ -3231,6 +3248,11 @@ sub EnOcean_Set($@)
$shutTime = 255 if ($shutTime !~ m/^[+-]?\d+$/);
$shutTime = 255 if ($shutTime > 255);
$shutTime = 1 if ($shutTime < 1);
+ if ($cmd =~ m/^\d+$/) {
+ # interpretive numeric value as position
+ unshift(@a, 'position');
+ $cmd = 'position';
+ }
if ($cmd eq "teach") {
# teach-in EEP A5-3F-7F, Manufacturer "Eltako"
$data = "FFF80D80";
@@ -3452,6 +3474,12 @@ sub EnOcean_Set($@)
my $dimValTimer = 0;
my $outputVal;
+ if ($cmd =~ m/^\d+$/) {
+ # interpretive numeric value as position
+ unshift(@a, 'dim');
+ $cmd = 'dim';
+ }
+
if ($cmd eq "on") {
shift(@a);
$cmdID = 1;
@@ -3932,6 +3960,12 @@ sub EnOcean_Set($@)
}
my $lock = 0;
+ if ($cmd =~ m/^\d+$/) {
+ # interpretive numeric value as position
+ unshift(@a, 'position');
+ $cmd = 'position';
+ }
+
if ($cmd eq "position") {
$cmdID = 1;
shift(@a);
@@ -13071,6 +13105,8 @@ EnOcean_Delete($$)
set <name> <value>
where value
is
+
set <name> <value>
value
is
+ set <name> <value>
value
is
- set <name> <value>
value
is
+