diff --git a/fhem/FHEM/98_Hyperion.pm b/fhem/FHEM/98_Hyperion.pm
index 1c8d9031c..9ee2aedce 100644
--- a/fhem/FHEM/98_Hyperion.pm
+++ b/fhem/FHEM/98_Hyperion.pm
@@ -127,7 +127,8 @@ sub Hyperion_list2array($$)
sub Hyperion_Get($@)
{
my ($hash,$name,$cmd) = @_;
- return "get $name needs one parameter: configFiles:noArg devStateIcon:noArg statusRequest:noArg" if (!defined($cmd));
+ my $params = "configFiles:noArg devStateIcon:noArg statusRequest:noArg";
+ return "get $name needs one parameter: $params" if (!defined($cmd));
if ($cmd eq "configFiles")
{
@@ -143,7 +144,7 @@ sub Hyperion_Get($@)
}
else
{
- return "Unknown argument $cmd for $name, choose one of configFiles:noArg devStateIcon:noArg statusRequest:noArg";
+ return "Unknown argument $cmd for $name, choose one of $params";
}
}
@@ -177,9 +178,10 @@ sub Hyperion_GetHttpResponse($$$)
if (!$conn)
{
+ my $error = "Can't connect to http://$host:$port";
readingsBulkUpdate($hash,"state","ERROR") if (Value($name) ne "ERROR");
- readingsBulkUpdate($hash,"serverResponse","ERROR: Can't connect to http://$host:$port");
- readingsBulkUpdate($hash,"lastError","Can't connect to http://$host:$port") if (ReadingsVal($name,"lastError","") ne "Can't connect to http://$host:$port");
+ readingsBulkUpdate($hash,"serverResponse","ERROR: $error");
+ readingsBulkUpdate($hash,"lastError",$error) if (ReadingsVal($name,"lastError","") ne $error);
undef $conn;
return undef;
}
@@ -832,107 +834,108 @@ sub Hyperion_devStateIcon($;$)
set <required> [optional]
-
- adjustBlue <0,0,255>
+ adjustBlue <0,0,255>
adjust each color of blue separately (comma separated) (R,G,B)
-
- adjustGreen <0,255,0>
+ adjustGreen <0,255,0>
adjust each color of green separately (comma separated) (R,G,B)
-
- adjustRed <255,0,0>
+ adjustRed <255,0,0>
adjust each color of red separately (comma separated) (R,G,B)
-
- blacklevel <0.000,0.000,0.000>
+ blacklevel <0.000,0.000,0.000>
adjust blacklevel of each color separately (comma separated) (R,G,B)
-
- clear <1000>
+ clear <1000>
clear a specific priority channel
-
- clearall
+ clearall
clear all priority channels / switch to Ambilight mode
-
- colorTemperature <255,255,255>
+ colorTemperature <255,255,255>
adjust temperature of each color separately (comma separated) (R,G,B)
-
- configFile <filename.config.json>
- restart the Hyperion server with the given configuration file (files will be listed automatically from the given directory in attribute hyperionConfigDir) (default: /etc/hyperion/)
+ configFile <filename>
+ restart the Hyperion server with the given configuration file (files will be listed automatically from the given directory in attribute hyperionConfigDir)
+ please omit the double extension of the file name (.config.json)
-
- correction<255,255,255>
+ correction <255,255,255>
adjust correction of each color separately (comma separated) (R,G,B)
-
- dim <percent> [duration] [priority]
+ dim <percent> [duration] [priority]
dim the rgb light with optional duration in seconds and priority
-
- dimDown [delta]
- dim down light by steps defined in attribute hyperionDimStep or by given value (rgb light) (default: 10)
+ dimDown [delta]
+ dim down rgb light by steps defined in attribute hyperionDimStep or by given value (default: 10)
-
- dimUp [delta]
- dim up light by steps defined in attribute hyperionDimStep or by given value (rgb light) (default: 10)
+ dimUp [delta]
+ dim up rgb light by steps defined in attribute hyperionDimStep or by given value (default: 10)
-
- effect <effect> [duration] [priority]
+ effect <effect> [duration] [priority]
set effect (replace blanks with underscore) with optional duration in seconds and priority
-
- gamma <1.900,1.900,1.900>
+ gamma <1.900,1.900,1.900>
adjust gamma of each color separately (comma separated) (R,G,B)
-
- lumminanceGain <1.000>
- adjust lumminanceGain (max. value 1.999)
+ luminanceGain <1.000>
+ adjust luminanceGain (max. value 1.999)
-
- lumminanceMinimum <0.000>
- adjust lumminanceMinimum (max. value 1.999)
+ luminanceMinimum <0.000>
+ adjust luminanceMinimum (max. value 1.999)
-
- mode <clearall|effect|off|rgb>
+ mode <clearall|effect|off|rgb>
set the light in the specific mode with its previous value
-
- off
+ off
set the light off while the color is black
-
- on
- set the light on and restores previous state
+ on
+ set the light on and restore previous state
-
- rgb <RRGGBB> [duration] [priority]
+ rgb <RRGGBB> [duration] [priority]
set color in RGB Hex format with optional duration in seconds and priority
-
- saturationGain <1.100>
+ saturationGain <1.100>
adjust saturationGain (max. value 1.999)
-
- saturationLGain <1.000>
+ saturationLGain <1.000>
adjust saturationLGain (max. value 1.999)
-
- threshold <0.160,0.160,0.160>
+ threshold <0.160,0.160,0.160>
adjust threshold of each color separately (comma separated) (R,G,B)
-
- toggle
+ toggle
toggles the light between on and off
-
- valueLGain <1.700>
- adjust valueLGain (max. value 1.999)
+ valueGain <1.700>
+ adjust valueGain (max. value 1.999)
-
- whitelevel <0.700,0.800,0.900>
+ whitelevel <0.700,0.800,0.900>
adjust whitelevel of each color separately (comma separated) (R,G,B)
@@ -941,16 +944,15 @@ sub Hyperion_devStateIcon($;$)
Get
-
- configFiles
- get the available config files in directory from attribute hyperionConfigDir
- (default: /etc/hyperion/)
+ configFiles
+ get the available config files in directory from attribute hyperionConfigDir
-
- devStateIcon
+ devStateIcon
get the current devStateIcon
-
- statusRequest
+ statusRequest
get the currently set effect or color from the Hyperion server,
get the internals of Hyperion including available effects
@@ -960,31 +962,31 @@ sub Hyperion_devStateIcon($;$)
Attributes
-
- hyperionBin
+ hyperionBin
path to the hyperion executable, if not set it's /usr/bin/hyperiond
-
- hyperionConfigDir
+ hyperionConfigDir
path to the hyperion configuration files, if not set it's /etc/hyperion/
-
- hyperionDefaultDuration
+ hyperionDefaultDuration
default duration, if not set it's infinity
-
- hyperionDefaultPriority
+ hyperionDefaultPriority
default priority, if not set it's 0
-
- hyperionDimStep
+ hyperionDimStep
dim step for dimDown/dimUp, if not set it's 5 (percent)
-
- hyperionSshUser
- user to execute SSH commands to remote host
+ hyperionSshUser
+ user for executing SSH commands
-
- queryAfterSet
+ queryAfterSet
If set to 0 the state of the Hyperion server will not be queried after setting, instead the state will be queried on next interval query.
This is only used when polling is enabled, without polling the state will be queried automatically after set.
@@ -994,107 +996,107 @@ sub Hyperion_devStateIcon($;$)
Readings
-
- adjustBlue
+ adjustBlue
each color of blue separately (comma separated) (R,G,B)
-
- adjustGreen
+ adjustGreen
each color of green separately (comma separated) (R,G,B)
-
- adjustRed
+ adjustRed
each color of red separately (comma separated) (R,G,B)
-
- blacklevel
+ blacklevel
blacklevel of each color separately (comma separated) (R,G,B)
-
- colorTemperature
+ colorTemperature
temperature of each color separately (comma separated) (R,G,B)
-
- configFile
- previously set configuration file of the Hyperion server
+ configFile
+ active/previously loaded configuration file, double extension (.config.json) will be omitted
-
- correction
+ correction
correction of each color separately (comma separated) (R,G,B)
-
- dim
+ dim
active/previous dim value (rgb light)
-
- duration
+ duration
active/previous duration in seconds or infinite
-
- effect
+ effect
active/previous effect
-
- gamma
+ gamma
gamma for each color separately (comma separated) (R,G,B)
-
- id
+ id
id of the Hyperion server
-
- lastError
+ lastError
last occured error while communicating with the Hyperion server
-
- luminanceGain
+ luminanceGain
luminanceGain
-
- luminanceMinimum
+ luminanceMinimum
luminanceMinimum
-
- mode
+ mode
current mode
-
- previous_mode
+ previous_mode
previous mode before off
-
- priority
+ priority
active/previous priority
-
- rgb
+ rgb
active/previous rgb
-
- saturationGain
- saturationGain
+ saturationGain
+ active/previous saturationGain
-
- saturationLGain
- saturationLGain
+ saturationLGain
+ active/previous saturationLGain
-
- serverResponse
+ serverResponse
last Hyperion server response (success/ERROR)
-
- state
+ state
current state
-
- threshold
+ threshold
threshold of each color separately (comma separated) (R,G,B)
-
- valueGain
+ valueGain
valueGain - gain of the Ambilight
-
- whitelevel
+ whitelevel
whitelevel of each color separately (comma separated) (R,G,B)