2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

70_VIERA.pm:

Add parameter "HDMI1" - "HDMI4" for command remoteControl to select HDMI input directly
Add command "input" to select a HDMI port, TV or SD-Card as source

git-svn-id: https://svn.fhem.de/fhem/trunk@6347 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
teevau 2014-08-02 16:25:27 +00:00
parent 55b9261809
commit d11e9dbea4
2 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# 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: 70_VIERA: Add parameter "HDMI1" - "HDMI4" for command remoteControl
to select HDMI input directly.
Add command "input" to select a HDMI port, TV or SD-Card
as source
- bugfix: LevelSender: Version 1.0.5: Could not get compiled by the Arduino IDE
- feature: PRESENCE: new event "error" and "timeout" for state reading to indicate
a non successful check

View File

@ -8,9 +8,13 @@
# written 2013 by Tobias Vaupel <fhem at 622 mbit dot de>
#
#
# Version = 1.22
# Version = 1.23
#
# Version History:
# - 1.23 - 2014-08-01
# -- Add parameter "HDMI1" - "HDMI4" for command remoteControl to select HDMI input directly
# -- Add command "input" to select a HDMI port, TV or SD-Card as source
#
# - 1.22 - 2013-12-28
# -- fixed set command remoteControl
#
@ -103,6 +107,10 @@ my %VIERA_remoteControl_args = (
"NRC_D0-ONOFF" => "Digit 0",
"NRC_P_NR-ONOFF" => "P-NR (Noise reduction)",
"NRC_R_TUNE-ONOFF" => "Seems to do the same as INFO",
"NRC_HDMI1" => "Switch to HDMI input 1",
"NRC_HDMI2" => "Switch to HDMI input 2",
"NRC_HDMI3" => "Switch to HDMI input 3",
"NRC_HDMI4" => "Switch to HDMI input 4",
);
@ -155,7 +163,7 @@ sub VIERA_Set($@){
my $usage = "choose one of off:noArg mute:on,off " .
"remoteControl:" . join(",", sort keys %VIERA_remoteControl_args) . " " .
"volume:slider,0,1,100 volumeUp:noArg volumeDown:noArg ".
"channel channelUp:noArg channelDown:noArg";
"channel channelUp:noArg channelDown:noArg input:hdmi1,hdmi2,hdmi3,hdmi4,sdCard,tv";
$usage =~ s/(NRC_|-ONOFF)//g;
my $what = lc($a[1]);
@ -249,6 +257,15 @@ sub VIERA_Set($@){
break;
}
when("input"){
$state = uc($state);
return "VIERA: Input $state isn't available." if($state ne "HDMI1" && $state ne "HDMI2" && $state ne "HDMI3" && $state ne "HDMI4" && $state ne "SDCARD" && $state ne "TV");
$state = "SD_CARD" if ($state eq "SDCARD");
Log3 $name, 3, "VIERA: Set input $state";
VIERA_connection(VIERA_BuildXML_NetCtrl($hash,$state), $host);
break;
}
when("?"){
return "$usage";
break;