2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-06 06:08:44 +00:00

Updated 10_SOMFY: removed "setlist" command and updated loglevels

git-svn-id: https://svn.fhem.de/fhem/trunk@11028 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
thomyd 2016-03-08 09:11:38 +00:00
parent 677c395182
commit 7ac4b269d6
2 changed files with 13 additions and 20 deletions

View File

@ -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.
- bugfix: 10_SOMFY: removed "setlist" (obsolete) and updated loglevels
- bugfix 49_SSCAM: "uninitialized value $lastrecstarttime",
"uninitialized value $lastrecstoptime"
- feature 49_SSCAM: new attribute "videofolderMap", see commandref

View File

@ -1,5 +1,5 @@
######################################################
# $Id$
# $Id: 10_SOMFY.pm 7988 2015-02-14 22:04:45Z thomyd $
#
# SOMFY RTS / Simu Hz protocol module for FHEM
# (c) Thomas Dankert <post@thomyd.de>
@ -42,6 +42,7 @@
# 2015-07-06 viegener - send stop command only when real movement needs to be stopped (to avoid conflict with my-pos for stopped shutters)
# 2015-07-09 viegener - FIX: typo in set go-my (was incorrectly spelled: go_my)
# 2015-07-09 viegener - FIX: log and set command helper corrections
# 2015-08-05 viegener - Remove setList (obsolete) and could be rather surprising for the module
#
#
######################################################
@ -115,6 +116,7 @@ my $somfy_maxRuntime = 50;
my %positions = (
"moving" => "50",
"go-my" => "50",
"open" => "0",
"off" => "0",
"down" => "150",
@ -183,7 +185,6 @@ sub SOMFY_Initialize($) {
. " drive-up-time-to-open "
. " additionalPosReading "
. " IODev"
. " setList"
. " symbol-length"
. " enc-key"
. " rolling-code"
@ -346,7 +347,7 @@ sub SOMFY_SendCommand($@)
## Do we need to change frame repetition?
if ( defined( $attr{ $name } )
if ( defined( $attr{ $name } )
&& defined( $attr{ $name }{"repetition"} ) )
{
$message = "r" . $attr{ $name }{"repetition"};
@ -525,7 +526,7 @@ sub SOMFY_Parse($$) {
return @list;
} else {
Log3 $hash, 3, "SOMFY Unknown device $address, please define it";
Log3 $hash, 1, "SOMFY Unknown device $address, please define it";
return "UNDEFINED SOMFY_$address SOMFY $address";
}
}
@ -634,14 +635,9 @@ sub SOMFY_InternalSet($@) {
if(!exists($sets{$cmd})) {
my @cList;
# overwrite %sets with setList
my $atts = AttrVal($name,'setList',"");
my %setlist = split("[: ][ ]*", $atts);
foreach my $k (sort keys %sets) {
my $opts = undef;
$opts = $sets{$k};
$opts = $setlist{$k} if(exists($setlist{$k}));
if (defined($opts)) {
push(@cList,$k . ':' . $opts);
@ -754,9 +750,13 @@ sub SOMFY_InternalSet($@) {
$updateState = 'moving';
}
} elsif($cmd =~m/stop|go-my/) {
} elsif($cmd =~m/go-my/) {
$move = 'stop';
$newState = $state
$newState = 'go-my';
} elsif($cmd =~m/stop/) {
$move = 'stop';
$newState = $state;
} else {
$newState = $state;
@ -879,7 +879,7 @@ sub SOMFY_InternalSet($@) {
}
### update hash / readings
Log3($name,3,"SOMFY_set: handled command $cmd --> move :$move: newState :$newState: ");
Log3($name,4,"SOMFY_set: handled command $cmd --> move :$move: newState :$newState: ");
if ( defined($updateState)) {
Log3($name,5,"SOMFY_set: handled for drive/udpate: updateState :$updateState: drivet :$drivetime: updatet :$updatetime: ");
} else {
@ -1328,14 +1328,6 @@ sub SOMFY_CalcCurrentPos($$$$) {
If you have both a CUL868 and CUL433, use the CUL433 as IODev for increased range.
</li><br>
<a name="setList"></a>
<li>setList<br>
Space separated list of commands, which will be returned upon "set name ?",
so the FHEMWEB frontend can construct the correct control and command dropdown. Specific controls can be added after a colon for each command
<br>
Example: <code>attr shutter setList open close pos:textField</code>
</li><br>
<a name="additionalPosReading"></a>
<li>additionalPosReading<br>
Position of the shutter will be stored in the reading <code>pos</code> as numeric value.