git-svn-id: https://svn.fhem.de/fhem/trunk@1705 2b470e98-0d58-463d-a4d8-8e2adae1ed80

This commit is contained in:
pahenning
2012-07-08 11:01:04 +00:00
parent 0ba1f71474
commit d252520ecf
6 changed files with 30 additions and 31 deletions

View File

@@ -18,7 +18,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.03 - July, 2012
# Version 2.1 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@@ -751,12 +751,13 @@ sub OWAD_Set($@) {
return "OWAD: Set with wrong IODev type $interface";
}
}
#-- process results
#-- process results - we have to reread the device
$hash->{PRESENT} = 1;
OWAD_GetValues($hash);
OWAD_FormatValues($hash);
Log 4, "OWAD: Set $hash->{NAME} $key $value";
return undef;
}

View File

@@ -18,7 +18,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.03 - July, 2012
# Version 2.1 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@@ -672,6 +672,12 @@ sub OWCOUNT_Set($@) {
return "OWCOUNT: Set with wrong IODev type $interface";
}
}
#-- process results - we have to reread the device
$hash->{PRESENT} = 1;
OWCOUNT_GetValues($hash);
OWCOUNT_FormatValues($hash);
Log 4, "OWCOUNT: Set $hash->{NAME} $key $value";
}
########################################################################################

View File

@@ -12,7 +12,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.03 - July, 2012
# Version 2.1 - July, 2012
#
# Setup bus device in fhem.cfg as
#

View File

@@ -12,7 +12,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.03 - July, 2012
# Version 2.1 - July, 2012
#
# Setup bus device in fhem.cfg as
#

View File

@@ -16,7 +16,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.03 - July, 2012
# Version 2.1 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@@ -564,13 +564,9 @@ sub OWSWITCH_Set($@) {
}else{
return "OWSWITCH: Get with wrong IODev type $interface";
}
#-- process results
OWSWITCH_FormatValues($hash);
return undef;
}
#-- set state
if( $key eq "gpio" ){
}elsif( $key eq "gpio" ){
#-- check value and write to device
return "OWSWITCH: Set with wrong value for gpio port, must be 0 <= gpio <= 3"
if( ! ((int($value) >= 0) && (int($value) <= 3)) );
@@ -582,19 +578,15 @@ sub OWSWITCH_Set($@) {
}else{
return "OWSWITCH: GetValues with wrong IODev type $interface";
}
}
#-- process results
if( defined($ret) ){
return $ret;
} else {
#-- process results - we have to reread the device
$hash->{PRESENT} = 1;
$value=OWSWITCH_FormatValues($hash);
#--logging
Log 5, $value;
OWSWITCH_GetValues($hash);
OWSWITCH_FormatValues($hash);
Log 4, "OWSWITCH: Set $hash->{NAME} $key $value";
$hash->{CHANGED}[0] = $value;
return $value;
}
}
return undef;
}
########################################################################################

View File

@@ -15,7 +15,7 @@
# Prof. Dr. Peter A. Henning, 2012
# Martin Fischer, 2011
#
# Version 2.03 - July, 2012
# Version 2.1 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@@ -530,19 +530,19 @@ sub OWTHERM_Set($@) {
#-- OWX interface
if( $interface eq "OWX" ){
$ret = OWXTHERM_SetValues($hash,@a);
$ret = OWXTHERM_GetValues($hash);
#-- OWFS interface
}elsif( $interface eq "OWFS" ){
$ret = OWFSTHERM_SetValues($hash,@a);
$ret = OWFSTHERM_GetValues($hash);
return $ret
if(defined($ret));
} else {
return "OWTHERM: Set with wrong IODev type $interface";
}
#-- careful: globals may come from a different device
OWTHERM_FormatValues($hash);
#-- process results - we have to reread the device
$hash->{PRESENT} = 1;
OWTHERM_GetValues($hash);
OWTHERM_FormatValues($hash);
Log 4, "OWTHERM: Set $hash->{NAME} $key $value";
return undef;