From 7bfaa0bdeb8fe6813722a58a4a00b00a4848ced6 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Tue, 15 Jan 2013 21:27:55 +0000 Subject: [PATCH] adding remoteControl commands + documentation, fixing not working input selection git-svn-id: https://svn.fhem.de/fhem/trunk@2520 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/71_YAMAHA_AVR.pm | 153 ++++++++++++++++++++++++++++++++++++- 1 file changed, 150 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/71_YAMAHA_AVR.pm b/fhem/FHEM/71_YAMAHA_AVR.pm index 3a91a671e..4984551bb 100755 --- a/fhem/FHEM/71_YAMAHA_AVR.pm +++ b/fhem/FHEM/71_YAMAHA_AVR.pm @@ -205,7 +205,7 @@ YAMAHA_AVR_Set($@) return "No Argument given" if(!defined($a[1])); my $what = $a[1]; - my $usage = "Unknown argument $what, choose one of on off volume:slider,-80,1,16 input:".$inputs_comma." mute:on,off statusRequest"; + my $usage = "Unknown argument $what, choose one of on off volume:slider,-80,1,16 input:".$inputs_comma." mute:on,off remoteControl:setup,up,down,left,right,return,option,display,enter statusRequest"; readingsBeginUpdate($hash); @@ -251,7 +251,7 @@ YAMAHA_AVR_Set($@) $command = YAMAHA_AVR_getCommandParam($hash, $a[2]); if(defined($command) and length($command) > 0) { - $result = YAMAHA_AVR_SendCommand($hash, $address,"<$zone>".$command.""); + $result = YAMAHA_AVR_SendCommand($hash, "<$zone>".$command.""); } else { @@ -371,6 +371,49 @@ YAMAHA_AVR_Set($@) } } } + elsif($what eq "remoteControl") + { + if($a[2] eq "up") + { + YAMAHA_AVR_SendCommand($hash, "<$zone>Up"); + } + elsif($a[2] eq "down") + { + YAMAHA_AVR_SendCommand($hash, "<$zone>Down"); + } + elsif($a[2] eq "left") + { + YAMAHA_AVR_SendCommand($hash, "<$zone>Left"); + } + elsif($a[2] eq "right") + { + YAMAHA_AVR_SendCommand($hash, "<$zone>Right"); + } + elsif($a[2] eq "display") + { + YAMAHA_AVR_SendCommand($hash,"<$zone>Display"); + } + elsif($a[2] eq "return") + { + YAMAHA_AVR_SendCommand($hash,"<$zone>Return"); + } + elsif($a[2] eq "enter") + { + YAMAHA_AVR_SendCommand($hash,"<$zone>Sel"); + } + elsif($a[2] eq "setup") + { + YAMAHA_AVR_SendCommand($hash,"<$zone>On Screen<$zone>Option"); + } + else + { + return $usage; + } + } elsif($what eq "statusRequest") { # Will be executed on the end of this function anyway, so no need to call it specificly @@ -794,6 +837,59 @@ input server volume -80..16 (volume between -80 and +16 dB) mute on mute off + +Remote control (not in all zones available, depending on your model)

+ @@ -813,7 +909,7 @@ volume_level
  • loglevel
  • do_not_notify
  • -
  • readingFnAttributes
  • +
  • readingFnAttributes

  • volume-smooth-change
  • Optional attribute to activate a smooth volume change.

    @@ -927,6 +1023,57 @@ input server volume -80..16 (Lautstärke zwischen -80 und +16 dB) mute on mute off + + +Fernbedienung (je nach Modell nicht in allen Zonen verfügbar)

    +