mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-17 11:26:03 +00:00
YAMAHA_AVR: new reading "newFirmware" for indicating firmware update. new argument "direct" for volume commands to avoid volume smoothing, if activated (Forum: #19896)
git-svn-id: https://svn.fhem.de/fhem/trunk@9092 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bc39637be4
commit
13afc250ef
@ -1,5 +1,8 @@
|
||||
# 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: YAMAHA_AVR: new reading "newFirmware" for indicating firmware
|
||||
update. new argument "direct" for volume commands to avoid
|
||||
volume smoothing (if activated)
|
||||
- added: 70_VolumeLink.pm: New module to link the volume-level and mute-state
|
||||
from a physical-device (e.g. a TV) with a fhem-device (e.g.
|
||||
a SONOS-Playbar or an AVR).
|
||||
|
@ -97,6 +97,9 @@ YAMAHA_AVR_GetStatus($;$)
|
||||
}
|
||||
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><$zone><Basic_Status>GetParam</Basic_Status></$zone></YAMAHA_AV>", "statusRequest", "basicStatus");
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><System><Misc><Update><YAMAHA_Network_Site><Status>GetParam</Status></YAMAHA_Network_Site></Update></Misc></System></YAMAHA_AV>", "statusRequest", "fwUpdate", 1);
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><System><Misc><Network><Update><Status>GetParam</Status></Update></Network></Misc></System></YAMAHA_AV>", "statusRequest", "fwUpdate", 1);
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><System><Party_Mode><Mode>GetParam</Mode></Party_Mode></System></YAMAHA_AV>", "statusRequest", "partyMode");
|
||||
|
||||
YAMAHA_AVR_ResetTimer($hash) unless($local == 1);
|
||||
}
|
||||
@ -352,7 +355,7 @@ YAMAHA_AVR_Set($@)
|
||||
}
|
||||
|
||||
# Only if a volume reading exists and smoohing is really needed (step difference is not zero)
|
||||
if(defined($hash->{READINGS}{volumeStraight}{VAL}) and $diff != 0)
|
||||
if(defined($hash->{READINGS}{volumeStraight}{VAL}) and $diff != 0 and not (defined($a[3]) and $a[3] eq "direct"))
|
||||
{
|
||||
Log3 $name, 4, "YAMAHA_AVR ($name) - set volume to ".($current_volume + $diff)." dB (target is $target_volume dB)";
|
||||
YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"PUT\"><$zone><$volume_cmd><Lvl><Val>".(($current_volume + $diff)*10)."</Val><Exp>1</Exp><Unit>dB</Unit></Lvl></$volume_cmd></$zone></YAMAHA_AV>", "volume", ($current_volume + $diff)."|$diff|$target_volume" );
|
||||
@ -1190,6 +1193,14 @@ YAMAHA_AVR_ParseResponse ($$$)
|
||||
readingsBulkUpdate($hash, "repeat", lc($1));
|
||||
}
|
||||
}
|
||||
elsif($arg eq "fwUpdate")
|
||||
{
|
||||
if($data =~ /<Status>(.+?)<\/Status>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "newFirmware", lc($1));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
elsif($cmd eq "on")
|
||||
{
|
||||
@ -1564,10 +1575,10 @@ sub YAMAHA_AVR_html2txt($)
|
||||
<li><b>off</b> - shuts down the device </li>
|
||||
<li><b>input</b> hdm1,hdmX,... - selects the input channel (only the real available inputs were given)</li>
|
||||
<li><b>scene</b> scene1,sceneX - select the scene</li>
|
||||
<li><b>volume</b> 0...100 - set the volume level in percentage</li>
|
||||
<li><b>volumeStraight</b> -80...15 - set the volume level in decibel</li>
|
||||
<li><b>volumeUp</b> [0-100] - 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)</li>
|
||||
<li><b>volumeDown</b> [0-100] - 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)</li>
|
||||
<li><b>volume</b> 0...100 [direct] - set the volume level in percentage. 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>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>mute</b> on|off|toggle - activates volume mute</li>
|
||||
<li><b>dsp</b> hallinmunich,hallinvienna,... - sets the DSP mode to the given preset</li>
|
||||
<li><b>enhancer</b> on|off - controls the internal sound enhancer</li>
|
||||
@ -1692,6 +1703,7 @@ sub YAMAHA_AVR_html2txt($)
|
||||
<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>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")</li>
|
||||
<li><b>power</b> - Reports the power status of the receiver or zone (can be "on" or "off")</li>
|
||||
<li><b>presence</b> - Reports the presence status of the receiver or zone (can be "absent" or "present"). In case of an absent device, it cannot be controlled via FHEM anymore.</li>
|
||||
<li><b>volume</b> - Reports the current volume level of the receiver or zone in percentage values (between 0 and 100 %)</li>
|
||||
@ -1806,10 +1818,10 @@ sub YAMAHA_AVR_html2txt($)
|
||||
<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>scene</b> scene1,sceneX - Wählt eine vorgefertigte Szene aus</li>
|
||||
<li><b>volume</b> 0...100 - Setzt die Lautstärke in Prozent (0 bis 100%)</li>
|
||||
<li><b>volumeStraight</b> -87...15 - Setzt die Lautstärke in Dezibel (-80.5 bis 15.5 dB) so wie sie am Receiver auch verwendet wird.</li>
|
||||
<li><b>volumeUp</b> [0...100] - Erhöht die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang) </li>
|
||||
<li><b>volumeDown</b> [0...100] - Veringert die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang) </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>volumeStraight</b> -87...15 [direct] - Setzt die Lautstärke in Dezibel (-80.5 bis 15.5 dB) so wie sie am Receiver auch verwendet wird. 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>volumeUp</b> [0...100] [direct] - Erhöht die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang). 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>volumeDown</b> [0...100] [direct] - Veringert die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang). 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>mute</b> on,off,toggle - Schaltet den Receiver stumm</li>
|
||||
<li><b>straight</b> on,off - Umgeht die interne Codec-Umwandlung und gibt den Original-Codec wieder.</li>
|
||||
<li><b>sleep</b> off,30min,60min,...,last - Aktiviert den internen Sleep-Timer zum automatischen Abschalten</li>
|
||||
@ -1924,6 +1936,7 @@ sub YAMAHA_AVR_html2txt($)
|
||||
<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>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)</li>
|
||||
<li><b>power</b> - Der aktuelle Betriebsstatus ("on" => an, "off" => aus)</li>
|
||||
<li><b>presence</b> - Die aktuelle Empfangsbereitschaft ("present" => empfangsbereit, "absent" => nicht empfangsbereit, z.B. Stromausfall)</li>
|
||||
<li><b>volume</b> - Der aktuelle Lautstärkepegel in Prozent (zwischen 0 und 100 %)</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user