mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
YAMAHA_AVR: new set commands / readings for controlling HDMI outputs (Forum: #41924) / fixing currentTitle reading for newer model series
git-svn-id: https://svn.fhem.de/fhem/trunk@14547 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
79f3cd1ceb
commit
ae606b2e52
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: YAMAHA_AVR: new set commands / readings to control HDMI outputs
|
||||||
|
(only for models with two HDMI outputs)
|
||||||
- featere: exclude_from_update can check the source too (Forum #73275)
|
- featere: exclude_from_update can check the source too (Forum #73275)
|
||||||
- change: 93_DbRep: V5.2.0, preparation for UTF-8 support by DbLog
|
- change: 93_DbRep: V5.2.0, preparation for UTF-8 support by DbLog
|
||||||
- bugfix: 36_Vallox: Changed read. Added attributes. Changed DeviceID.
|
- bugfix: 36_Vallox: Changed read. Added attributes. Changed DeviceID.
|
||||||
|
@ -241,6 +241,12 @@ YAMAHA_AVR_GetStatus($;$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check hdmi output state, if supported
|
||||||
|
if($hash->{ACTIVE_ZONE} eq "mainzone" and $hash->{helper}{SUPPORT_HDMI_OUT})
|
||||||
|
{
|
||||||
|
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><System><Sound_Video><HDMI><Output><OUT_1>GetParam</OUT_1></Output></HDMI></Sound_Video></System></YAMAHA_AV>", "statusRequest", "hdmiOut1", {options => {can_fail => 1}});
|
||||||
|
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><System><Sound_Video><HDMI><Output><OUT_2>GetParam</OUT_2></Output></HDMI></Sound_Video></System></YAMAHA_AV>", "statusRequest", "hdmiOut2", {options => {can_fail => 1}});
|
||||||
|
}
|
||||||
|
|
||||||
YAMAHA_AVR_ResetTimer($hash) unless($local == 1);
|
YAMAHA_AVR_ResetTimer($hash) unless($local == 1);
|
||||||
|
|
||||||
@ -324,7 +330,8 @@ YAMAHA_AVR_Set($@)
|
|||||||
(exists($hash->{helper}{SURROUND_DECODERS}) ? "surroundDecoder:".$decoders_comma." " : "").
|
(exists($hash->{helper}{SURROUND_DECODERS}) ? "surroundDecoder:".$decoders_comma." " : "").
|
||||||
($hash->{helper}{SUPPORT_DISPLAY_BRIGHTNESS} ? "displayBrightness:slider,-4,1,0 " : "").
|
($hash->{helper}{SUPPORT_DISPLAY_BRIGHTNESS} ? "displayBrightness:slider,-4,1,0 " : "").
|
||||||
(exists($hash->{helper}{DSP_MODES}) ? "dsp:".$dsp_modes_comma." " : "").
|
(exists($hash->{helper}{DSP_MODES}) ? "dsp:".$dsp_modes_comma." " : "").
|
||||||
"enhancer:on,off "
|
"enhancer:on,off ".
|
||||||
|
($hash->{helper}{SUPPORT_HDMI_OUT} ? "hdmiOut1:on,off hdmiOut2:on,off " : "")
|
||||||
:"").
|
:"").
|
||||||
(exists($hash->{helper}{CURRENT_INPUT_TAG}) ?
|
(exists($hash->{helper}{CURRENT_INPUT_TAG}) ?
|
||||||
"navigateListMenu play:noArg pause:noArg stop:noArg skip:reverse,forward ".
|
"navigateListMenu play:noArg pause:noArg stop:noArg skip:reverse,forward ".
|
||||||
@ -339,6 +346,7 @@ YAMAHA_AVR_Set($@)
|
|||||||
($hash->{helper}{SUPPORT_PARTY_MODE} ? "partyMode:on,off " : "").
|
($hash->{helper}{SUPPORT_PARTY_MODE} ? "partyMode:on,off " : "").
|
||||||
($hash->{helper}{SUPPORT_EXTRA_BASS} ? "extraBass:off,auto " : "").
|
($hash->{helper}{SUPPORT_EXTRA_BASS} ? "extraBass:off,auto " : "").
|
||||||
($hash->{helper}{SUPPORT_YPAO_VOLUME} ? "ypaoVolume:off,auto " : "").
|
($hash->{helper}{SUPPORT_YPAO_VOLUME} ? "ypaoVolume:off,auto " : "").
|
||||||
|
|
||||||
"tunerFrequency ".
|
"tunerFrequency ".
|
||||||
"displayBrightness:slider,-4,1,0 ".
|
"displayBrightness:slider,-4,1,0 ".
|
||||||
"statusRequest:noArg";
|
"statusRequest:noArg";
|
||||||
@ -1024,7 +1032,36 @@ YAMAHA_AVR_Set($@)
|
|||||||
return $usage;
|
return $usage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($what eq "hdmiOut1" and defined($a[2]))
|
||||||
|
{
|
||||||
|
if($a[2] eq "on")
|
||||||
|
{
|
||||||
|
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"PUT\"><System><Sound_Video><HDMI><Output><OUT_1>On</OUT_1></Output></HDMI></Sound_Video></System></YAMAHA_AV>", $what, $a[2]);
|
||||||
|
}
|
||||||
|
elsif($a[2] eq "off")
|
||||||
|
{
|
||||||
|
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"PUT\"><System><Sound_Video><HDMI><Output><OUT_1>Off</OUT_1></Output></HDMI></Sound_Video></System></YAMAHA_AV>", $what, $a[2]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $usage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif($what eq "hdmiOut2" and defined($a[2]))
|
||||||
|
{
|
||||||
|
if($a[2] eq "on")
|
||||||
|
{
|
||||||
|
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"PUT\"><System><Sound_Video><HDMI><Output><OUT_2>On</OUT_2></Output></HDMI></Sound_Video></System></YAMAHA_AV>", $what, $a[2]);
|
||||||
|
}
|
||||||
|
elsif($a[2] eq "off")
|
||||||
|
{
|
||||||
|
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"PUT\"><System><Sound_Video><HDMI><Output><OUT_2>Off</OUT_2></Output></HDMI></Sound_Video></System></YAMAHA_AV>", $what, $a[2]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $usage;
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif($what eq "statusRequest")
|
elsif($what eq "statusRequest")
|
||||||
{
|
{
|
||||||
YAMAHA_AVR_GetStatus($hash, 1);
|
YAMAHA_AVR_GetStatus($hash, 1);
|
||||||
@ -1388,6 +1425,10 @@ YAMAHA_AVR_ParseResponse($$$)
|
|||||||
{
|
{
|
||||||
$hash->{helper}{SUPPORT_DISPLAY_BRIGHTNESS} = 0;
|
$hash->{helper}{SUPPORT_DISPLAY_BRIGHTNESS} = 0;
|
||||||
}
|
}
|
||||||
|
elsif($arg eq "hdmiOut1" or $arg eq "hdmiOut2")
|
||||||
|
{
|
||||||
|
$hash->{helper}{SUPPORT_HDMI_OUT} = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1802,6 +1843,10 @@ YAMAHA_AVR_ParseResponse($$$)
|
|||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "currentTitle", YAMAHA_AVR_html2txt($1));
|
readingsBulkUpdate($hash, "currentTitle", YAMAHA_AVR_html2txt($1));
|
||||||
}
|
}
|
||||||
|
elsif($data =~ /<Meta_Info>.*?<Track>(.+?)<\/Track>.*?<\/Meta_Info>/)
|
||||||
|
{
|
||||||
|
readingsBulkUpdate($hash, "currentTitle", YAMAHA_AVR_html2txt($1));
|
||||||
|
}
|
||||||
elsif($data =~ /<Meta_Info>.*?<Radio_Text_A>(.+?)<\/Radio_Text_A>.*?<\/Meta_Info>/)
|
elsif($data =~ /<Meta_Info>.*?<Radio_Text_A>(.+?)<\/Radio_Text_A>.*?<\/Meta_Info>/)
|
||||||
{
|
{
|
||||||
my $tmp = $1;
|
my $tmp = $1;
|
||||||
@ -1910,6 +1955,28 @@ YAMAHA_AVR_ParseResponse($$$)
|
|||||||
$hash->{helper}{SUPPORT_DISPLAY_BRIGHTNESS} = 0;
|
$hash->{helper}{SUPPORT_DISPLAY_BRIGHTNESS} = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($arg eq "hdmiOut1")
|
||||||
|
{
|
||||||
|
if($data =~ /<OUT_1>(.+?)<\/OUT_1>/)
|
||||||
|
{
|
||||||
|
readingsBulkUpdate($hash, "hdmiOut1", lc($1));
|
||||||
|
}
|
||||||
|
elsif($data =~ /RC="2"/) # is not supported by this specific model
|
||||||
|
{
|
||||||
|
$hash->{helper}{SUPPORT_HDMI_OUT} = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif($arg eq "hdmiOut2")
|
||||||
|
{
|
||||||
|
if($data =~ /<OUT_2>(.+?)<\/OUT_2>/)
|
||||||
|
{
|
||||||
|
readingsBulkUpdate($hash, "hdmiOut2", lc($1));
|
||||||
|
}
|
||||||
|
elsif($data =~ /RC="2"/) # is not supported by this specific model
|
||||||
|
{
|
||||||
|
$hash->{helper}{SUPPORT_HDMI_OUT} = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elsif($cmd eq "on")
|
elsif($cmd eq "on")
|
||||||
{
|
{
|
||||||
@ -2245,6 +2312,10 @@ YAMAHA_AVR_ParseXML($$$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# check for hdmi output command
|
||||||
|
$hash->{helper}{SUPPORT_HDMI_OUT} = ($data =~ /<Menu Func_Ex="HDMI_Out" Title_1="HDMI OUT">/ ? 1 : 0);
|
||||||
|
|
||||||
# uncomment line for zone detection testing
|
# uncomment line for zone detection testing
|
||||||
#
|
#
|
||||||
#$hash->{helper}{ZONES} .= "|Zone_2";
|
#$hash->{helper}{ZONES} .= "|Zone_2";
|
||||||
@ -2504,6 +2575,8 @@ sub YAMAHA_AVR_isModel_DSP($)
|
|||||||
<li><b>volumeStraight</b> -80...15 [direct] - set the volume level in decibel. If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
|
<li><b>volumeStraight</b> -80...15 [direct] - set the volume level in decibel. If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
|
||||||
<li><b>volumeUp</b> [0-100] [direct] - increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
|
<li><b>volumeUp</b> [0-100] [direct] - increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
|
||||||
<li><b>volumeDown</b> [0-100] [direct] - decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
|
<li><b>volumeDown</b> [0-100] [direct] - decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
|
||||||
|
<li><b>hdmiOut1</b> on|off - controls the HDMI output 1</li>
|
||||||
|
<li><b>hdmiOut2</b> on|off - controls the HDMI output 2</li>
|
||||||
<li><b>mute</b> on|off|toggle - activates volume mute</li>
|
<li><b>mute</b> on|off|toggle - activates volume mute</li>
|
||||||
<li><b>bass</b> [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) - set bass tone level in decibel</li>
|
<li><b>bass</b> [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) - set bass tone level in decibel</li>
|
||||||
<li><b>treble</b> [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) - set treble tone level in decibel</li>
|
<li><b>treble</b> [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) - set treble tone level in decibel</li>
|
||||||
@ -2671,6 +2744,8 @@ So here are some examples:
|
|||||||
<li><b>extraBass</b> - The status of the extra bass (can be "auto" or "off", only available if supported by the device)</li>
|
<li><b>extraBass</b> - The status of the extra bass (can be "auto" or "off", only available if supported by the device)</li>
|
||||||
<li><b>input</b> - The selected input source according to the FHEM input commands</li>
|
<li><b>input</b> - The selected input source according to the FHEM input commands</li>
|
||||||
<li><b>inputName</b> - The input description as seen on the receiver display</li>
|
<li><b>inputName</b> - The input description as seen on the receiver display</li>
|
||||||
|
<li><b>hdmiOut1</b> - The status of the HDMI output 1 (can be "on" or "off")</li>
|
||||||
|
<li><b>hdmiOut2</b> - The status of the HDMI output 2 (can be "on" or "off")</li>
|
||||||
<li><b>mute</b> - Reports the mute status of the receiver or zone (can be "on" or "off")</li>
|
<li><b>mute</b> - Reports the mute status of the receiver or zone (can be "on" or "off")</li>
|
||||||
<li><b>newFirmware</b> - indicates if a firmware update is available (can be "available" or "unavailable"; only available for RX-Vx71, RX-Vx73, RX-Ax10 or RX-Ax20)</li>
|
<li><b>newFirmware</b> - indicates if a firmware update is available (can be "available" or "unavailable"; only available for RX-Vx71, RX-Vx73, RX-Ax10 or RX-Ax20)</li>
|
||||||
<li><b>power</b> - Reports the power status of the receiver or zone (can be "on" or "off")</li>
|
<li><b>power</b> - Reports the power status of the receiver or zone (can be "on" or "off")</li>
|
||||||
@ -2802,6 +2877,8 @@ So here are some examples:
|
|||||||
<li><b>presetDown</b> - wählt das vorherige Preset für den aktuellen Eingang aus.</li>
|
<li><b>presetDown</b> - wählt das vorherige Preset für den aktuellen Eingang aus.</li>
|
||||||
<li><b>direct</b> on,off - Umgeht alle internen soundverbessernden Maßnahmen (Equalizer, Enhancer, Adaptive DRC,...) und gibt das Signal unverfälscht wieder</li>
|
<li><b>direct</b> on,off - Umgeht alle internen soundverbessernden Maßnahmen (Equalizer, Enhancer, Adaptive DRC,...) und gibt das Signal unverfälscht wieder</li>
|
||||||
<li><b>input</b> hdmi1,hdmiX,... - Wählt den Eingangskanal (es werden nur die tatsächlich verfügbaren Eingänge angeboten)</li>
|
<li><b>input</b> hdmi1,hdmiX,... - Wählt den Eingangskanal (es werden nur die tatsächlich verfügbaren Eingänge angeboten)</li>
|
||||||
|
<li><b>hdmiOut1</b> on,off - Aktiviert die Ausgabe via HDMI Ausgang 1</li>
|
||||||
|
<li><b>hdmiOut2</b> on,off - Aktiviert die Ausgabe via HDMI Ausgang 2</li>
|
||||||
<li><b>scene</b> scene1,sceneX - Wählt eine vorgefertigte Szene aus</li>
|
<li><b>scene</b> scene1,sceneX - Wählt eine vorgefertigte Szene aus</li>
|
||||||
<li><b>surroundDecoder</b> dolbypl,... - Setzt den Surround Decoder, welcher genutzt werden soll sofern der DSP Modus "Surround Decoder" aktiv ist.</li>
|
<li><b>surroundDecoder</b> dolbypl,... - Setzt den Surround Decoder, welcher genutzt werden soll sofern der DSP Modus "Surround Decoder" aktiv ist.</li>
|
||||||
<li><b>volume</b> 0...100 [direct] - Setzt die Lautstärke in Prozent (0 bis 100%). Wenn als zweites Argument "direct" gesetzt ist, wird keine weiche Lautstärkenanpassung durchgeführt (sofern aktiviert). Die Lautstärke wird in diesem Fall sofort gesetzt.</li>
|
<li><b>volume</b> 0...100 [direct] - Setzt die Lautstärke in Prozent (0 bis 100%). Wenn als zweites Argument "direct" gesetzt ist, wird keine weiche Lautstärkenanpassung durchgeführt (sofern aktiviert). Die Lautstärke wird in diesem Fall sofort gesetzt.</li>
|
||||||
@ -2961,6 +3038,8 @@ Ein paar Beispiele:
|
|||||||
<li><b>extraBass</b> - Der Status des Extra Bass ("auto" => an, "off" => aus)</li>
|
<li><b>extraBass</b> - Der Status des Extra Bass ("auto" => an, "off" => aus)</li>
|
||||||
<li><b>input</b> - Der ausgewählte Eingang entsprechend dem FHEM-Kommando</li>
|
<li><b>input</b> - Der ausgewählte Eingang entsprechend dem FHEM-Kommando</li>
|
||||||
<li><b>inputName</b> - Die Eingangsbezeichnung, so wie sie am Receiver eingestellt wurde und auf dem Display erscheint</li>
|
<li><b>inputName</b> - Die Eingangsbezeichnung, so wie sie am Receiver eingestellt wurde und auf dem Display erscheint</li>
|
||||||
|
<li><b>hdmiOut1</b> - Der Status des HDMI Ausgang 1 ("on" => an, "off" => aus)</li>
|
||||||
|
<li><b>hdmiOut2</b> - Der Status des HDMI Ausgang 2 ("on" => an, "off" => aus)</li>
|
||||||
<li><b>mute</b> - Der aktuelle Stumm-Status ("on" => Stumm, "off" => Laut)</li>
|
<li><b>mute</b> - Der aktuelle Stumm-Status ("on" => Stumm, "off" => Laut)</li>
|
||||||
<li><b>newFirmware</b> - Zeigt an, ob eine neue Firmware zum installieren bereit liegt ("available" => neue Firmware verfügbar, "unavailable" => keine neue Firmware verfügbar; Event wird nur generiert für RX-Vx71, RX-Vx73, RX-Ax10 oder RX-Ax20)</li>
|
<li><b>newFirmware</b> - Zeigt an, ob eine neue Firmware zum installieren bereit liegt ("available" => neue Firmware verfügbar, "unavailable" => keine neue Firmware verfügbar; Event wird nur generiert für RX-Vx71, RX-Vx73, RX-Ax10 oder RX-Ax20)</li>
|
||||||
<li><b>power</b> - Der aktuelle Betriebsstatus ("on" => an, "off" => aus)</li>
|
<li><b>power</b> - Der aktuelle Betriebsstatus ("on" => an, "off" => aus)</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user