fix Commandref, remove get Commands from Player Modul

This commit is contained in:
Marko Oldenburg 2017-05-09 12:23:49 +02:00
parent 278e470132
commit 5a82e60788
3 changed files with 32 additions and 17 deletions

View File

@ -38,7 +38,7 @@ use JSON qw(decode_json);
use Encode qw(encode_utf8); use Encode qw(encode_utf8);
my $version = "0.1.76"; my $version = "0.1.80";
@ -688,7 +688,7 @@ sub HEOSGroup_GetGroupMute($) {
<li>channelUp - switches to next favorite</li> <li>channelUp - switches to next favorite</li>
<li>channelDown- switches to previous favorite</li> <li>channelDown- switches to previous favorite</li>
<li>clearGroup - dissolves the group (sets state to off)</li> <li>clearGroup - dissolves the group (sets state to off)</li>
<li>GetGroupInfo - get media info of the group</li> <li>getGroupInfo - get media info of the group</li>
<li>mute on|off - set mute state on|off</li> <li>mute on|off - set mute state on|off</li>
<li>next - play next title in queue</li> <li>next - play next title in queue</li>
<li>pause - set state of player to "pause"</li> <li>pause - set state of player to "pause"</li>
@ -776,7 +776,6 @@ sub HEOSGroup_GetGroupMute($) {
<li>playPlaylist &ltmyList&gt - spielt die Playlist &ltmyList&gt ab</li> <li>playPlaylist &ltmyList&gt - spielt die Playlist &ltmyList&gt ab</li>
<li>prev - spielt vorherigen Titel in Warteschlange</li> <li>prev - spielt vorherigen Titel in Warteschlange</li>
<li>repeat - setzt den Player Repeat Status (on_all|on_one|off) </li> <li>repeat - setzt den Player Repeat Status (on_all|on_one|off) </li>
<li>saveQueue &ltmyList&gt - speichert die Warteschlange als Playlist &ltmyList&gt</li>
<li>shuffle - setzt den Player Shuffle Status auf on|off</li> <li>shuffle - setzt den Player Shuffle Status auf on|off</li>
<li>stop - setzt den Status des Players auf "stop"</li> <li>stop - setzt den Status des Players auf "stop"</li>
<li>volume - setzt die Lautst&aumlrke auf 0..100</li> <li>volume - setzt die Lautst&aumlrke auf 0..100</li>

View File

@ -42,7 +42,7 @@ package main;
use strict; use strict;
use warnings; use warnings;
use Data::Dumper; #use Data::Dumper;
my $missingModul = ""; my $missingModul = "";
my $missingModulNet = ""; 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 = ( my %heosCmds = (
'enableChangeEvents' => 'system/register_for_change_events?enable=', 'enableChangeEvents' => 'system/register_for_change_events?enable=',
@ -178,6 +178,7 @@ sub HEOSMaster_Define($$) {
return "too few parameters: define <name> HEOSMaster <HOST>" if( @a != 3 ); return "too few parameters: define <name> HEOSMaster <HOST>" if( @a != 3 );
return "Cannot define a HEOS device. Perl modul $missingModul is missing." if ( $missingModul );
my $name = $a[0]; my $name = $a[0];
my $host = $a[2]; my $host = $a[2];
@ -185,7 +186,6 @@ sub HEOSMaster_Define($$) {
$hash->{HOST} = $host; $hash->{HOST} = $host;
$hash->{VERSION} = $version; $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"; Log3 $name, 3, "HEOSMaster ($name) - defined with host $host";
$attr{$name}{room} = "HEOS" if( !defined( $attr{$name}{room} ) ); $attr{$name}{room} = "HEOS" if( !defined( $attr{$name}{room} ) );
@ -1557,7 +1557,8 @@ sub HEOSMaster_MakeImage($$) {
<ul> <ul>
<li>heosUsername - username of Your HEOS account</li> <li>heosUsername - username of Your HEOS account</li>
</ul> </ul>
<br><br> <br><br>
</ul>
</ul> </ul>
=end html =end html
@ -1634,7 +1635,8 @@ Von nun an k&oumlnnen die Player gesteuert werden. Au&szligerdem wird der Status
<ul> <ul>
<li>heosUsername - Benutzername des HEOS Kontos</li> <li>heosUsername - Benutzername des HEOS Kontos</li>
</ul> </ul>
<br><br> <br><br>
</ul>
</ul> </ul>
=end html_DE =end html_DE

View File

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