2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

ENIGMA2: add attribute remotecontrol=[standard,advanced,keyboard]

git-svn-id: https://svn.fhem.de/fhem/trunk@6158 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2014-06-24 10:13:45 +00:00
parent c2a6d11f08
commit 324da7c7b1
2 changed files with 24 additions and 15 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- feature: 70_ENIGMA2: add attribute remotecontrol=[standard,advanced,keyboard]
- bugfix: 70_PIONEERAVR.pm and PIONEERAVRZONE.pm: added "use SetExtensions", commandref updates
fixed RC_layout
- feature: new modules 70_PIONEERAVR.pm and PIONEERAVRZONE.pm

View File

@ -24,7 +24,7 @@
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
#
#
# Version: 1.3.2
# Version: 1.3.4
#
# Major Version History:
# - 1.3.0 - 2013-12-21
@ -78,7 +78,7 @@ sub ENIGMA2_Initialize($) {
$hash->{UndefFn} = "ENIGMA2_Undefine";
$hash->{AttrList} =
"https:0,1 http-method:GET,POST disable:0,1 bouquet-tv bouquet-radio timeout "
"https:0,1 http-method:GET,POST disable:0,1 bouquet-tv bouquet-radio timeout remotecontrol:standard,advanced,keyboard "
. $readingFnAttributes;
$data{RC_layout}{ENIGMA2_DreamMultimedia_DM500_DM800_SVG} =
@ -522,6 +522,8 @@ sub ENIGMA2_Set($@) {
}
elsif ( $request ne "" ) {
$cmd = "command=" . ENIGMA2_GetRemotecontrolCommand( $a[2] );
$cmd .= "&rcu=" . $attr{$name}{remotecontrol}
if defined( $attr{$name}{remotecontrol} );
}
else {
my $commandKeys = "";
@ -871,15 +873,13 @@ sub ENIGMA2_SendCommand($$;$$) {
$timeout = $attr{$name}{timeout};
}
else {
$timeout = 6;
$timeout = 3;
}
# send request via HTTP-GET method
if ( $http_method eq "GET" || $http_method eq "" || $cmd eq "" ) {
Log3 $name, 5, "ENIGMA2 $name: GET " . urlDecode($URL);
# $response = GetFileFromURL( $URL, $timeout, undef, 0, 5 );
HttpUtils_NonblockingGet(
{
url => $URL,
@ -904,8 +904,6 @@ sub ENIGMA2_SendCommand($$;$$) {
. " (POST DATA: "
. urlDecode($cmd) . ")";
# $response = GetFileFromURL( $URL, $timeout, $cmd, 0, 5 );
HttpUtils_NonblockingGet(
{
url => $URL,
@ -940,7 +938,9 @@ sub ENIGMA2_ReceiveCommand($$$) {
my $service = $param->{service};
my $cmd = $param->{cmd};
my $state =
( $hash->{READINGS}{state}{VAL} ) ? $hash->{READINGS}{state}{VAL} : "";
( $hash->{READINGS}{state}{VAL} )
? $hash->{READINGS}{state}{VAL}
: "";
my $type = ( $param->{type} ) ? $param->{type} : "";
my $return;
@ -1710,8 +1710,7 @@ sub ENIGMA2_ReceiveCommand($$$) {
$t[1], $t[0] );
}
else {
$timestring =
substr(
$timestring = substr(
FmtDateTime( $eventNow->{$e2reading} ),
11 );
}
@ -1747,8 +1746,7 @@ sub ENIGMA2_ReceiveCommand($$$) {
$t[1], $t[0] );
}
else {
$timestring =
substr(
$timestring = substr(
FmtDateTime( $eventNext->{$e2reading} ),
11 );
}
@ -2392,7 +2390,9 @@ sub ENIGMA2_GetRemotecontrolCommand($) {
'MACRO' => 112,
'MUTE' => 113,
'VOLUMEDOWN' => 114,
'VOLDOWN' => 114,
'VOLUMEUP' => 115,
'VOLUP' => 115,
'POWER' => 116,
'KPEQUAL' => 117,
'KPPLUSMINUS' => 118,
@ -2556,7 +2556,9 @@ sub ENIGMA2_GetRemotecontrolCommand($) {
'YELLOW' => 400,
'BLUE' => 401,
'CHANNELUP' => 402,
'CHANUP' => 402,
'CHANNELDOWN' => 403,
'CHANDOWN' => 403,
'FIRST' => 404,
'LAST' => 405,
'AB' => 406,
@ -2670,13 +2672,16 @@ sub ENIGMA2_GetRemotecontrolCommand($) {
<b>mute</b> on,off,toggle &nbsp;&nbsp;-&nbsp;&nbsp; controls volume mute
</li>
<li>
<b>play</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; starts/resumes playback
<b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts/resumes playback
</li>
<li>
<b>pause</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; pauses current playback or enables timeshift
<b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; pauses current playback or enables timeshift
</li>
<li>
<b>stop</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; stops current playback
<b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stops current playback
</li>
<li>
<b>record</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts recording of current channel
</li>
<li>
<b>input</b> tv,radio &nbsp;&nbsp;-&nbsp;&nbsp; switches between tv and radio mode
@ -2756,6 +2761,9 @@ sub ENIGMA2_GetRemotecontrolCommand($) {
<li>
<b>https</b> - Access box via secure HTTP (true/false)
</li>
<li>
<b>remotecontrol</b> - Explicitly set specific remote control unit format. This will only be considered for set-command <strong>remoteControl</strong> as of now.
</li>
<li>
<b>timeout</b> - Set different polling timeout in seconds (default=6)
</li>