From ccf073135193e5346a61d03b4ef33e14a6977906 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 27 Feb 2017 13:35:51 +0100 Subject: [PATCH] =?UTF-8?q?diverse=20bugfixes=20f=C3=BCr=20Player=20und=20?= =?UTF-8?q?Group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 21_HEOSGroup.pm | 5 +++-- 21_HEOSMaster.pm | 2 +- 21_HEOSPlayer.pm | 9 ++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/21_HEOSGroup.pm b/21_HEOSGroup.pm index 7460312..9fd2115 100644 --- a/21_HEOSGroup.pm +++ b/21_HEOSGroup.pm @@ -36,7 +36,7 @@ use warnings; use JSON qw(decode_json); use Encode qw(encode_utf8); -my $version = "0.1.61"; +my $version = "0.1.62"; # Declare functions sub HEOSGroup_Initialize($); @@ -216,7 +216,8 @@ sub HEOSGroup_Notify($$) { return if( !$events ); readingsBeginUpdate($hash); - my %playerEevents = map { my ( $key, $value ) = split /:\s/; $value =~ s/^\s+//; ( $key, $value ) } @$events; + #my %playerEevents = map { my ( $key, $value ) = split /:\s/; $value =~ s/^\s+//; ( $key, $value ) } @$events; + my %playerEevents = map { my ( $key, $value ) = split /:\s/; ( $key, $value ) } @$events; foreach my $key ( keys %playerEevents ) { diff --git a/21_HEOSMaster.pm b/21_HEOSMaster.pm index 9970d3e..a30e10c 100644 --- a/21_HEOSMaster.pm +++ b/21_HEOSMaster.pm @@ -47,7 +47,7 @@ use Encode qw(encode_utf8); use Net::Telnet; use Data::Dumper; -my $version = "0.1.61"; +my $version = "0.1.62"; my %heosCmds = ( 'enableChangeEvents' => 'system/register_for_change_events?enable=', diff --git a/21_HEOSPlayer.pm b/21_HEOSPlayer.pm index 881e29d..d6f921a 100644 --- a/21_HEOSPlayer.pm +++ b/21_HEOSPlayer.pm @@ -37,7 +37,7 @@ use JSON qw(decode_json); use Encode qw(encode_utf8); use Data::Dumper; -my $version = "0.1.61"; +my $version = "0.1.62"; # Declare functions sub HEOSPlayer_Initialize($); @@ -272,7 +272,7 @@ sub HEOSPlayer_Set($$@) { my $rvalue; my $favoritcount = 1; my $qcount = 1; - my $string = ''; + my $string = "pid=$pid"; #print "cmd ###################################################\n".Dumper($cmd); @@ -358,7 +358,7 @@ sub HEOSPlayer_Set($$@) { } elsif( $cmd eq 'groupWithMember' ) { return "usage: groupWithMember" if( @args != 1 ); - $pid .= ",$defs{$args[0]}->{PID}"; + $string .= ",$defs{$args[0]}->{PID}"; $heosCmd = 'createGroup'; } elsif( $cmd eq 'clearGroup' ) { @@ -623,8 +623,7 @@ sub HEOSPlayer_Set($$@) { return "Unknown argument $cmd, choose one of $list"; } - - $string .= "pid=$pid"; + $string .= "&$action" if( defined($action)); IOWrite($hash,"$heosCmd","$string"); Log3 $name, 4, "HEOSPlayer ($name) - IOWrite: $heosCmd $string IODevHash=$hash->{IODev}";