diff --git a/fhem/CHANGED b/fhem/CHANGED index 49a935f43..9a7f1ca14 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,8 @@ # 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. - SVN + - feature: PRESENCE: "statusRequest" command for lan-bluetooth mode + (collectord >= 1.4, presenced >= 1.1 required) - feature: PRESENCE: new collectord package - feature: devspec: removed range, added :FILTER and more general search - feature: HUEBridge,HUEDevice: support for groups added diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 1011f8859..ba17779a7 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -262,16 +262,26 @@ PRESENCE_Set($@) return "No Argument given" if(!defined($a[1])); - my $usage = (defined($hash->{MODE}) and $hash->{MODE} ne "lan-bluetooth" ? "Unknown argument ".$a[1].", choose one of statusRequest " : undef); + my $usage = "Unknown argument ".$a[1].", choose one of statusRequest"; if($a[1] eq "statusRequest") { if($hash->{MODE} ne "lan-bluetooth") { PRESENCE_StartLocalScan($hash, 1); - return ""; + return undef; } - + else + { + if(exists($hash->{FD})) + { + DevIo_SimpleWrite($hash, "now\n", 0); + } + else + { + return "PRESENCE Definition \"".$hash->{NAME}."\" is not connected to ".$hash->{DeviceName}; + } + } } else { @@ -1063,7 +1073,7 @@ Options: