From a950189313e0d0f7e0cfd937f6f26b46df2e4790 Mon Sep 17 00:00:00 2001 From: zap Date: Sun, 20 Oct 2019 09:37:18 +0000 Subject: [PATCH] FULLY: New command set foreground git-svn-id: https://svn.fhem.de/fhem/trunk@20386 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/89_FULLY.pm | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 2219bc061..fdbc7837c 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. + - feature: 89_FULLY: New command set foreground - feature: 73_DoorBird: Videos on Events - change: 70_SolarEdgeAPI: new attributes to control interval, debug features - change: 93_DbRep: change SQL of delDoublets due to incompatible change of diff --git a/fhem/FHEM/89_FULLY.pm b/fhem/FHEM/89_FULLY.pm index c95d7be15..3d195fbd8 100755 --- a/fhem/FHEM/89_FULLY.pm +++ b/fhem/FHEM/89_FULLY.pm @@ -1,6 +1,6 @@ ############################################################################## # -# 89_FULLY.pm 1.35 +# 89_FULLY.pm 1.40 # # $Id$ # @@ -37,7 +37,7 @@ sub FULLY_ProcessDeviceInfo ($$); sub FULLY_UpdateReadings ($$); sub FULLY_Ping ($$); -my $FULLY_VERSION = "1.35"; +my $FULLY_VERSION = "1.40"; # Timeout for Fully requests my $FULLY_TIMEOUT = 5; @@ -237,10 +237,10 @@ sub FULLY_Set ($@) my ($hash, $a, $h) = @_; my $name = shift @$a; my $opt = shift @$a; - my $options = "brightness photo:noArg clearCache:noArg exit:noArg lock:noArg motionDetection:on,off ". - "off:noArg on:noArg on-for-timer playSound restart:noArg screenOffTimer screenSaver:start,stop ". - "screenSaverTimer screenSaverURL speak startURL stopSound:noArg unlock:noArg url ". - "volume"; + my $options = "brightness photo:noArg clearCache:noArg exit:noArg foreground:noArg lock:noArg ". + "motionDetection:on,off off:noArg on:noArg on-for-timer playSound restart:noArg screenOffTimer ". + "screenSaver:start,stop screenSaverTimer screenSaverURL speak startURL stopSound:noArg ". + "unlock:noArg url volume"; # Fully commands without argument my %cmds = ( @@ -250,7 +250,8 @@ sub FULLY_Set ($@) "restart" => "restartApp", "on" => "screenOn", "off" => "screenOff", "lock" => "enabledLockedMode", "unlock" => "disableLockedMode", - "stopSound" => "stopSound" + "stopSound" => "stopSound", + "foreground" => "toForeground" ); my @c = (); @@ -416,7 +417,6 @@ sub FULLY_Get ($@) } $response = ''; -# while ($result =~ /table-cell.>([^<]+)<\/td>([^<]+)([^<]+)<\/td>(.*?)<\/td>/g) { my ($in, $iv) = ($1, $2); if ($iv =~ /^(.*?)<\/a>/) { @@ -597,6 +597,7 @@ sub FULLY_ExecuteCB ($$$) HttpUtils_NonblockingGet ($reqpar); } else { + readingsSingleUpdate ($hash, "execState", "error", 1); Log3 $name, 2, "FULLY: [$name] Error during request. $err"; } } @@ -747,6 +748,7 @@ sub FULLY_UpdateReadings ($$) my ($rn, $rv) = split ('=', $parval); readingsBulkUpdate ($hash, $rn, $rv); } + readingsBulkUpdate ($hash, "execState", "success"); readingsEndUpdate ($hash, 1); return $rc; @@ -826,6 +828,9 @@ sub FULLY_Ping ($$)
  • set <name> exit
    Terminate Fully.

  • +
  • set <name> foreground
    + Bring fully app to foreground. +

  • set <name> motionDetection { on | off }
    Turn motion detection by camera on or off.