mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-26 10:34:52 +00:00
FULLY: Adjust brightness
git-svn-id: https://svn.fhem.de/fhem/trunk@15428 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bbcbfbe4cf
commit
263e14f63d
@ -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: New commands for motion detection and brightness
|
||||||
- update: 98_Siro.pm: add Disable attribute
|
- update: 98_Siro.pm: add Disable attribute
|
||||||
- bugfix: 50_TelegramBot: fix minusdesc warning / cleanup
|
- bugfix: 50_TelegramBot: fix minusdesc warning / cleanup
|
||||||
- fix: 71_YAMAHA_AVR: fix navigateListMenu on RX-Vx65/RX-Vx67 series
|
- fix: 71_YAMAHA_AVR: fix navigateListMenu on RX-Vx65/RX-Vx67 series
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# 89_FULLY.pm 0.4
|
# 89_FULLY.pm 0.5
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
@ -32,7 +32,7 @@ sub FULLY_GotDeviceInfo ($);
|
|||||||
sub FULLY_Abort ($);
|
sub FULLY_Abort ($);
|
||||||
sub FULLY_UpdateReadings ($$);
|
sub FULLY_UpdateReadings ($$);
|
||||||
|
|
||||||
my $FULLY_VERSION = "0.4";
|
my $FULLY_VERSION = "0.5";
|
||||||
my $FULLY_TIMEOUT = 4;
|
my $FULLY_TIMEOUT = 4;
|
||||||
my $FULLY_POLL_INTERVAL = 3600;
|
my $FULLY_POLL_INTERVAL = 3600;
|
||||||
|
|
||||||
@ -173,8 +173,8 @@ sub FULLY_Set ($@)
|
|||||||
my ($hash, $a, $h) = @_;
|
my ($hash, $a, $h) = @_;
|
||||||
my $name = shift @$a;
|
my $name = shift @$a;
|
||||||
my $opt = shift @$a;
|
my $opt = shift @$a;
|
||||||
my $options = "clearCache:noArg exit:noArg lock:noArg motionDetection:on,off off:noArg ".
|
my $options = "brightness clearCache:noArg exit:noArg lock:noArg motionDetection:on,off ".
|
||||||
"on:noArg restart:noArg unlock:noArg speak url";
|
"off:noArg on:noArg restart:noArg unlock:noArg speak url";
|
||||||
my $response;
|
my $response;
|
||||||
|
|
||||||
# Fully commands without argument
|
# Fully commands without argument
|
||||||
@ -188,6 +188,13 @@ sub FULLY_Set ($@)
|
|||||||
if (exists ($cmds{$opt})) {
|
if (exists ($cmds{$opt})) {
|
||||||
$response = FULLY_Execute ($hash, $cmds{$opt}, undef);
|
$response = FULLY_Execute ($hash, $cmds{$opt}, undef);
|
||||||
}
|
}
|
||||||
|
elsif ($opt eq 'brightness') {
|
||||||
|
my $value = shift @$a;
|
||||||
|
return "Usage: set $name brightness 0-255" if (!defined ($value));
|
||||||
|
$value = 255 if ($value > 255);
|
||||||
|
$response = FULLY_Execute ($hash, "setStringSetting",
|
||||||
|
{ "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));
|
||||||
@ -348,6 +355,9 @@ sub FULLY_ProcessDeviceInfo ($$)
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif ($rn eq 'screen_brightness') {
|
||||||
|
$rn = "brightness";
|
||||||
|
}
|
||||||
elsif ($rn eq 'screen_status') {
|
elsif ($rn eq 'screen_status') {
|
||||||
$parameters .= "|state=$rv";
|
$parameters .= "|state=$rv";
|
||||||
}
|
}
|
||||||
@ -482,6 +492,9 @@ sub FULLY_UpdateReadings ($$)
|
|||||||
<a name="FULLYset"></a>
|
<a name="FULLYset"></a>
|
||||||
<b>Set</b><br/><br/>
|
<b>Set</b><br/><br/>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><b>set <name> brightness 0-255</b><br/>
|
||||||
|
Adjust screen brightness.
|
||||||
|
</li><br/>
|
||||||
<li><b>set <name> clearCache</b><br/>
|
<li><b>set <name> clearCache</b><br/>
|
||||||
Clear browser cache.
|
Clear browser cache.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user