mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
FULLY: Non blocking commands
git-svn-id: https://svn.fhem.de/fhem/trunk@18215 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a264dc5c39
commit
112baa73a3
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 89_FULLY: Non blocking commands, expert mode
|
||||||
- bugfix: 73_AutoShuttersControl: little fixes in commandref
|
- bugfix: 73_AutoShuttersControl: little fixes in commandref
|
||||||
- feature: 49_SSCam: trigger several number of snapshots with alternative
|
- feature: 49_SSCam: trigger several number of snapshots with alternative
|
||||||
text and send it alltogether by email
|
text and send it alltogether by email
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# 89_FULLY.pm 0.9.002
|
# 89_FULLY.pm 1.0
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# Control Fully browser on Android tablets from FHEM.
|
# Control Fully browser on Android tablets from FHEM.
|
||||||
# Requires Fully Plus license!
|
# Requires Fully App Plus license!
|
||||||
|
#
|
||||||
|
# (c) 2019 by zap (zap01 <at> t-online <dot> de)
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
@ -13,7 +15,6 @@ package main;
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Blocking;
|
|
||||||
use SetExtensions;
|
use SetExtensions;
|
||||||
|
|
||||||
# Declare functions
|
# Declare functions
|
||||||
@ -27,18 +28,18 @@ sub FULLY_Attr ($@);
|
|||||||
sub FULLY_Detail ($@);
|
sub FULLY_Detail ($@);
|
||||||
sub FULLY_UpdateDeviceInfo ($);
|
sub FULLY_UpdateDeviceInfo ($);
|
||||||
sub FULLY_Execute ($$$$);
|
sub FULLY_Execute ($$$$);
|
||||||
|
sub FULLY_ExecuteNB ($$$$);
|
||||||
|
sub FULLY_ExecuteCB ($$$);
|
||||||
sub FULLY_ScreenOff ($);
|
sub FULLY_ScreenOff ($);
|
||||||
sub FULLY_GetDeviceInfo ($);
|
sub FULLY_GetDeviceInfo ($);
|
||||||
sub FULLY_ProcessDeviceInfo ($$);
|
sub FULLY_ProcessDeviceInfo ($$);
|
||||||
sub FULLY_GotDeviceInfo ($);
|
|
||||||
sub FULLY_Abort ($);
|
|
||||||
sub FULLY_UpdateReadings ($$);
|
sub FULLY_UpdateReadings ($$);
|
||||||
sub FULLY_Ping ($$);
|
sub FULLY_Ping ($$);
|
||||||
|
|
||||||
my $FULLY_VERSION = "0.9.002";
|
my $FULLY_VERSION = "1.0";
|
||||||
|
|
||||||
# Timeout for Fully requests
|
# Timeout for Fully requests
|
||||||
my $FULLY_TIMEOUT = 4;
|
my $FULLY_TIMEOUT = 5;
|
||||||
|
|
||||||
# Polling interval
|
# Polling interval
|
||||||
my $FULLY_POLL_INTERVAL = 3600;
|
my $FULLY_POLL_INTERVAL = 3600;
|
||||||
@ -51,6 +52,7 @@ my $FULLY_REQUIRED_VERSION = 1.27;
|
|||||||
my $FULLY_DEFAULT_PROT = 'http';
|
my $FULLY_DEFAULT_PROT = 'http';
|
||||||
my $FULLY_DEFAULT_PORT = '2323';
|
my $FULLY_DEFAULT_PORT = '2323';
|
||||||
|
|
||||||
|
# Code for Fully Javascript injection. Not implemented because of problems with Tablet UI.
|
||||||
my $FULLY_FHEM_COMMAND = qq(
|
my $FULLY_FHEM_COMMAND = qq(
|
||||||
function SendRequest(FHEM_Address, Devicename, Command) {
|
function SendRequest(FHEM_Address, Devicename, Command) {
|
||||||
var Port = "8085"
|
var Port = "8085"
|
||||||
@ -65,9 +67,9 @@ function SendRequest(FHEM_Address, Devicename, Command) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################
|
######################################################################
|
||||||
# Initialize module
|
# Initialize module
|
||||||
##################################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Initialize ($)
|
sub FULLY_Initialize ($)
|
||||||
{
|
{
|
||||||
@ -83,7 +85,7 @@ sub FULLY_Initialize ($)
|
|||||||
$hash->{parseParams} = 1;
|
$hash->{parseParams} = 1;
|
||||||
|
|
||||||
$hash->{AttrList} = "pingBeforeCmd:0,1,2 pollInterval requestTimeout repeatCommand:0,1,2 " .
|
$hash->{AttrList} = "pingBeforeCmd:0,1,2 pollInterval requestTimeout repeatCommand:0,1,2 " .
|
||||||
"disable:0,1 " .
|
"disable:0,1 expert:0,1 waitAfterPing:0,1,2" .
|
||||||
$readingFnAttributes;
|
$readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +101,7 @@ sub FULLY_Define ($$)
|
|||||||
|
|
||||||
return "Usage: define devname [http|https]://IP_or_Hostname password [poll-interval]"
|
return "Usage: define devname [http|https]://IP_or_Hostname password [poll-interval]"
|
||||||
if (@$a < 4);
|
if (@$a < 4);
|
||||||
return "FULLY: polling interval must be in range 10 - 86400"
|
return "FULLY: polling interval must be in range ".$FULLY_POLL_RANGE[0]."-".$FULLY_POLL_RANGE[1]
|
||||||
if (@$a == 5 &&
|
if (@$a == 5 &&
|
||||||
($$a[4] !~ /^[1-9][0-9]+$/ || $$a[4] < $FULLY_POLL_RANGE[0] || $$a[4] > $FULLY_POLL_RANGE[1]));
|
($$a[4] !~ /^[1-9][0-9]+$/ || $$a[4] < $FULLY_POLL_RANGE[0] || $$a[4] > $FULLY_POLL_RANGE[1]));
|
||||||
|
|
||||||
@ -111,6 +113,7 @@ sub FULLY_Define ($$)
|
|||||||
$hash->{prot} = $FULLY_DEFAULT_PROT;
|
$hash->{prot} = $FULLY_DEFAULT_PROT;
|
||||||
$hash->{host} = $$a[2];
|
$hash->{host} = $$a[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{port} = $FULLY_DEFAULT_PORT;
|
$hash->{port} = $FULLY_DEFAULT_PORT;
|
||||||
$hash->{version} = $FULLY_VERSION;
|
$hash->{version} = $FULLY_VERSION;
|
||||||
$hash->{onForTimer} = 'off';
|
$hash->{onForTimer} = 'off';
|
||||||
@ -119,10 +122,7 @@ sub FULLY_Define ($$)
|
|||||||
|
|
||||||
Log3 $name, 1, "FULLY: [$name] Version $FULLY_VERSION Opening device ".$hash->{host};
|
Log3 $name, 1, "FULLY: [$name] Version $FULLY_VERSION Opening device ".$hash->{host};
|
||||||
|
|
||||||
my $result = FULLY_GetDeviceInfo ($name);
|
FULLY_GetDeviceInfo ($name);
|
||||||
if (!FULLY_UpdateReadings ($hash, $result)) {
|
|
||||||
Log3 $name, 2, "FULLY: [$name] Update of device info failed";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (@$a == 5) {
|
if (@$a == 5) {
|
||||||
$attr{$name}{'pollInterval'} = $$a[4];
|
$attr{$name}{'pollInterval'} = $$a[4];
|
||||||
@ -147,7 +147,7 @@ sub FULLY_Attr ($@)
|
|||||||
|
|
||||||
if ($cmd eq 'set') {
|
if ($cmd eq 'set') {
|
||||||
if ($attrname eq 'pollInterval') {
|
if ($attrname eq 'pollInterval') {
|
||||||
if ($attrval >= 10 && $attrval <= 86400) {
|
if ($attrval >= $FULLY_POLL_RANGE[0] && $attrval <= $FULLY_POLL_RANGE[1]) {
|
||||||
my $curval = AttrVal ($name, 'pollInterval', $FULLY_POLL_INTERVAL);
|
my $curval = AttrVal ($name, 'pollInterval', $FULLY_POLL_INTERVAL);
|
||||||
if ($attrval != $curval) {
|
if ($attrval != $curval) {
|
||||||
Log3 $name, 2, "FULLY: [$name] Polling interval set to $attrval";
|
Log3 $name, 2, "FULLY: [$name] Polling interval set to $attrval";
|
||||||
@ -161,7 +161,7 @@ sub FULLY_Attr ($@)
|
|||||||
$hash->{nextUpdate} = 'off';
|
$hash->{nextUpdate} = 'off';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "FULLY: Polling interval must be in range 10-86400";
|
return "FULLY: Polling interval must be in range ".$FULLY_POLL_RANGE[0]."-".$FULLY_POLL_RANGE[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($attrname eq 'requestTimeout') {
|
elsif ($attrname eq 'requestTimeout') {
|
||||||
@ -178,37 +178,35 @@ sub FULLY_Attr ($@)
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Delete device
|
# Delete device
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Undef ($$)
|
sub FULLY_Undef ($$)
|
||||||
{
|
{
|
||||||
my ($hash, $arg) = @_;
|
my ($hash, $arg) = @_;
|
||||||
|
|
||||||
RemoveInternalTimer ($hash);
|
RemoveInternalTimer ($hash);
|
||||||
BlockingKill ($hash->{fully}{bc}) if (defined ($hash->{fully}{bc}));
|
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Shutdown FHEM
|
# Shutdown FHEM
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Shutdown ($)
|
sub FULLY_Shutdown ($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
RemoveInternalTimer ($hash);
|
RemoveInternalTimer ($hash);
|
||||||
BlockingKill ($hash->{fully}{bc}) if (defined ($hash->{fully}{bc}));
|
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Enhance device detail view
|
# Enhance device detail view
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Detail ($@)
|
sub FULLY_Detail ($@)
|
||||||
{
|
{
|
||||||
@ -229,9 +227,9 @@ sub FULLY_Detail ($@)
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Set commands
|
# Set commands
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Set ($@)
|
sub FULLY_Set ($@)
|
||||||
{
|
{
|
||||||
@ -242,7 +240,6 @@ sub FULLY_Set ($@)
|
|||||||
"off:noArg on:noArg on-for-timer playSound restart:noArg screenOffTimer screenSaver:start,stop ".
|
"off:noArg on:noArg on-for-timer playSound restart:noArg screenOffTimer screenSaver:start,stop ".
|
||||||
"screenSaverTimer screenSaverURL speak startURL stopSound:noArg unlock:noArg url ".
|
"screenSaverTimer screenSaverURL speak startURL stopSound:noArg unlock:noArg url ".
|
||||||
"volume";
|
"volume";
|
||||||
my $response;
|
|
||||||
|
|
||||||
# Fully commands without argument
|
# Fully commands without argument
|
||||||
my %cmds = (
|
my %cmds = (
|
||||||
@ -255,92 +252,85 @@ sub FULLY_Set ($@)
|
|||||||
"stopSound" => "stopSound"
|
"stopSound" => "stopSound"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my @c = ();
|
||||||
|
my @p = ();
|
||||||
|
|
||||||
my $disable = AttrVal ($name, 'disable', 0);
|
my $disable = AttrVal ($name, 'disable', 0);
|
||||||
return undef if ($disable);
|
return undef if ($disable);
|
||||||
|
my $expert = AttrVal ($name, 'expert', 0);
|
||||||
|
$options .= " setStringSetting setBooleanSetting" if ($expert);
|
||||||
|
|
||||||
if (exists ($cmds{$opt})) {
|
if (exists ($cmds{$opt})) {
|
||||||
$response = FULLY_Execute ($hash, $cmds{$opt}, undef, 1);
|
push (@c, $cmds{$opt});
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'on-for-timer') {
|
elsif ($opt eq 'on-for-timer') {
|
||||||
my $par = shift @$a;
|
my $par = shift @$a;
|
||||||
$par = "forever" if (!defined ($par));
|
$par = "forever" if (!defined ($par));
|
||||||
|
|
||||||
if ($par eq 'forever') {
|
if ($par eq 'forever') {
|
||||||
$response = FULLY_Execute ($hash, "setBooleanSetting",
|
push (@c, "setBooleanSetting", "screenOn");
|
||||||
{ "key" => "keepScreenOn", "value" => "true" }, 1);
|
push (@p, { "key" => "keepScreenOn", "value" => "true" }, undef);
|
||||||
$response = FULLY_Execute ($hash, "screenOn", undef, 0)
|
RemoveInternalTimer ($hash, "FULLY_ScreenOff");
|
||||||
if (defined ($response) && $response ne '');
|
|
||||||
}
|
}
|
||||||
elsif ($par eq 'off') {
|
elsif ($par eq 'off') {
|
||||||
$response = FULLY_Execute ($hash, "setBooleanSetting",
|
push (@c, "setBooleanSetting", "setStringSetting");
|
||||||
{ "key" => "keepScreenOn", "value" => "false" }, 1);
|
push (@p, { "key" => "keepScreenOn", "value" => "false" },
|
||||||
$response = FULLY_Execute ($hash, "setStringSetting",
|
{ "key" => "timeToScreenOffV2", "value" => "0" });
|
||||||
{ "key" => "timeToScreenOffV2", "value" => "0" }, 0)
|
RemoveInternalTimer ($hash, "FULLY_ScreenOff");
|
||||||
if (defined ($response) && $response ne '');
|
|
||||||
}
|
}
|
||||||
elsif ($par =~ /^[0-9]+$/) {
|
elsif ($par =~ /^[0-9]+$/) {
|
||||||
$response = FULLY_Execute ($hash, "setBooleanSetting",
|
push (@c, "setBooleanSetting", "screenOn");
|
||||||
{ "key" => "keepScreenOn", "value" => "true" }, 1);
|
push (@p, { "key" => "keepScreenOn", "value" => "false" }, undef);
|
||||||
$response = FULLY_Execute ($hash, "screenOn", undef, 0)
|
|
||||||
if (defined ($response) && $response ne '');
|
|
||||||
InternalTimer (gettimeofday()+$par, "FULLY_ScreenOff", $hash, 0);
|
InternalTimer (gettimeofday()+$par, "FULLY_ScreenOff", $hash, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "Usage: set $name on-for-timer [{ Seconds | forever | off }]";
|
return "Usage: set $name on-for-timer [{ Seconds | forever | off }]";
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveInternalTimer ($hash, "FULLY_ScreenOff") if ($par eq 'off' || $par eq 'forever');
|
$hash->{onForTimer} = $par;
|
||||||
$hash->{onForTimer} = $par if (defined ($response) && $response ne '');
|
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'screenOffTimer') {
|
elsif ($opt eq 'screenOffTimer') {
|
||||||
my $value = shift @$a;
|
my $value = shift @$a;
|
||||||
return "Usage: set $name $opt {seconds}" if (!defined ($value));
|
return "Usage: set $name $opt {seconds}" if (!defined ($value));
|
||||||
$response = FULLY_Execute ($hash, "setStringSetting",
|
push (@c, "setStringSetting");
|
||||||
{ "key" => "timeToScreenOffV2", "value" => "$value" }, 1);
|
push (@p, { "key" => "timeToScreenOffV2", "value" => "$value" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'screenSaver') {
|
elsif ($opt eq 'screenSaver') {
|
||||||
my $state = shift @$a;
|
my $state = shift @$a;
|
||||||
return "Usage: set $name $opt { start | stop }" if (!defined ($state));
|
return "Usage: set $name $opt { start | stop }" if (!defined ($state) || $state !~ /^(start|stop)$/);
|
||||||
if ($state eq 'start') {
|
push (@c, ($state eq 'start') ? "startScreensaver" : "stopScreensaver");
|
||||||
$response = FULLY_Execute ($hash, "startScreensaver", undef, 1);
|
|
||||||
}
|
|
||||||
elsif ($state eq 'stop') {
|
|
||||||
$response = FULLY_Execute ($hash, "stopScreensaver", undef, 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return "Usage: set $name $opt { start | stop }";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'screenSaverTimer') {
|
elsif ($opt eq 'screenSaverTimer') {
|
||||||
my $value = shift @$a;
|
my $value = shift @$a;
|
||||||
return "Usage: set $name $opt {seconds}" if (!defined ($value));
|
return "Usage: set $name $opt {seconds}" if (!defined ($value));
|
||||||
$response = FULLY_Execute ($hash, "setStringSetting",
|
push (@c, "setStringSetting");
|
||||||
{ "key" => "timeToScreensaverV2", "value" => "$value" }, 1);
|
push (@p, { "key" => "timeToScreensaverV2", "value" => "$value" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'screenSaverURL') {
|
elsif ($opt eq 'screenSaverURL') {
|
||||||
my $value = shift @$a;
|
my $value = shift @$a;
|
||||||
return "Usage: set $name $opt {URL}" if (!defined ($value));
|
return "Usage: set $name $opt {URL}" if (!defined ($value));
|
||||||
$response = FULLY_Execute ($hash, "setStringSetting",
|
push (@c, "setStringSetting");
|
||||||
{ "key" => "screensaverURL", "value" => "$value" }, 1);
|
push (@p, { "key" => "screensaverURL", "value" => "$value" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'startURL') {
|
elsif ($opt eq 'startURL') {
|
||||||
my $value = shift @$a;
|
my $value = shift @$a;
|
||||||
return "Usage: set $name $opt {URL}" if (!defined ($value));
|
return "Usage: set $name $opt {URL}" if (!defined ($value));
|
||||||
$response = FULLY_Execute ($hash, "setStringSetting",
|
push (@c, "setStringSetting");
|
||||||
{ "key" => "startURL", "value" => "$value" }, 1);
|
push (@p, { "key" => "startURL", "value" => "$value" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'brightness') {
|
elsif ($opt eq 'brightness') {
|
||||||
my $value = shift @$a;
|
my $value = shift @$a;
|
||||||
return "Usage: set $name brightness 0-255" if (!defined ($value));
|
return "Usage: set $name brightness 0-255" if (!defined ($value));
|
||||||
$value = 255 if ($value > 255);
|
$value = 255 if ($value > 255);
|
||||||
$response = FULLY_Execute ($hash, "setStringSetting",
|
push (@c, "setStringSetting");
|
||||||
{ "key" => "screenBrightness", "value" => "$value" }, 1);
|
push (@p, { "key" => "screenBrightness", "value" => "$value" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'motionDetection') {
|
elsif ($opt eq 'motionDetection') {
|
||||||
my $state = shift @$a;
|
my $state = shift @$a;
|
||||||
return "Usage: set $name motionDetection { on | off }" if (!defined ($state));
|
return "Usage: set $name motionDetection { on | off }" if (!defined ($state));
|
||||||
my $value = $state eq 'on' ? 'true' : 'false';
|
my $value = $state eq 'on' ? 'true' : 'false';
|
||||||
$response = FULLY_Execute ($hash, "setBooleanSetting",
|
push (@c, "setBooleanSetting");
|
||||||
{ "key" => "motionDetection", "value" => "$value" }, 1);
|
push (@p, { "key" => "motionDetection", "value" => "$value" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'speak') {
|
elsif ($opt eq 'speak') {
|
||||||
my $text = shift @$a;
|
my $text = shift @$a;
|
||||||
@ -351,45 +341,50 @@ sub FULLY_Set ($@)
|
|||||||
$text =~ s/\[$device:$reading\]/$value/g;
|
$text =~ s/\[$device:$reading\]/$value/g;
|
||||||
}
|
}
|
||||||
my $enctext = urlEncode ($text);
|
my $enctext = urlEncode ($text);
|
||||||
$response = FULLY_Execute ($hash, "textToSpeech", { "text" => "$enctext" }, 1);
|
push (@c, "textToSpeech");
|
||||||
|
push (@p, { "text" => "$enctext" });
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'playSound') {
|
elsif ($opt eq 'playSound') {
|
||||||
my $url = shift @$a;
|
my $url = shift @$a;
|
||||||
my $loop = shift @$a;
|
my $loop = shift @$a;
|
||||||
$loop = defined ($loop) ? 'true' : 'false';
|
$loop = defined ($loop) ? 'true' : 'false';
|
||||||
return "Usage: set $name playSound {url} [loop]" if (!defined ($url));
|
return "Usage: set $name playSound {url} [loop]" if (!defined ($url));
|
||||||
$response = FULLY_Execute ($hash, "playSound",
|
push (@c, "playSound");
|
||||||
{ "url" => "$url", "loop" => "$loop"}, 1);
|
push (@p, { "url" => "$url", "loop" => "$loop"});
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'volume') {
|
elsif ($opt eq 'volume') {
|
||||||
my $level = shift @$a;
|
my $level = shift @$a;
|
||||||
my $stream = shift @$a;
|
my $stream = shift @$a;
|
||||||
return "Usage: set $name volume {level} {stream}"
|
return "Usage: set $name volume {level} {stream}"
|
||||||
if (!defined ($stream) || $level !~ /^[0-9]+$/ || $stream !~ /^[0-9]+$/);
|
if (!defined ($stream) || $level !~ /^[0-9]+$/ || $stream !~ /^[0-9]+$/);
|
||||||
$response = FULLY_Execute ($hash, "setAudioVolume",
|
push (@c, "setAudioVolume");
|
||||||
{ "level" => "$level", "stream" => "$stream"}, 1);
|
push (@p, { "level" => "$level", "stream" => "$stream"});
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'url') {
|
elsif ($opt eq 'url') {
|
||||||
my $url = shift @$a;
|
my $url = shift @$a;
|
||||||
my $cmd = defined ($url) ? "loadURL" : "loadStartURL";
|
push (@c, defined ($url) ? "loadURL" : "loadStartURL");
|
||||||
$response = FULLY_Execute ($hash, $cmd, { "url" => "$url" }, 1);
|
}
|
||||||
|
elsif ($opt eq 'setStringSetting' || $opt eq 'setBooleanSetting') {
|
||||||
|
return "FULLY: Command $opt only available in expert mode" if ($expert == 0);
|
||||||
|
my $key = shift @$a;
|
||||||
|
my $value = shift @$a;
|
||||||
|
return "Usage: set $name $opt {key} {value}" if (!defined ($value));
|
||||||
|
push (@c, $opt);
|
||||||
|
push (@p, { "key" => "$key", "value" => "$value" });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "FULLY: Unknown argument $opt, choose one of ".$options;
|
return "FULLY: Unknown argument $opt, choose one of ".$options;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $result = FULLY_ProcessDeviceInfo ($name, $response);
|
# Execute command requests
|
||||||
if (!FULLY_UpdateReadings ($hash, $result)) {
|
FULLY_ExecuteNB ($hash, \@c, \@p, 1) if (scalar (@c) > 0);
|
||||||
Log3 $name, 2, "FULLY: [$name] Command failed";
|
|
||||||
return "FULLY: Command failed";
|
|
||||||
}
|
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Get commands
|
# Get commands
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Get ($@)
|
sub FULLY_Get ($@)
|
||||||
{
|
{
|
||||||
@ -424,22 +419,18 @@ sub FULLY_Get ($@)
|
|||||||
return "FULLY: Command not implemented";
|
return "FULLY: Command not implemented";
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'update') {
|
elsif ($opt eq 'update') {
|
||||||
my $result = FULLY_GetDeviceInfo ($name);
|
FULLY_GetDeviceInfo ($name);
|
||||||
if (!FULLY_UpdateReadings ($hash, $result)) {
|
|
||||||
Log3 $name, 2, "FULLY: [$name] Command failed";
|
|
||||||
return "FULLY: Command failed";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "FULLY: Unknown argument $opt, choose one of ".$options;
|
return "FULLY: Unknown argument $opt, choose one of ".$options;
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Execute Fully command
|
# Execute Fully command
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Execute ($$$$)
|
sub FULLY_Execute ($$$$)
|
||||||
{
|
{
|
||||||
@ -475,54 +466,181 @@ sub FULLY_Execute ($$$$)
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
|
# Execute Fully commands non blocking
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
sub FULLY_ExecuteNB ($$$$)
|
||||||
|
{
|
||||||
|
my ($hash, $command, $param, $doping) = @_;
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
# Get attributes
|
||||||
|
my $timeout = AttrVal ($name, 'requestTimeout', $FULLY_TIMEOUT);
|
||||||
|
my $repeatCommand = min (AttrVal ($name, 'repeatCommand', 0), 2);
|
||||||
|
my $ping = min (AttrVal ($name, 'pingBeforeCmd', 0), 2);
|
||||||
|
|
||||||
|
my @urllist;
|
||||||
|
my $nc = scalar (@$command);
|
||||||
|
for (my $i=0; $i<$nc; $i++) {
|
||||||
|
my $url = $hash->{prot}.'://'.$hash->{host}.':'.$hash->{port}."/?cmd=".$$command[$i];
|
||||||
|
|
||||||
|
if (defined ($param) && defined ($$param[$i])) {
|
||||||
|
foreach my $parname (keys %{$$param[$i]}) {
|
||||||
|
if (defined ($$param[$i]->{$parname})) {
|
||||||
|
$url .= "&$parname=".$$param[$i]->{$parname};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Log3 $name, 4, "FULLY: [$name] Pushing $url on command stack";
|
||||||
|
push (@urllist, "$url&password=".$hash->{fully}{password});
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ping tablet device
|
||||||
|
FULLY_Ping ($hash, $ping) if ($doping && $ping > 0);
|
||||||
|
|
||||||
|
my $reqpar = {
|
||||||
|
url => $urllist[0],
|
||||||
|
orgurl => $urllist[0],
|
||||||
|
urllist => [@urllist],
|
||||||
|
timeout => $timeout,
|
||||||
|
method => "GET",
|
||||||
|
hash => $hash,
|
||||||
|
cmdno => 1,
|
||||||
|
cmdcnt => $nc,
|
||||||
|
repeat => $repeatCommand,
|
||||||
|
execcnt => 0,
|
||||||
|
callback => \&FULLY_ExecuteCB
|
||||||
|
};
|
||||||
|
|
||||||
|
Log3 $name, 4, "FULLY: [$name] Executing command ".$urllist[0];
|
||||||
|
HttpUtils_NonblockingGet ($reqpar);
|
||||||
|
}
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Callback function for non blocking requests
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
sub FULLY_ExecuteCB ($$$)
|
||||||
|
{
|
||||||
|
my ($param, $err, $data) = @_;
|
||||||
|
my $hash = $param->{hash};
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
if ($err eq '') {
|
||||||
|
if ($param->{cmdno} == $param->{cmdcnt}) {
|
||||||
|
# Last request, update readings
|
||||||
|
Log3 $name, 4, "FULLY: [$name] Last command executed. Processing results";
|
||||||
|
my $result = FULLY_ProcessDeviceInfo ($name, $data);
|
||||||
|
if (!FULLY_UpdateReadings ($hash, $result)) {
|
||||||
|
Log3 $name, 2, "FULLY: [$name] Command failed";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# Execute next request
|
||||||
|
my @urllist = @{$param->{urllist}};
|
||||||
|
my $reqpar = {
|
||||||
|
url => $urllist[$param->{cmdno}],
|
||||||
|
orgurl => $urllist[$param->{cmdno}],
|
||||||
|
urllist => $param->{urllist},
|
||||||
|
timeout => $param->{timeout},
|
||||||
|
method => "GET",
|
||||||
|
hash => $hash,
|
||||||
|
cmdno => $param->{cmdno}+1,
|
||||||
|
cmdcnt => $param->{cmdcnt},
|
||||||
|
repeat => $param->{repeat},
|
||||||
|
execcnt => 0,
|
||||||
|
callback => \&FULLY_ExecuteCB
|
||||||
|
};
|
||||||
|
|
||||||
|
Log3 $name, 4, "FULLY: [$name] Executing command ".$urllist[$param->{cmdno}];
|
||||||
|
HttpUtils_NonblockingGet ($reqpar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# Repeat failed request
|
||||||
|
if ($param->{execcnt} < $param->{repeat}) {
|
||||||
|
my $reqpar = {
|
||||||
|
url => $param->{orgurl},
|
||||||
|
orgurl => $param->{orgurl},
|
||||||
|
urllist => $param->{urllist},
|
||||||
|
timeout => $param->{timeout},
|
||||||
|
method => "GET",
|
||||||
|
hash => $hash,
|
||||||
|
cmdno => $param->{cmdno},
|
||||||
|
cmdcnt => $param->{cmdcnt},
|
||||||
|
repeat => $param->{repeat},
|
||||||
|
execcnt => $param->{execcnt}+1,
|
||||||
|
callback => \&FULLY_ExecuteCB
|
||||||
|
};
|
||||||
|
|
||||||
|
Log3 $name, 4, "FULLY: [$name] Repeating command ".$param->{orgurl};
|
||||||
|
HttpUtils_NonblockingGet ($reqpar);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log3 $name, 2, "FULLY: [$name] Error during request. $err";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
######################################################################
|
||||||
# Timer function: Turn screen off
|
# Timer function: Turn screen off
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_ScreenOff ($)
|
sub FULLY_ScreenOff ($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
my $response = FULLY_Execute ($hash, "setBooleanSetting",
|
my @c = ("setBooleanSetting", "screenOff");
|
||||||
{ "key" => "keepScreenOn", "value" => "false" }, 1);
|
my @p = ({ "key" => "keepScreenOn", "value" => "false" }, undef);
|
||||||
$response = FULLY_Execute ($hash, "screenOff", undef, 1)
|
FULLY_ExecuteNB ($hash, \@c, \@p, 1);
|
||||||
if (defined ($response) && $response ne '');
|
$hash->{onForTimer} = 'off';
|
||||||
$hash->{onForTimer} = 'off' if (defined ($response) && $response ne '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Timer function: Read device info
|
# Timer function: Read device info
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_UpdateDeviceInfo ($)
|
sub FULLY_UpdateDeviceInfo ($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $disable = AttrVal ($name, 'disable', 0);
|
|
||||||
|
|
||||||
if (!exists ($hash->{fully}{bc}) && $disable == 0) {
|
my $disable = AttrVal ($name, 'disable', 0);
|
||||||
$hash->{fully}{bc} = BlockingCall ("FULLY_GetDeviceInfo", $name, "FULLY_GotDeviceInfo",
|
return if ($disable);
|
||||||
120, "FULLY_Abort", $hash);
|
|
||||||
|
my $pollInterval = AttrVal ($name, 'pollInterval', $FULLY_POLL_INTERVAL);
|
||||||
|
|
||||||
|
my @c = ("deviceInfo");
|
||||||
|
|
||||||
|
FULLY_ExecuteNB ($hash, \@c, undef, 1);
|
||||||
|
|
||||||
|
if ($pollInterval > 0) {
|
||||||
|
$hash->{nextUpdate} = strftime "%d.%m.%Y %H:%M:%S", localtime (time+$pollInterval);
|
||||||
|
InternalTimer (gettimeofday()+$pollInterval, "FULLY_UpdateDeviceInfo", $hash, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$hash->{nextUpdate} = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Get tablet device information
|
# Get tablet device information
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_GetDeviceInfo ($)
|
sub FULLY_GetDeviceInfo ($)
|
||||||
{
|
{
|
||||||
my ($name) = @_;
|
my ($name) = @_;
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
my $result = FULLY_Execute ($hash, 'deviceInfo', undef, 1);
|
my @c = ("deviceInfo");
|
||||||
|
FULLY_ExecuteNB ($hash, \@c, undef, 1);
|
||||||
return FULLY_ProcessDeviceInfo ($name, $result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Extract parameters from HTML code
|
# Extract parameters from HTML code
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_ProcessDeviceInfo ($$)
|
sub FULLY_ProcessDeviceInfo ($$)
|
||||||
{
|
{
|
||||||
@ -567,72 +685,9 @@ sub FULLY_ProcessDeviceInfo ($$)
|
|||||||
return $parameters;
|
return $parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Success function for blocking call
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
sub FULLY_GotDeviceInfo ($)
|
|
||||||
{
|
|
||||||
my ($string) = @_;
|
|
||||||
|
|
||||||
my ($name, $result) = split ('\|', $string, 2);
|
|
||||||
my $hash = $defs{$name};
|
|
||||||
|
|
||||||
my $pollInterval = AttrVal ($name, 'pollInterval', $FULLY_POLL_INTERVAL);
|
|
||||||
my $timeout = AttrVal ($name, 'requestTimeout', $FULLY_TIMEOUT);
|
|
||||||
|
|
||||||
delete $hash->{fully}{bc} if (exists ($hash->{fully}{bc}));
|
|
||||||
|
|
||||||
my $rc = FULLY_UpdateReadings ($hash, $string);
|
|
||||||
if (!$rc) {
|
|
||||||
Log3 $name, 2, "FULLY: [$name] Request timed out";
|
|
||||||
if ($hash->{fully}{schedule} == 0) {
|
|
||||||
$hash->{fully}{schedule} += 1;
|
|
||||||
Log3 $name, 2, "FULLY: [$name] Rescheduling in $timeout seconds.";
|
|
||||||
$pollInterval = $timeout;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$hash->{fully}{schedule} = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$hash->{nextUpdate} = strftime "%d.%m.%Y %H:%M:%S", localtime (time+$pollInterval);
|
|
||||||
InternalTimer (gettimeofday()+$pollInterval, "FULLY_UpdateDeviceInfo", $hash, 0)
|
|
||||||
if ($pollInterval > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Abort function for blocking call
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
sub FULLY_Abort ($)
|
|
||||||
{
|
|
||||||
my ($hash) = @_;
|
|
||||||
my $name = $hash->{NAME};
|
|
||||||
|
|
||||||
my $pollInterval = AttrVal ($name, 'pollInterval', $FULLY_POLL_INTERVAL);
|
|
||||||
my $timeout = AttrVal ($name, 'requestTimeout', $FULLY_TIMEOUT);
|
|
||||||
|
|
||||||
delete $hash->{fully}{bc} if (exists ($hash->{fully}{bc}));
|
|
||||||
|
|
||||||
Log3 $name, 2, "FULLY: [$name] request timed out";
|
|
||||||
if ($hash->{fully}{schedule} == 0) {
|
|
||||||
$hash->{fully}{schedule} += 1;
|
|
||||||
Log3 $name, 2, "FULLY: [$name] Rescheduling in $timeout seconds.";
|
|
||||||
$pollInterval = $timeout;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$hash->{fully}{schedule} = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$hash->{nextUpdate} = strftime "%d.%m.%Y %H:%M:%S", localtime (time+$pollInterval);
|
|
||||||
InternalTimer (gettimeofday()+$pollInterval, "FULLY_UpdateDeviceInfo", $hash, 0)
|
|
||||||
if ($pollInterval > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Update readings
|
# Update readings
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_UpdateReadings ($$)
|
sub FULLY_UpdateReadings ($$)
|
||||||
{
|
{
|
||||||
@ -666,11 +721,11 @@ sub FULLY_UpdateReadings ($$)
|
|||||||
return $rc;
|
return $rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
######################################################################
|
||||||
# Send ICMP request to tablet device
|
# Send ICMP request to tablet device
|
||||||
# Adapted from presence module.
|
# Adapted from presence module.
|
||||||
# Thx Markus.
|
# Thx Markus.
|
||||||
#####################################
|
######################################################################
|
||||||
|
|
||||||
sub FULLY_Ping ($$)
|
sub FULLY_Ping ($$)
|
||||||
{
|
{
|
||||||
@ -678,23 +733,26 @@ sub FULLY_Ping ($$)
|
|||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $host = $hash->{host};
|
my $host = $hash->{host};
|
||||||
my $temp;
|
my $temp;
|
||||||
|
|
||||||
|
my $waitAfterPing = min (AttrVal ($name, 'waitAfterPing', 0), 2);
|
||||||
|
|
||||||
if ($^O =~ m/(Win|cygwin)/)
|
my $os = $^O;
|
||||||
{
|
Log3 $name, 4, "FULLY: [$name] Sending $count ping request(s) to tablet $host. OS=$os";
|
||||||
$temp = qx(ping -n $count -4 $host);
|
|
||||||
|
if ($^O =~ m/(Win|cygwin)/) {
|
||||||
|
$temp = qx(ping -n $count -4 $host >nul);
|
||||||
}
|
}
|
||||||
elsif ($^O =~ m/solaris/)
|
elsif ($^O =~ m/solaris/) {
|
||||||
{
|
$temp = qx(ping $host $count 2>&1 >/dev/null);
|
||||||
$temp = qx(ping $host $count 2>&1);
|
|
||||||
}
|
}
|
||||||
else
|
elsif ($^O =~ m/darwin/) {
|
||||||
{
|
$temp = qx(ping -c $count -t 1 $host 2>&1 >/dev/null);
|
||||||
$temp = qx(ping -c $count $host 2>&1);
|
}
|
||||||
|
else {
|
||||||
|
$temp = qx(ping -c $count -W 1 $host 2>&1 >/dev/null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log3 $name, 4, "FULLY: [$name] Ping response = $temp" if (defined ($temp));
|
sleep ($waitAfterPing) if ($waitAfterPing > 0);
|
||||||
|
|
||||||
sleep (1);
|
|
||||||
|
|
||||||
return $temp;
|
return $temp;
|
||||||
}
|
}
|
||||||
@ -710,15 +768,18 @@ sub FULLY_Ping ($$)
|
|||||||
<a name="FULLY"></a>
|
<a name="FULLY"></a>
|
||||||
<h3>FULLY</h3>
|
<h3>FULLY</h3>
|
||||||
<ul>
|
<ul>
|
||||||
Module for controlling of Fully browser on Android tablets.
|
Module for controlling of Fully browser on Android tablets. Requires a Plus license
|
||||||
|
of Fully browser app. Remote device management must be enabled in Fully app. Requires
|
||||||
|
Fully app version 1.27 or later.
|
||||||
</br></br>
|
</br></br>
|
||||||
|
|
||||||
<a name="HMCCUdefine"></a>
|
<a name="HMCCUdefine"></a>
|
||||||
<b>Define</b><br/><br/>
|
<b>Define</b><br/><br/>
|
||||||
<ul>
|
<ul>
|
||||||
<code>define <name> FULLY <HostOrIP> <password> [<poll-interval>]</code>
|
<code>define <name> FULLY [<Protocol>://]<HostOrIP> <password> [<poll-interval>]</code>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
The parameter <i>password</i> is the password set in Fully browser.
|
The parameter <i>password</i> is the password set in Fully browser. Parameter <i>Protocol</i> is
|
||||||
|
optional. Valid protocols are 'http' and 'https'. Default protocol is 'http'.
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@ -768,6 +829,14 @@ sub FULLY_Ping ($$)
|
|||||||
<li><b>set <name> screenSaverURL <URL></b><br/>
|
<li><b>set <name> screenSaverURL <URL></b><br/>
|
||||||
Show this URL when screensaver starts, set daydream: for Android daydream or dim: for black.<br/>
|
Show this URL when screensaver starts, set daydream: for Android daydream or dim: for black.<br/>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
|
<li><b>set <name> setBooleanSetting <Key> <Value></b><br/>
|
||||||
|
Set boolean value in Fully app. Command is ony available if attribute expert is 1.
|
||||||
|
Valid keys can be found in Fully remote admin interface.
|
||||||
|
</li><br/>
|
||||||
|
<li><b>set <name> setStringSetting <Key> <Value></b><br/>
|
||||||
|
Set string value in Fully app. Command is ony available if attribute expert is 1.
|
||||||
|
Valid keys can be found in Fully remote admin interface.
|
||||||
|
</li><br/>
|
||||||
<li><b>set <name> speak <text></b><br/>
|
<li><b>set <name> speak <text></b><br/>
|
||||||
Audio output of <i>text</i>. If <i>text</i> contains blanks it must be enclosed
|
Audio output of <i>text</i>. If <i>text</i> contains blanks it must be enclosed
|
||||||
in double quotes. The text can contain device readings in format [device:reading].
|
in double quotes. The text can contain device readings in format [device:reading].
|
||||||
@ -792,7 +861,7 @@ sub FULLY_Ping ($$)
|
|||||||
<b>Get</b><br/><br/>
|
<b>Get</b><br/><br/>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>get <name> info</b><br/>
|
<li><b>get <name> info</b><br/>
|
||||||
Display Fully information.
|
Display Fully information. This is command blocks FHEM until completion.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>get <name> stats</b><br/>
|
<li><b>get <name> stats</b><br/>
|
||||||
Show Fully statistics.
|
Show Fully statistics.
|
||||||
@ -809,6 +878,9 @@ sub FULLY_Ping ($$)
|
|||||||
<ul>
|
<ul>
|
||||||
<li><b>disable <0 | 1></b><br/>
|
<li><b>disable <0 | 1></b><br/>
|
||||||
Disable device and automatic polling.
|
Disable device and automatic polling.
|
||||||
|
</li><br/>
|
||||||
|
<li><b>expert <0 | 1></b><br/>
|
||||||
|
Activate expert mode.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>pingBeforeCmd <Count></b><br/>
|
<li><b>pingBeforeCmd <Count></b><br/>
|
||||||
Send <i>Count</i> ping request to tablet before executing commands. Valid values
|
Send <i>Count</i> ping request to tablet before executing commands. Valid values
|
||||||
@ -819,13 +891,18 @@ sub FULLY_Ping ($$)
|
|||||||
If <i>seconds</i> is 0 polling is turned off. Valid values are from 10 to
|
If <i>seconds</i> is 0 polling is turned off. Valid values are from 10 to
|
||||||
86400 seconds.
|
86400 seconds.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>requestTimeout <seconds></b><br/>
|
|
||||||
Set timeout for http requests. Default is 4 seconds.
|
|
||||||
</li><br/>
|
|
||||||
<li><b>repeatCommand <Count></b><br/>
|
<li><b>repeatCommand <Count></b><br/>
|
||||||
Repeat fully command on failure. Valid values for <i>Count</i> are 0,1,2. Default
|
Repeat fully command on failure. Valid values for <i>Count</i> are 0,1,2. Default
|
||||||
is 0 (do not repeat commands).
|
is 0 (do not repeat commands).
|
||||||
</li><br/>
|
</li><br/>
|
||||||
|
<li><b>requestTimeout <seconds></b><br/>
|
||||||
|
Set timeout for http requests. Default is 5 seconds.
|
||||||
|
</li><br/>
|
||||||
|
<li><b>waitAfterPing <Seconds></b><br/>
|
||||||
|
Wait specified amount of time after sending ping request to tablet device. Valid
|
||||||
|
values for <i>Seconds</i> are 0,1,2. Default is 0 (do not wait). Only used if
|
||||||
|
attribute pingBeforeCmd is greater than 0.
|
||||||
|
</li><br/>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user