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,"
+
+ remoteControl up + remoteControl down + remoteControl left + remoteControl right + remoteControl enter ++ + Menu Selection: +
+ remoteControl setup + remoteControl return + remoteControl option + remoteControl display ++ + The button names are the same as on your remote control.
+ # the initial definition. + define AV_receiver YAMAHA_AVR 192.168.0.3 ++ And in your 99_MyUtils.pm the following function: +
+ sub startNetRadio + { + fhem "set AV_Receiver on"; + sleep 5; + fhem "set AV_Receiver input netradio"; + sleep 4; + fhem "set AV_Receiver remoteControl enter"; + sleep 2; + fhem "set AV_Receiver remoteControl enter"; + } ++ The remote control commands must be separated with a sleep, because the receiver is loading meanwhile and don't accept commands.
+ {startNetRadio()} ++ + + @@ -813,7 +909,7 @@ volume_level
+ remoteControl up + remoteControl down + remoteControl left + remoteControl right + remoteControl enter ++ + Menü Auswahl: +
+ remoteControl setup + remoteControl return + remoteControl option + remoteControl display ++ + Die Befehlsnamen entsprechen den Tasten auf der Fernbedienung.
+ # Die Gerätedefinition + define AV_receiver YAMAHA_AVR 192.168.0.3 ++ Und in der 99_MyUtils.pm die folgende Funktion: +
+ sub startNetRadio + { + fhem "set AV_Receiver on"; + sleep 5; + fhem "set AV_Receiver input netradio"; + sleep 4; + fhem "set AV_Receiver remoteControl enter"; + sleep 2; + fhem "set AV_Receiver remoteControl enter"; + } ++ Die Kommandos der Fernbedienung müssen mit einem sleep pausiert werden, da der Receiver in der Zwischenzeit arbeitet und keine Befehle annimmt..
+ {startNetRadio()} +