mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
37_harmony.pm: added channel command
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6830 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
47a56c2a54
commit
a3c8281b3c
@ -304,6 +304,14 @@ harmony_Set($$@)
|
|||||||
harmony_sendEngineGet($hash, "startactivity", "activityId=$param:timestamp=0");
|
harmony_sendEngineGet($hash, "startactivity", "activityId=$param:timestamp=0");
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
|
} elsif( $cmd eq "channel" ) {
|
||||||
|
return "no current activity" if( !defined($hash->{currentActivityID}) || $hash->{currentActivityID} == -1 );
|
||||||
|
return "missing channel" if( !$param );
|
||||||
|
|
||||||
|
harmony_sendEngineGet($hash, "changeChannel", "channel=$param:timestamp=0");
|
||||||
|
|
||||||
|
return undef;
|
||||||
|
|
||||||
} elsif( $cmd eq "command" ) {
|
} elsif( $cmd eq "command" ) {
|
||||||
my $action;
|
my $action;
|
||||||
|
|
||||||
@ -494,6 +502,8 @@ harmony_Set($$@)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$list .= " channel" if( defined($hash->{currentActivityID}) && $hash->{currentActivityID} != -1 );
|
||||||
|
|
||||||
$list .= " command getConfig:noArg getCurrentActivity:noArg off:noArg reconnect:noArg sleeptimer sync:noArg text cursor:up,down,left,right,pageUp,pageDown,home,end special:previousTrack,nextTrack,stop,playPause,volumeUp,volumeDown,mute";
|
$list .= " command getConfig:noArg getCurrentActivity:noArg off:noArg reconnect:noArg sleeptimer sync:noArg text cursor:up,down,left,right,pageUp,pageDown,home,end special:previousTrack,nextTrack,stop,playPause,volumeUp,volumeDown,mute";
|
||||||
|
|
||||||
return "Unknown argument $cmd, choose one of $list";
|
return "Unknown argument $cmd, choose one of $list";
|
||||||
@ -587,7 +597,7 @@ harmony_CDATA2hash($)
|
|||||||
$value .= ":". $next;
|
$value .= ":". $next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$params{$name} = $value;
|
$params{$name} = $value if( $name );
|
||||||
}
|
}
|
||||||
|
|
||||||
return \%params;
|
return \%params;
|
||||||
@ -913,6 +923,8 @@ harmony_Read($)
|
|||||||
|
|
||||||
harmony_sendEngineGet($hash, "config", "");
|
harmony_sendEngineGet($hash, "config", "");
|
||||||
|
|
||||||
|
} elsif( $content =~ m/engine\?changeChannel/ && $decoded ) {
|
||||||
|
|
||||||
} elsif( $content =~ m/engine\?gettimerinterval/ && $decoded ) {
|
} elsif( $content =~ m/engine\?gettimerinterval/ && $decoded ) {
|
||||||
$hash->{sleeptimer} = FmtDateTime( gettimeofday() + $decoded->{interval} );
|
$hash->{sleeptimer} = FmtDateTime( gettimeofday() + $decoded->{interval} );
|
||||||
|
|
||||||
@ -1571,8 +1583,10 @@ harmony_Attr($$$)
|
|||||||
<ul>
|
<ul>
|
||||||
<li>activity <id>|<name><br>
|
<li>activity <id>|<name><br>
|
||||||
switch to this activity</li>
|
switch to this activity</li>
|
||||||
|
<li>channel <channel><br>
|
||||||
|
switch to <channel> in the current activity</li>
|
||||||
<li>command [<id>|<name>] <command><br>
|
<li>command [<id>|<name>] <command><br>
|
||||||
send the given ir command for the current activity or for the given device.</li>
|
send the given ir command for the current activity or for the given device</li>
|
||||||
<li>getConfig<br>
|
<li>getConfig<br>
|
||||||
request the configuration from the hub</li>
|
request the configuration from the hub</li>
|
||||||
<li>getCurrentActivity<br>
|
<li>getCurrentActivity<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user