mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
98_Hyperion: add set active/inactive
git-svn-id: https://svn.fhem.de/fhem/trunk@18415 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6d0daedca9
commit
d2ae933a40
@ -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: 98_Hyperion: add set active/inactive
|
||||
- bugfix: 22_HOMEMODE: fix zero devider in HOMEMODE_ContactOpenCheck
|
||||
fix trigger alarm only if alarm triggers have changed
|
||||
- bugfix: 49_SSCam: fix version numbering
|
||||
|
@ -21,17 +21,19 @@ use Blocking;
|
||||
|
||||
my %Hyperion_sets =
|
||||
(
|
||||
"active" => "noArg",
|
||||
"addEffect" => "textField",
|
||||
"clear" => "textField",
|
||||
"clearall" => "noArg",
|
||||
"dim" => "slider,0,1,100",
|
||||
"dimDown" => "textField",
|
||||
"dimUp" => "textField",
|
||||
"clear" => "textField",
|
||||
"clearall" => "noArg",
|
||||
"inactive" => "noArg",
|
||||
"mode" => "clearall,effect,off,rgb",
|
||||
"off" => "noArg",
|
||||
"on" => "noArg",
|
||||
"reopen" => "noArg",
|
||||
"rgb" => "colorpicker,RGB",
|
||||
"reopen" => "noArg",
|
||||
"toggle" => "noArg",
|
||||
"toggleMode" => "noArg",
|
||||
"valueGainDown" => "textField",
|
||||
@ -575,7 +577,7 @@ sub Hyperion_Set($@)
|
||||
{
|
||||
my ($hash,$name,@aa) = @_;
|
||||
my ($cmd,@args) = @aa;
|
||||
return if (IsDisabled($name) && $cmd ne "?");
|
||||
return if (IsDisabled($name) && $cmd !~ /^(active|\?)$/);
|
||||
my $value = (defined($args[0])) ? $args[0] : undef;
|
||||
return "\"set $name\" needs at least one argument and maximum five arguments" if (@aa < 1 || @aa > 5);
|
||||
my $duration = defined $args[1] ? int $args[1] : AttrNum($name,"hyperionDefaultDuration",0);
|
||||
@ -886,6 +888,20 @@ sub Hyperion_Set($@)
|
||||
Hyperion_OpenDev($hash);
|
||||
return;
|
||||
}
|
||||
elsif ($cmd eq "active")
|
||||
{
|
||||
readingsSingleUpdate($hash,"state","active",1);
|
||||
Hyperion_OpenDev($hash);
|
||||
return;
|
||||
}
|
||||
elsif ($cmd eq "inactive")
|
||||
{
|
||||
BlockingKill($hash->{helper}{RUNNING_PID}) if ($hash->{helper}{RUNNING_PID});
|
||||
RemoveInternalTimer($hash);
|
||||
DevIo_Disconnected($hash);
|
||||
readingsSingleUpdate($hash,"state","inactive",1);
|
||||
return;
|
||||
}
|
||||
if (keys %obj)
|
||||
{
|
||||
Log3 $name,5,"$name: $cmd obj json: ".encode_json(\%obj);
|
||||
@ -1001,6 +1017,7 @@ sub Hyperion_Attr(@)
|
||||
BlockingKill($hash->{helper}{RUNNING_PID}) if ($hash->{helper}{RUNNING_PID});
|
||||
RemoveInternalTimer($hash);
|
||||
DevIo_Disconnected($hash);
|
||||
readingsSingleUpdate($hash,"state","disabled",1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1099,6 +1116,10 @@ sub Hyperion_devStateIcon($;$)
|
||||
<a name="Hyperion_set"></a>
|
||||
<p><b>set <required> [optional]</b></p>
|
||||
<ul>
|
||||
<li>
|
||||
<i>active</i><br>
|
||||
activates the device (similar to attr disable but without the need of saving)
|
||||
</li>
|
||||
<li>
|
||||
<i>addEffect <custom_name></i><br>
|
||||
add the current effect with the given name to the custom effects<br>
|
||||
@ -1176,6 +1197,10 @@ sub Hyperion_devStateIcon($;$)
|
||||
adjust gamma of each color separately (comma separated) (R,G,B)<br>
|
||||
values from 0.00 to 5.00 in steps of 0.01
|
||||
</li>
|
||||
<li>
|
||||
<i>inactive</i><br>
|
||||
deactivates the device (similar to attr disable but without the need of saving)
|
||||
</li>
|
||||
<li>
|
||||
<i>luminanceGain <1.00></i><br>
|
||||
adjust luminanceGain<br>
|
||||
@ -1491,9 +1516,13 @@ sub Hyperion_devStateIcon($;$)
|
||||
<a name="Hyperion_set"></a>
|
||||
<p><b>set <benötigt> [optional]</b></p>
|
||||
<ul>
|
||||
<li>
|
||||
<i>active</i><br>
|
||||
Aktiviert das Gerät (ahnlich wie attr disable aber ohne speichern zu müssen)
|
||||
</li>
|
||||
<li>
|
||||
<i>addEffect <eigener_name></i><br>
|
||||
fügt den aktuellen Effekt mit dem übergebenen Namen den eigenen Effekten hinzu<br>
|
||||
Fügt den aktuellen Effekt mit dem übergebenen Namen den eigenen Effekten hinzu<br>
|
||||
kann nachträglich im Attribut hyperionCustomEffects geändert werden<br>
|
||||
Gerät muss dazu im Effekt Modus in einen nicht-eigenen Effekt sein und der übergebene Name muss ein einmaliger Effektname sein
|
||||
</li>
|
||||
@ -1504,7 +1533,7 @@ sub Hyperion_devStateIcon($;$)
|
||||
</li>
|
||||
<li>
|
||||
<i>adjustGreen <0,255,0></i><br>
|
||||
Justiere jede Farbe von Grün separat (Komma separiert) (R,G,B)<br>
|
||||
Justiert jede Farbe von Grün separat (Komma separiert) (R,G,B)<br>
|
||||
Werte von 0 bis 255 in Schritten von 1
|
||||
</li>
|
||||
<li>
|
||||
@ -1519,11 +1548,11 @@ sub Hyperion_devStateIcon($;$)
|
||||
</li>
|
||||
<li>
|
||||
<i>clear <1000></i><br>
|
||||
einen bestimmten Prioritätskanal löschen
|
||||
Einen bestimmten Prioritätskanal löschen
|
||||
</li>
|
||||
<li>
|
||||
<i>clearall</i><br>
|
||||
alle Prioritätskanäle löschen / Umschaltung auf Ambilight
|
||||
Alle Prioritätskanäle löschen / Umschaltung auf Ambilight
|
||||
</li>
|
||||
<li>
|
||||
<i>colorTemperature <255,255,255></i><br>
|
||||
@ -1563,6 +1592,10 @@ sub Hyperion_devStateIcon($;$)
|
||||
Justiert Gamma von jeder Farbe separat (Komma separiert) (R,G,B)<br>
|
||||
Werte von 0.00 bis 5.00 in Schritten von 0.01
|
||||
</li>
|
||||
<li>
|
||||
<i>inactive</i><br>
|
||||
Deaktiviert das Gerät (ahnlich wie attr disable aber ohne speichern zu müssen)
|
||||
</li>
|
||||
<li>
|
||||
<i>luminanceGain <1.00></i><br>
|
||||
Justiert Helligkeit<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user