add new Device state Reading

This commit is contained in:
Marko Oldenburg 2017-08-10 21:54:34 +02:00
parent 107940bf1a
commit fe5fec3023
2 changed files with 5 additions and 3 deletions

View File

@ -65,7 +65,7 @@ eval "use IO::Socket::SSL;1" or $missingModul .= "IO::Socket::SSL ";
###todo Hier fehlt noch Modulabfrage für ssl
my $version = "0.0.42";
my $version = "0.0.43";
@ -435,7 +435,7 @@ sub GardenaSmartBridge_ErrorHandling($$$) {
} elsif( $param->{code} == 204 and $dhash ne $hash and defined($dhash->{helper}{deviceAction}) ) {
readingsBulkUpdate( $dhash, "state", "the set command is processed", 1);
readingsBulkUpdate( $dhash, "state", "the command is processed", 1);
GardenaSmartBridge_getDevices($hash);
} elsif( $param->{code} != 200 ) {

View File

@ -62,7 +62,7 @@ eval "use Encode qw(encode encode_utf8 decode_utf8);1" or $missingModul .= "Enco
eval "use JSON;1" or $missingModul .= "JSON ";
my $version = "0.0.42";
my $version = "0.0.43";
@ -263,7 +263,9 @@ sub GardenaSmartDevice_Set($@) {
$abilities = 'mower' if( AttrVal($name,'model','unknown') eq 'mower' );
$abilities = 'outlet' if( AttrVal($name,'model','unknown') eq 'watering_computer' );
$hash->{helper}{deviceAction} = $payload;
readingsSingleUpdate( $dhash, "state", "send command to gardena cloud", 1);
IOWrite($hash,$payload,$hash->{DEVICEID},$abilities);
Log3 $name, 4, "GardenaSmartBridge ($name) - IOWrite: $payload $hash->{DEVICEID} $abilities IODevHash=$hash->{IODev}";