From 5a82e60788be901459e218fde00ca383c4868ad1 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 9 May 2017 12:23:49 +0200 Subject: [PATCH] fix Commandref, remove get Commands from Player Modul --- 21_HEOSGroup.pm | 7 +++---- 21_HEOSMaster.pm | 14 ++++++++------ 21_HEOSPlayer.pm | 28 +++++++++++++++++++++------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/21_HEOSGroup.pm b/21_HEOSGroup.pm index df65e84..a75b977 100644 --- a/21_HEOSGroup.pm +++ b/21_HEOSGroup.pm @@ -38,7 +38,7 @@ use JSON qw(decode_json); use Encode qw(encode_utf8); -my $version = "0.1.76"; +my $version = "0.1.80"; @@ -688,7 +688,7 @@ sub HEOSGroup_GetGroupMute($) {
  • channelUp - switches to next favorite
  • channelDown- switches to previous favorite
  • clearGroup - dissolves the group (sets state to off)
  • -
  • GetGroupInfo - get media info of the group
  • +
  • getGroupInfo - get media info of the group
  • mute on|off - set mute state on|off
  • next - play next title in queue
  • pause - set state of player to "pause"
  • @@ -707,7 +707,7 @@ sub HEOSGroup_GetGroupMute($) { state + =end html @@ -776,7 +776,6 @@ sub HEOSGroup_GetGroupMute($) {
  • playPlaylist <myList> - spielt die Playlist <myList> ab
  • prev - spielt vorherigen Titel in Warteschlange
  • repeat - setzt den Player Repeat Status (on_all|on_one|off)
  • -
  • saveQueue <myList> - speichert die Warteschlange als Playlist <myList>
  • shuffle - setzt den Player Shuffle Status auf on|off
  • stop - setzt den Status des Players auf "stop"
  • volume - setzt die Lautstärke auf 0..100
  • diff --git a/21_HEOSMaster.pm b/21_HEOSMaster.pm index 874f05b..d5e67a9 100644 --- a/21_HEOSMaster.pm +++ b/21_HEOSMaster.pm @@ -42,7 +42,7 @@ package main; use strict; use warnings; -use Data::Dumper; +#use Data::Dumper; my $missingModul = ""; my $missingModulNet = ""; @@ -55,7 +55,7 @@ eval "use IO::Socket::Multicast;1" or $missingModulNet .= "IO::Socket::Multicast -my $version = "0.1.76"; +my $version = "0.1.80"; my %heosCmds = ( 'enableChangeEvents' => 'system/register_for_change_events?enable=', @@ -178,14 +178,14 @@ sub HEOSMaster_Define($$) { return "too few parameters: define HEOSMaster " if( @a != 3 ); - + return "Cannot define a HEOS device. Perl modul $missingModul is missing." if ( $missingModul ); + my $name = $a[0]; my $host = $a[2]; $hash->{HOST} = $host; $hash->{VERSION} = $version; - return Log3 $name, 3, "Cannot define a HEOS device. Perl modul $missingModul is missing." if ( $missingModul ); Log3 $name, 3, "HEOSMaster ($name) - defined with host $host"; $attr{$name}{room} = "HEOS" if( !defined( $attr{$name}{room} ) ); @@ -1557,7 +1557,8 @@ sub HEOSMaster_MakeImage($$) {
    • heosUsername - username of Your HEOS account
    -

    +

    + =end html @@ -1634,7 +1635,8 @@ Von nun an können die Player gesteuert werden. Außerdem wird der Status
    • heosUsername - Benutzername des HEOS Kontos
    -

    +

    + =end html_DE diff --git a/21_HEOSPlayer.pm b/21_HEOSPlayer.pm index cdb18b9..cebd646 100644 --- a/21_HEOSPlayer.pm +++ b/21_HEOSPlayer.pm @@ -37,9 +37,9 @@ use warnings; use JSON qw(decode_json); use Encode qw(encode_utf8); use URI::Escape; -use Data::Dumper; +#use Data::Dumper; -my $version = "0.1.76"; +my $version = "0.1.80"; @@ -759,8 +759,10 @@ sub HEOSPlayer_Set($$@) { } } else { - - my $list = "getPlayerInfo:noArg getPlayState:noArg getNowPlayingMedia:noArg getPlayMode:noArg play:noArg stop:noArg pause:noArg mute:on,off volume:slider,0,5,100 volumeUp:slider,0,1,10 volumeDown:slider,0,1,10 repeat:one,all,off shuffle:on,off next:noArg prev:noArg input"; + + #### alte get Befehle sollen raus + #### getPlayerInfo:noArg getPlayState:noArg getNowPlayingMedia:noArg getPlayMode:noArg + my $list = "play:noArg stop:noArg pause:noArg mute:on,off volume:slider,0,5,100 volumeUp:slider,0,1,10 volumeDown:slider,0,1,10 repeat:one,all,off shuffle:on,off next:noArg prev:noArg input"; my @players = devspec2array("TYPE=HEOSPlayer:FILTER=NAME!=$name"); $list .= " groupWithMember:multiple-strict," . join( ",", @players ) if ( scalar @players > 0 ); @@ -1119,6 +1121,8 @@ sub HEOSPlayer_makeImage($$) {
  • currentSid - source ID
  • currentStation - name of now playing station
  • currentTitle - name of now playing title
  • +
  • error - last error
  • +
  • gid - ID of group, in which player is member
  • ip-address - ip address of the player
  • lineout - lineout level type (variable|Fixed)
  • model - model of HEOS speaker (e.g. HEOS 1)
  • @@ -1150,6 +1154,10 @@ sub HEOSPlayer_makeImage($$) {
  • getPlayerInfo - get player info (pid, gid, network, ...)
  • set <hp1> groupWithMember <hp2> - creates group with hp1 as leader and hp2 as member
  • input sid[,cid][,mid] - set input source-id[,container-id][,media-id]
  • +
      + Example: set kitchen input 1027,1772574848,inputs/tvaudio
      + starts "tv audio" on player "kitchen"
      +
  • mute on|off - set mute state on|off
  • next - play next title in queue
  • pause - set state of player to "pause"
  • @@ -1183,7 +1191,7 @@ sub HEOSPlayer_makeImage($$) { attributes
    • channelring - when reaching the last favorite ChannelUp/Down switches in circle, i.e. to the first/last favorite again
    • -
    • mute2play - if mute switch at speaker is pressed, the stream stops
    • +
    • mute2play - if mute switch on speaker is pressed, the stream stops
    @@ -1213,6 +1221,8 @@ sub HEOSPlayer_makeImage($$) {
  • currentSid - source ID
  • currentStation - Name des gerade abgespielten Senders
  • currentTitle - Name des gerade abgespielten Titels
  • +
  • error - letzte Fehlermeldung
  • +
  • gid - ID der Gruppe, in der der Player Mitglied ist
  • ip-address - IP-Adresse des Players
  • lineout - lineout level type (variable|Fixed)
  • model - Modell des HEOS Lautsprechers (z.B. HEOS 1)
  • @@ -1244,6 +1254,10 @@ sub HEOSPlayer_makeImage($$) {
  • getPlayerInfo - holt Player-Info (pid, gid, network, ...)
  • set <hp1> groupWithMember <hp2> - erzeugt eine Gruppierung mit hp1 als Leader und hp2 als Mitglied
  • input sid[,cid][,mid] - setze input source-id[,container-id][,media-id]
  • +
      + Beispiel: set Küche input 1027,1772574848,inputs/tvaudio
      + startet "TV-Audio" auf dem Player "Küche"
      +
  • mute on|off - setzt den mute Status on|off
  • next - spielt nächsten Titel in Warteschlange
  • pause - setzt den Status des Players auf "pause"
  • @@ -1263,7 +1277,7 @@ sub HEOSPlayer_makeImage($$) { get
      -
    • ls - listet Musikquellen (Eingänge, Playlists, Favorites, Musik-Dienste, ...)
    • +
    • ls - listet Musikquellen (Eingänge, Playlists, Favoriten, Musik-Dienste, ...)
    • channelscount - Anzahl der Favoriten


    @@ -1280,7 +1294,7 @@ sub HEOSPlayer_makeImage($$) {
  • mute2play - Beim Betätigen der Mute-Taste am Lautsprecher wird auch der Stream angehalten
  • - + =end html_DE =cut