mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 06:48:43 +00:00
32_mailcheck.pm: added set active/inactive commands
git-svn-id: https://svn.fhem.de/fhem/trunk@10850 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
222f260fb0
commit
f95f6b46e6
@ -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: 32_mailcheck: added set active/inactive commands
|
||||
- feature: 02_RSS: new attribute urlOverride
|
||||
- feature: 71_YAMAHA_NP: Added auto reading update for tuner and player
|
||||
- feature 49_SSCAM: The port in DEF-String is optional now,
|
||||
|
@ -34,7 +34,7 @@ mailcheck_Initialize($)
|
||||
$hash->{DefFn} = "mailcheck_Define";
|
||||
$hash->{NotifyFn} = "mailcheck_Notify";
|
||||
$hash->{UndefFn} = "mailcheck_Undefine";
|
||||
#$hash->{SetFn} = "mailcheck_Set";
|
||||
$hash->{SetFn} = "mailcheck_Set";
|
||||
$hash->{GetFn} = "mailcheck_Get";
|
||||
$hash->{AttrFn} = "mailcheck_Attr";
|
||||
$hash->{AttrList} = "debug:1 ".
|
||||
@ -240,7 +240,23 @@ mailcheck_Set($$@)
|
||||
{
|
||||
my ($hash, $name, $cmd) = @_;
|
||||
|
||||
my $list = "";
|
||||
my $list = "active:noArgs inactive:noArgs";
|
||||
|
||||
if( $cmd eq 'active' ) {
|
||||
mailcheck_Disconnect($hash);
|
||||
$hash->{STATE} = "Initialized";
|
||||
mailcheck_Connect($hash);
|
||||
|
||||
return undef;
|
||||
|
||||
} elsif( $cmd eq 'inactive' ) {
|
||||
mailcheck_Disconnect($hash);
|
||||
$hash->{STATE} = 'inactive';
|
||||
|
||||
return undef;
|
||||
|
||||
}
|
||||
|
||||
return "Unknown argument $cmd, choose one of $list";
|
||||
}
|
||||
|
||||
@ -515,6 +531,15 @@ mailcheck_Read($)
|
||||
the mail address of the last sender</li>
|
||||
</ul><br>
|
||||
|
||||
<a name="mailcheck_Set"></a>
|
||||
<b>Set</b>
|
||||
<ul>
|
||||
<li>inactive<br>
|
||||
temporarily deactivates the device</li>
|
||||
<li>active<br>
|
||||
reenables the device</li>
|
||||
</ul><br>
|
||||
|
||||
<a name="mailcheck_Get"></a>
|
||||
<b>Get</b>
|
||||
<ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user