39_alexa.pm: added reload command

git-svn-id: https://svn.fhem.de/fhem/trunk@12630 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme1968
2016-11-22 20:16:05 +00:00
parent dcbe8f8e7c
commit b4e52df3f0

View File

@@ -19,7 +19,7 @@ alexa_Initialize($)
#$hash->{NOTIFYDEV} = "global"; #$hash->{NOTIFYDEV} = "global";
#$hash->{NotifyFn} = "alexa_Notify"; #$hash->{NotifyFn} = "alexa_Notify";
$hash->{UndefFn} = "alexa_Undefine"; $hash->{UndefFn} = "alexa_Undefine";
#$hash->{SetFn} = "alexa_Set"; $hash->{SetFn} = "alexa_Set";
#$hash->{GetFn} = "alexa_Get"; #$hash->{GetFn} = "alexa_Get";
#$hash->{AttrFn} = "alexa_Attr"; #$hash->{AttrFn} = "alexa_Attr";
$hash->{AttrList} = "$readingFnAttributes"; $hash->{AttrList} = "$readingFnAttributes";
@@ -76,7 +76,14 @@ alexa_Set($$@)
{ {
my ($hash, $name, $cmd, @args) = @_; my ($hash, $name, $cmd, @args) = @_;
my $list = ""; my $list = "reload";
if( $cmd eq 'reload' ) {
$hash->{".triggerUsed"} = 1;
FW_directNotify($name, 'reload');
return undef;
}
return "Unknown argument $cmd, choose one of $list"; return "Unknown argument $cmd, choose one of $list";
} }
@@ -156,6 +163,14 @@ alexa_Attr($$$)
</li> </li>
</ul> </ul>
<a name="alexa_Set"></a>
<b>Set</b>
<ul>
<li>reload<br>
Reloads the device list in alexa-fhem. Sequently you have to start a device discovery in alexa.
</li>
</ul>
<a name="alexa_Attr"></a> <a name="alexa_Attr"></a>
<b>Attr</b> <b>Attr</b>
<ul> <ul>