mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
ENIGMA2: add parameter "long" to remoteControl command
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@7203 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b18d9bb32d
commit
e7646eaa6b
@ -24,7 +24,7 @@
|
|||||||
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Version: 1.4.0
|
# Version: 1.4.1
|
||||||
#
|
#
|
||||||
# Major Version History:
|
# Major Version History:
|
||||||
# - 1.4.0 - 2014-11-27
|
# - 1.4.0 - 2014-11-27
|
||||||
@ -498,7 +498,10 @@ sub ENIGMA2_Set($@) {
|
|||||||
|
|
||||||
# remoteControl
|
# remoteControl
|
||||||
elsif ( lc( $a[1] ) eq "remotecontrol" ) {
|
elsif ( lc( $a[1] ) eq "remotecontrol" ) {
|
||||||
Log3 $name, 2, "ENIGMA2 set $name " . $a[1] . " " . $a[2];
|
Log3 $name, 2, "ENIGMA2 set $name " . $a[1] . " " . $a[2]
|
||||||
|
if !defined( $a[3] );
|
||||||
|
Log3 $name, 2, "ENIGMA2 set $name " . $a[1] . " " . $a[2] . " " . $a[3]
|
||||||
|
if defined( $a[3] );
|
||||||
|
|
||||||
if ( $hash->{READINGS}{state}{VAL} ne "absent" ) {
|
if ( $hash->{READINGS}{state}{VAL} ne "absent" ) {
|
||||||
if ( !defined( $a[2] ) ) {
|
if ( !defined( $a[2] ) ) {
|
||||||
@ -527,6 +530,8 @@ sub ENIGMA2_Set($@) {
|
|||||||
$cmd = "command=" . ENIGMA2_GetRemotecontrolCommand( $a[2] );
|
$cmd = "command=" . ENIGMA2_GetRemotecontrolCommand( $a[2] );
|
||||||
$cmd .= "&rcu=" . $attr{$name}{remotecontrol}
|
$cmd .= "&rcu=" . $attr{$name}{remotecontrol}
|
||||||
if defined( $attr{$name}{remotecontrol} );
|
if defined( $attr{$name}{remotecontrol} );
|
||||||
|
$cmd .= "&type=long"
|
||||||
|
if ( defined( $a[3] ) && lc( $a[3] ) eq "long" );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $commandKeys = "";
|
my $commandKeys = "";
|
||||||
@ -1573,7 +1578,8 @@ sub ENIGMA2_ReceiveCommand($$$) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
defined( $servicetype[2] )
|
defined( $servicetype[2] )
|
||||||
&& ( $servicetype[2] eq "2" || $servicetype[2] eq "10" )
|
&& ( $servicetype[2] eq "2"
|
||||||
|
|| $servicetype[2] eq "10" )
|
||||||
&& ( !defined( $hash->{READINGS}{input}{VAL} )
|
&& ( !defined( $hash->{READINGS}{input}{VAL} )
|
||||||
|| $hash->{READINGS}{input}{VAL} ne
|
|| $hash->{READINGS}{input}{VAL} ne
|
||||||
"radio" )
|
"radio" )
|
||||||
@ -1820,7 +1826,8 @@ sub ENIGMA2_ReceiveCommand($$$) {
|
|||||||
|
|
||||||
$recordingsNext_time =
|
$recordingsNext_time =
|
||||||
$return->{e2timer}{e2startprepare};
|
$return->{e2timer}{e2startprepare};
|
||||||
$recordingsNext_time_hr = sprintf( "%02d:%02d:%02d", $t[2], $t[1], $t[0] );
|
$recordingsNext_time_hr =
|
||||||
|
sprintf( "%02d:%02d:%02d", $t[2], $t[1], $t[0] );
|
||||||
$recordingsNext_counter = int( $timeleft + 0.5 );
|
$recordingsNext_counter = int( $timeleft + 0.5 );
|
||||||
$recordingsNextServicename =
|
$recordingsNextServicename =
|
||||||
$return->{e2timer}{e2servicename};
|
$return->{e2timer}{e2servicename};
|
||||||
@ -1828,7 +1835,8 @@ sub ENIGMA2_ReceiveCommand($$$) {
|
|||||||
|
|
||||||
# human readable
|
# human readable
|
||||||
my @t2 = localtime($timeleft);
|
my @t2 = localtime($timeleft);
|
||||||
$recordingsNext_counter_hr = sprintf( "%02d:%02d:%02d",
|
$recordingsNext_counter_hr =
|
||||||
|
sprintf( "%02d:%02d:%02d",
|
||||||
$t2[2] - 1,
|
$t2[2] - 1,
|
||||||
$t2[1], $t2[0] );
|
$t2[1], $t2[0] );
|
||||||
}
|
}
|
||||||
@ -1885,19 +1893,24 @@ sub ENIGMA2_ReceiveCommand($$$) {
|
|||||||
|| $timeleft < $recordingsNext_time - time() )
|
|| $timeleft < $recordingsNext_time - time() )
|
||||||
{
|
{
|
||||||
my @t =
|
my @t =
|
||||||
localtime( $return->{e2timer}[$i]{e2startprepare} );
|
localtime(
|
||||||
|
$return->{e2timer}[$i]{e2startprepare} );
|
||||||
|
|
||||||
$recordingsNext_time =
|
$recordingsNext_time =
|
||||||
$return->{e2timer}[$i]{e2startprepare};
|
$return->{e2timer}[$i]{e2startprepare};
|
||||||
$recordingsNext_time_hr = sprintf( "%02d:%02d:%02d", $t[2], $t[1], $t[0] );
|
$recordingsNext_time_hr =
|
||||||
|
sprintf( "%02d:%02d:%02d",
|
||||||
|
$t[2], $t[1], $t[0] );
|
||||||
$recordingsNext_counter = $timeleft;
|
$recordingsNext_counter = $timeleft;
|
||||||
$recordingsNextServicename =
|
$recordingsNextServicename =
|
||||||
$return->{e2timer}[$i]{e2servicename};
|
$return->{e2timer}[$i]{e2servicename};
|
||||||
$recordingsNextName = $return->{e2timer}[$i]{e2name};
|
$recordingsNextName =
|
||||||
|
$return->{e2timer}[$i]{e2name};
|
||||||
|
|
||||||
# human readable
|
# human readable
|
||||||
my @t2 = localtime($timeleft);
|
my @t2 = localtime($timeleft);
|
||||||
$recordingsNext_counter_hr = sprintf( "%02d:%02d:%02d",
|
$recordingsNext_counter_hr =
|
||||||
|
sprintf( "%02d:%02d:%02d",
|
||||||
$t2[2] - 1,
|
$t2[2] - 1,
|
||||||
$t2[1], $t2[0] );
|
$t2[1], $t2[0] );
|
||||||
}
|
}
|
||||||
@ -2988,7 +3001,8 @@ sub ENIGMA2_GetRemotecontrolCommand($) {
|
|||||||
<b>statusRequest</b> - requests the current status of the device
|
<b>statusRequest</b> - requests the current status of the device
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>remoteControl</b> UP,DOWN,... - sends remote control commands; see remoteControl help
|
<b>remoteControl</b> UP,DOWN,... - sends remote control commands; see remoteControl help for full command list<br />
|
||||||
|
Note: You may add the word "long" after the command to simulate a long key press.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>showText</b> text - sends info message to screen to be displayed for 8 seconds
|
<b>showText</b> text - sends info message to screen to be displayed for 8 seconds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user