2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

70_VolumeLink: Fixed ampInputReading was ignored

git-svn-id: https://svn.fhem.de/fhem/trunk@9199 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rapster 2015-09-03 19:31:59 +00:00
parent 8b11980629
commit 274c03ca99

View File

@ -1,5 +1,5 @@
###############################################################################
# $Id: 70_VolumeLink.pm 2015-08-20 09:00 - rapster - rapster at x0e dot de $
# $Id$
package main;
use strict;
@ -89,7 +89,7 @@ sub VolumeLink_Undef($$) {
my ($hash,$arg) = @_;
$hash->{STARTED} = 0;
RemoveInternalTimer ($hash);
RemoveInternalTimer($hash);
Log3 $hash->{NAME}, 3, "$hash->{NAME}: STOPPED";
@ -186,7 +186,7 @@ sub VolumeLink_Attr(@) {
sub VolumeLink_SendCommand($) {
my ($hash) = @_;
Log3 $hash->{NAME}, 5, "$hash->{NAME}: SendCommand - executed with params: $hash->{httpParams}->{noshutdown}";
Log3 $hash->{NAME}, 5, "$hash->{NAME}: SendCommand - executed";
HttpUtils_NonblockingGet($hash->{httpParams});
@ -253,7 +253,7 @@ sub VolumeLink_ReceiveCommand($) {
return;
}
if($ampTitle =~ /$param->{hash}->{ampInputReadingVal}/i || $param->{hash}->{ampInputReading} == 0) {
if($ampTitle =~ /$param->{hash}->{ampInputReadingVal}/i || !$param->{hash}->{ampInputReading}) {
if($vol ne $ampVol) {
Log3 $name, 5, "$name: Set Volume on ampDevice '$param->{hash}->{ampDevice}' - newVolume:'$vol' - oldVolume:'$ampVol'.";
CommandSet(undef, $param->{hash}->{ampDevice}.' '.$param->{hash}->{ampVolumeCommand}.' '.$vol);
@ -370,7 +370,7 @@ VolumeLink links the volume-level & mute-state from a physical device (e.g.
If set to 1 the module will be stopped and no volume will be fetched from physical-device or transfer to the amplifier-device. <br>
If set to 0 you can start the module again with: set &lt;name&gt; on.</li>
<li>httpNoShutdown &lt;1|0&gt;<br>
If set to 0 the module will tell the http-server to explicit close the connection.<br>
If set to 0 VolumeLink will tell the http-server to explicit close the connection.<br>
<i>Default: 1</i>
</li>
<li>ampInputReading &lt;value&gt;<br>