diff --git a/fhem/CHANGED b/fhem/CHANGED
index 3f079e992..7da153223 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: 10_SOMFY.pm: Signalduino modif and doc cleanup - msg1298875
- feature: 74_AutomowerConnect.pm: reduce spikes in border region after a hull
polygon is set to attribut.
- feature: 14_CUL_TCM97001.pm: NX7674, Kuehl- & Gefrierschrank-Thermometer
diff --git a/fhem/FHEM/10_SOMFY.pm b/fhem/FHEM/10_SOMFY.pm
index 786178997..935cec52a 100644
--- a/fhem/FHEM/10_SOMFY.pm
+++ b/fhem/FHEM/10_SOMFY.pm
@@ -258,12 +258,12 @@ sub SOMFY_Initialize($) {
# allow also matches for longer commands of newer devices -->
$hash->{Match} = "^Ys.............."; #msg1224029
- $hash->{SetFn} = "SOMFY_Set";
+ $hash->{SetFn} = \&SOMFY_Set;
#$hash->{StateFn} = "SOMFY_SetState";
- $hash->{DefFn} = "SOMFY_Define";
- $hash->{UndefFn} = "SOMFY_Undef";
- $hash->{ParseFn} = "SOMFY_Parse";
- $hash->{AttrFn} = "SOMFY_Attr";
+ $hash->{DefFn} = \&SOMFY_Define;
+ $hash->{UndefFn} = \&SOMFY_Undef;
+ $hash->{ParseFn} = \&SOMFY_Parse;
+ $hash->{AttrFn} = \&SOMFY_Attr;
$hash->{AttrList} = " drive-down-time-to-100"
. " drive-down-time-to-close"
@@ -556,7 +556,7 @@ sub SOMFY_Parse($$) {
# return "IODev unsupported" if ((my $ioType = $hash->{TYPE}) !~ m/^(CUL|SIGNALduino)$/);
# preprocessing if IODev is SIGNALduino
- if ($ioType eq "SIGNALduino") {
+ if ($ioType =~ m/^SIGNALduino/) {
my $encData = substr($msg, 2);
$ret = "Somfy RTS message format error (length must be 14 or 20)! :".$encData.":" if ( (length($encData) != 14) && (length($encData) != 20));
$ret = "Somfy RTS message format error! :".$encData.":" if ( ( ! $ret ) && ($encData !~ m/^[0-9A-F]+$/) );
@@ -1676,7 +1676,7 @@ sub SOMFY_SendCommand($@)
}
# CUL specifics
- if ($ioType ne "SIGNALduino") {
+ if ($ioType !~ m/SIGNALduino/) {
## Do we need to change RFMode to SlowRF?
if ( defined( $attr{ $name } )
&& defined( $attr{ $name }{"switch_rfmode"} ) )
@@ -1745,7 +1745,7 @@ sub SOMFY_SendCommand($@)
Log3 $hash, 5, "SOMFY_send $name enc key : ". $new_enc_key." rolling code : ".$new_rolling_code;
## Send Message to IODev using IOWrite
- if ($ioType eq "SIGNALduino") {
+ if ($ioType =~ m/SIGNALduino/) {
my $SignalRepeats = AttrVal($name,'repetition', '6');
# swap address, remove leading s
my $decData = substr($message, 1, 8) . substr($message, 13, 2) . substr($message, 11, 2) . substr($message, 9, 2);
@@ -1771,7 +1771,7 @@ sub SOMFY_SendCommand($@)
# SOMFY_updateDef( $hash, $new_enc_key, $new_rolling_code );
# CUL specifics
- if ($ioType ne "SIGNALduino") {
+ if ($ioType !~ m/SIGNALduino/) {
## Do we need to change symbol length back?
if ( defined( $attr{ $name } )
&& defined( $attr{ $name }{"symbol-length"} ) )
@@ -1837,7 +1837,7 @@ sub SOMFY_SendCommand($@)
=item summary_DE für Geräte, die das SOMFY RTS protocol unterstützen - Rolläden
=begin html
-
+
SOMFY - Somfy RTS / Simu Hz protocol
The Somfy RTS (identical to Simu Hz) protocol is used by a wide range of devices,
@@ -1850,7 +1850,7 @@ sub SOMFY_SendCommand($@)
-
+
Define
define <name> SOMFY <address> [<encryption-key>] [<rolling-code>]
@@ -1894,7 +1894,7 @@ sub SOMFY_SendCommand($@)
-
+
Set
set <name> <value> [<time>]
@@ -1963,44 +1963,45 @@ sub SOMFY_SendCommand($@)
Get
-
+
Attributes
+
- IODev
Set the IO or physical device which should be used for sending signals
for this "logical" device. An example for the physical device is a CUL.
Note: The IODev has to be set, otherwise no commands will be sent!
If you have both a CUL868 and CUL433, use the CUL433 as IODev for increased range.
-
+
- positionInverse
Inverse operation for positions instead of 0 to 100-200 the positions are ranging from 100 to 10 (down) and then to 0 (closed). The pos set command will point in this case to the reversed pos values. This does NOT reverse the operation of the on/off command, meaning that on always will move the shade down and off will move it up towards the initial position.
-
+
- additionalPosReading
Position of the shutter will be stored in the reading pos
as numeric value.
Additionally this attribute might specify a name for an additional reading to be updated with the same value than the pos.
-
+
- finalPosReading
This attribute can specify the name of an additional posReading that is only set at the end of a move. Meaning intermediate values are not set.
The name can not be any of the standard readings
-
+
- fixed_enckey 1|0
If set to 1 the enc-key is not changed after a command sent to the device. Default is value 0 meaning enc-key is changed normally for the RTS protocol.
-
+
- autoStoreRollingCode 1|0
If set to 1 the rolling code is stored automatically in the FHEM uniqueID file (Default is 0 - off). After setting the attribute, the code is first saved after the next change of the rolling code.
-
+
- rawDevice [
]
If set this SOMFY device is representing a manual remote, that is used to control a somfy blind. The address of the blind (the physical blind) is specified in the rawdevice attribute to sync position changes in the blind when the remote is used. This requires an iodevice able to receive somfy commands (e.g. signalduino). Multiple physical blinds can be specified separated by space in the attribute.
-
+
- eventMap
Replace event names and set arguments. The value of this attribute
consists of a list of space separated values, each value is a colon
@@ -2013,13 +2014,13 @@ sub SOMFY_SendCommand($@)
set store open
-
+
- do_not_notify
-
+
- loglevel
-
+
- showtime
-
+
- model
The model attribute denotes the model type of the device.
The attributes will (currently) not be used by the fhem.pl directly.
@@ -2035,7 +2036,7 @@ sub SOMFY_SendCommand($@)
Receiver/Actor: somfyblinds
-
+
- ignore
Ignore this device, e.g. if it belongs to your neighbour. The device
won't trigger any FileLogs/notifys, issued commands will silently
@@ -2046,24 +2047,24 @@ sub SOMFY_SendCommand($@)
(see devspec). You still get them with the
"ignored=1" special devspec.
-
+
- drive-down-time-to-100
The time the blind needs to drive down from "open" (pos 0) to pos 100.
In this position, the lower edge touches the window frame, but it is not completely shut.
For a mid-size window this time is about 12 to 15 seconds.
-
+
- drive-down-time-to-close
The time the blind needs to drive down from "open" (pos 0) to "close", the end position of the blind.
Note: If set, this value always needs to be higher than drive-down-time-to-100
This is about 3 to 5 seonds more than the "drive-down-time-to-100" value.
-
+
- drive-up-time-to-100
The time the blind needs to drive up from "close" (endposition) to "pos 100".
This usually takes about 3 to 5 seconds.
-
+
- drive-up-time-to-open
The time the blind needs drive up from "close" (endposition) to "open" (upper endposition).
Note: If set, this value always needs to be higher than drive-down-time-to-100