mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
71_YAMAHA_NP: Added balance, enhancer, equalizer functionality
git-svn-id: https://svn.fhem.de/fhem/trunk@19821 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
90df134fbd
commit
25ad01102f
@ -1,5 +1,8 @@
|
|||||||
# 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: 71_YAMAHA_NP: Added undocumented reverse-engineered
|
||||||
|
sound functionality :-)
|
||||||
|
(balance, enhancer, equalizer)
|
||||||
- bugfix: 76_SMAPortal: show multiple consumer icons if planned
|
- bugfix: 76_SMAPortal: show multiple consumer icons if planned
|
||||||
- bugfix: 73_AutoShuttersControl: Fix for missing closed tag for strong
|
- bugfix: 73_AutoShuttersControl: Fix for missing closed tag for strong
|
||||||
- feature: 71_YAMAHA_NP: New commands 'checkForNewFirmware' and 'friendlyName'
|
- feature: 71_YAMAHA_NP: New commands 'checkForNewFirmware' and 'friendlyName'
|
||||||
|
@ -371,6 +371,12 @@ sub YAMAHA_NP_GetStatus
|
|||||||
|
|
||||||
# Basic status request
|
# Basic status request
|
||||||
YAMAHA_NP_SendCmd($hash, "GET:System,Basic_Status:GetParam", "statusRequest", "basicStatus", 0);
|
YAMAHA_NP_SendCmd($hash, "GET:System,Basic_Status:GetParam", "statusRequest", "basicStatus", 0);
|
||||||
|
|
||||||
|
YAMAHA_NP_SendCmd($hash, "GET:System,Sound,Balance:GetParam", "statusRequest", "balance", 0);
|
||||||
|
YAMAHA_NP_SendCmd($hash, "GET:System,Sound,Equalizer,Low:GetParam", "statusRequest", "EQlow", 0);
|
||||||
|
YAMAHA_NP_SendCmd($hash, "GET:System,Sound,Equalizer,Mid:GetParam", "statusRequest", "EQmid", 0);
|
||||||
|
YAMAHA_NP_SendCmd($hash, "GET:System,Sound,Equalizer,High:GetParam", "statusRequest", "EQhigh", 0);
|
||||||
|
YAMAHA_NP_SendCmd($hash, "GET:System,Sound,Enhancer:GetParam", "statusRequest", "enhancer", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reset Timer for the next loop.
|
# Reset Timer for the next loop.
|
||||||
@ -555,6 +561,11 @@ sub YAMAHA_NP_Set
|
|||||||
if (ReadingsVal($name,"power","") !~ m/(off|absent)/)
|
if (ReadingsVal($name,"power","") !~ m/(off|absent)/)
|
||||||
{
|
{
|
||||||
$usage .=" friendlyName"
|
$usage .=" friendlyName"
|
||||||
|
." soundBalance:slider,-10,1,10"
|
||||||
|
." soundEqLow:slider,-10,1,10"
|
||||||
|
." soundEqMid:slider,-10,1,10"
|
||||||
|
." soundEqHigh:slider,-10,1,10"
|
||||||
|
." soundEnhancer:on,off"
|
||||||
." checkForNewFirmware:noArg"
|
." checkForNewFirmware:noArg"
|
||||||
." input:".$inputs_comma
|
." input:".$inputs_comma
|
||||||
." volumeStraight:slider,".$volumeStraightMin.",1,".$volumeStraightMax
|
." volumeStraight:slider,".$volumeStraightMin.",1,".$volumeStraightMax
|
||||||
@ -1327,6 +1338,17 @@ desiredListNloop:
|
|||||||
|
|
||||||
Log3 $name, 4, "YAMAHA_NP ($name) - new target volume: $hash->{helper}{targetVolume}";
|
Log3 $name, 4, "YAMAHA_NP ($name) - new target volume: $hash->{helper}{targetVolume}";
|
||||||
}
|
}
|
||||||
|
elsif($what eq "soundEnhancer")
|
||||||
|
{
|
||||||
|
if(lc($a[2]) =~ /^(on|off)$/)
|
||||||
|
{
|
||||||
|
YAMAHA_NP_SendCmd($hash, "PUT:System,Sound,Enhancer:".ucfirst(lc($a[2])), $what, $a[2], 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "'soundEnhancer must be [on|off]"
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif($what eq "sleep")
|
elsif($what eq "sleep")
|
||||||
{
|
{
|
||||||
if($a[2] eq "off")
|
if($a[2] eq "off")
|
||||||
@ -1454,6 +1476,50 @@ desiredListNloop:
|
|||||||
# Toggle CD Tray
|
# Toggle CD Tray
|
||||||
YAMAHA_NP_SendCmd($hash, "PUT:System,Misc,Tray:Open/Close", $what, "Open/Close", 0);
|
YAMAHA_NP_SendCmd($hash, "PUT:System,Misc,Tray:Open/Close", $what, "Open/Close", 0);
|
||||||
}
|
}
|
||||||
|
elsif($what eq "soundBalance")
|
||||||
|
{
|
||||||
|
if($a[2] >= -10 and $a[2] <= 10)
|
||||||
|
{
|
||||||
|
YAMAHA_NP_SendCmd($hash, "PUT:System,Sound,Balance:$a[2]", "soundBalance", $a[2], 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "'soundBalance' must be between -10 and 10."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif($what eq "soundEqLow")
|
||||||
|
{
|
||||||
|
if($a[2] >= -10 and $a[2] <= 10)
|
||||||
|
{
|
||||||
|
YAMAHA_NP_SendCmd($hash, "PUT:System,Sound,Equalizer,Low:$a[2]", "soundEqLow", $a[2], 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "'soundEqLow' must be between -10 and 10."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif($what eq "soundEqMid")
|
||||||
|
{
|
||||||
|
if($a[2] >= -10 and $a[2] <= 10)
|
||||||
|
{
|
||||||
|
YAMAHA_NP_SendCmd($hash, "PUT:System,Sound,Equalizer,Mid:$a[2]", "soundEqMid", $a[2], 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "'soundEqMid' must be between -10 and 10."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif($what eq "soundEqHigh")
|
||||||
|
{
|
||||||
|
if($a[2] >= -10 and $a[2] <= 10)
|
||||||
|
{
|
||||||
|
YAMAHA_NP_SendCmd($hash, "PUT:System,Sound,Equalizer,High:$a[2]", "soundEqHigh", $a[2], 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "'soundEqHigh' must be between -10 and 10."
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif($what eq "clockUpdate")
|
elsif($what eq "clockUpdate")
|
||||||
{ # Clock Update
|
{ # Clock Update
|
||||||
my $clockUpdateCurrentTime = Time::Piece->new();
|
my $clockUpdateCurrentTime = Time::Piece->new();
|
||||||
@ -1903,6 +1969,26 @@ sub YAMAHA_NP_ParseResponse
|
|||||||
readingsBulkUpdate($hash, "sleep", $sl);
|
readingsBulkUpdate($hash, "sleep", $sl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($arg eq "enhancer")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/ and $data =~ /<Enhancer>(.*)<\/Enhancer>/){readingsBulkUpdate($hash, "soundEnhancer", lc($1));}
|
||||||
|
}
|
||||||
|
elsif($arg eq "balance")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/ and $data =~ /<Balance>(.*)<\/Balance>/){readingsBulkUpdate($hash, "soundBalance", $1);}
|
||||||
|
}
|
||||||
|
elsif($arg eq "EQlow")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/ and $data =~ /<Low>(.*)<\/Low>/){readingsBulkUpdate($hash, "soundEqLow", $1);}
|
||||||
|
}
|
||||||
|
elsif($arg eq "EQmid")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/ and $data =~ /<Mid>(.*)<\/Mid>/){readingsBulkUpdate($hash, "soundEqMid", $1);}
|
||||||
|
}
|
||||||
|
elsif($arg eq "EQhigh")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/ and $data =~ /<High>(.*)<\/High>/){readingsBulkUpdate($hash, "soundEqHigh", $1);}
|
||||||
|
}
|
||||||
elsif($arg eq "playerStatus")
|
elsif($arg eq "playerStatus")
|
||||||
{
|
{
|
||||||
my $input = ReadingsVal($name,"input","");
|
my $input = ReadingsVal($name,"input","");
|
||||||
@ -2410,6 +2496,26 @@ sub YAMAHA_NP_ParseResponse
|
|||||||
delete $hash->{helper}{friendlyName};
|
delete $hash->{helper}{friendlyName};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($cmd eq "soundEnhancer")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "soundEnhancer", lc($arg));}
|
||||||
|
}
|
||||||
|
elsif($cmd eq "soundBalance")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "soundBalance", $arg);}
|
||||||
|
}
|
||||||
|
elsif($cmd eq "soundEqLow")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "soundEqLow", $arg);}
|
||||||
|
}
|
||||||
|
elsif($cmd eq "soundEqMid")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "soundEqMid", $arg);}
|
||||||
|
}
|
||||||
|
elsif($cmd eq "soundEqHigh")
|
||||||
|
{
|
||||||
|
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "soundEqHigh", $arg);}
|
||||||
|
}
|
||||||
elsif($cmd eq "mute")
|
elsif($cmd eq "mute")
|
||||||
{
|
{
|
||||||
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "mute", $arg);}
|
if($data =~ /RC="0"/){readingsBulkUpdate($hash, "mute", $arg);}
|
||||||
@ -2750,6 +2856,11 @@ sub YAMAHA_NP_html2txt
|
|||||||
<li><b>repeatAll</b> – Set repeat mode All</li>
|
<li><b>repeatAll</b> – Set repeat mode All</li>
|
||||||
</ul>
|
</ul>
|
||||||
<li><b>selectStream</b> – direct context–sensitive stream selection depending on the input and available streams. Available streams are read out from device automatically. Depending on the number, this may take some time... (Limited to 999 list entries.) (see also 'maxPlayerLineItems' attribute</li>
|
<li><b>selectStream</b> – direct context–sensitive stream selection depending on the input and available streams. Available streams are read out from device automatically. Depending on the number, this may take some time... (Limited to 999 list entries.) (see also 'maxPlayerLineItems' attribute</li>
|
||||||
|
<li><b>soundBalance</b> <-10..10> – Set balance</li>
|
||||||
|
<li><b>soundEnhancer</b> [on|off] – Music Enhancer on|off</li>
|
||||||
|
<li><b>soundEqLow</b> <-10..10> – Set EQ Low band</li>
|
||||||
|
<li><b>soundEqMid</b> <-10..10> – Set EQ Mid band</li>
|
||||||
|
<li><b>soundEqHigh</b> <-10..10> – Set EQ High band</li>
|
||||||
<li><b>sleep</b> [off|30min|60min|90min|120min] – activates the internal sleep timer</li>
|
<li><b>sleep</b> [off|30min|60min|90min|120min] – activates the internal sleep timer</li>
|
||||||
<li><b>standbyMode</b> [eco|normal] – set the standby mode</li>
|
<li><b>standbyMode</b> [eco|normal] – set the standby mode</li>
|
||||||
<li><b>statusRequest [<parameter>] </b> – requests the current status of the device</li>
|
<li><b>statusRequest [<parameter>] </b> – requests the current status of the device</li>
|
||||||
@ -2825,6 +2936,11 @@ sub YAMAHA_NP_html2txt
|
|||||||
<li>presence – presence status of the device (present|absent)</li>
|
<li>presence – presence status of the device (present|absent)</li>
|
||||||
<li>selectStream – status of the selectStream command</li>
|
<li>selectStream – status of the selectStream command</li>
|
||||||
<li>sleep – sleep timer value (off|30 min|60 min|90 min|120 min)</li>
|
<li>sleep – sleep timer value (off|30 min|60 min|90 min|120 min)</li>
|
||||||
|
<li><b>soundEqLow</b> – Balance value</li>
|
||||||
|
<li><b>soundEnhancer</b> – Music Enhancer on|off</li>
|
||||||
|
<li><b>soundEqLow</b> – Equalizer value Low band</li>
|
||||||
|
<li><b>soundEqMid</b> – Equalizer value Mid band</li>
|
||||||
|
<li><b>soundEqHigh</b> – Equalizer value High band</li>
|
||||||
<li>standbyMode – status of the standby mode (normal|eco)</li>
|
<li>standbyMode – status of the standby mode (normal|eco)</li>
|
||||||
<li>state – current state information (on|off)</li>
|
<li>state – current state information (on|off)</li>
|
||||||
<li>volume – relative volume (0...100)</li>
|
<li>volume – relative volume (0...100)</li>
|
||||||
@ -2955,6 +3071,11 @@ sub YAMAHA_NP_html2txt
|
|||||||
</ul>
|
</ul>
|
||||||
<li><b>selectStream</b> – Direkte kontextsensitive Streamauswahl. Verügbare Menüeinträge werden automatisch generiert. Bedingt durch das KOnzept des Yamaha–Protokolls kann dies etwas Zeit in Anspruch nehmen. (Defaultmässig auf 999 Listeneintäge limitiert. s.a. maxPlayerLineItems Attribut.)</li>
|
<li><b>selectStream</b> – Direkte kontextsensitive Streamauswahl. Verügbare Menüeinträge werden automatisch generiert. Bedingt durch das KOnzept des Yamaha–Protokolls kann dies etwas Zeit in Anspruch nehmen. (Defaultmässig auf 999 Listeneintäge limitiert. s.a. maxPlayerLineItems Attribut.)</li>
|
||||||
<li><b>sleep</b> [off|30min|60min|90min|120min] – Aktiviert/Deaktiviert den internen Sleep–Timer</li>
|
<li><b>sleep</b> [off|30min|60min|90min|120min] – Aktiviert/Deaktiviert den internen Sleep–Timer</li>
|
||||||
|
<li><b>soundBalance</b> <-10..10> – Setzt balance</li>
|
||||||
|
<li><b>soundEnhancer</b> [on|off] – Music Enhancer on|off</li>
|
||||||
|
<li><b>soundEqLow</b> <-10..10> – Setzt EQ Low band</li>
|
||||||
|
<li><b>soundEqMid</b> <-10..10> – Setzt EQ Mid band</li>
|
||||||
|
<li><b>soundEqHigh</b> <-10..10> – Setzt EQ High band</li>
|
||||||
<li><b>standbyMode</b> [eco|normal] – Umschaltung des Standby Modus.</li>
|
<li><b>standbyMode</b> [eco|normal] – Umschaltung des Standby Modus.</li>
|
||||||
<li><b>statusRequest [<parameter>] </b> – Abfrage des aktuellen Status des Network Players.</li>
|
<li><b>statusRequest [<parameter>] </b> – Abfrage des aktuellen Status des Network Players.</li>
|
||||||
<ul>
|
<ul>
|
||||||
@ -3027,6 +3148,11 @@ sub YAMAHA_NP_html2txt
|
|||||||
<li>power – Aktueller Devicestatus (on|off)</li>
|
<li>power – Aktueller Devicestatus (on|off)</li>
|
||||||
<li>presence – Geräteverfügbarkeit im Netzwerk (present|absent)</li>
|
<li>presence – Geräteverfügbarkeit im Netzwerk (present|absent)</li>
|
||||||
<li>selectStream – Status des selectStream Befehls</li>
|
<li>selectStream – Status des selectStream Befehls</li>
|
||||||
|
<li><b>soundEqLow</b> – Balance Wert</li>
|
||||||
|
<li><b>soundEnhancer</b> – Music Enhancer on|off</li>
|
||||||
|
<li><b>soundEqLow</b> – Equalizer Wert Low band</li>
|
||||||
|
<li><b>soundEqMid</b> – Equalizer Wert Mid band</li>
|
||||||
|
<li><b>soundEqHigh</b> – Equalizer Wert High band</li>
|
||||||
<li>sleep – Sleeptimer Wert (off|30 min|60 min|90 min|120 min)</li>
|
<li>sleep – Sleeptimer Wert (off|30 min|60 min|90 min|120 min)</li>
|
||||||
<li>standbyMode – Standby Mode Status (normal|eco)</li>
|
<li>standbyMode – Standby Mode Status (normal|eco)</li>
|
||||||
<li>state – Aktueller Gerätezusand (on|off)</li>
|
<li>state – Aktueller Gerätezusand (on|off)</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user