2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

YAMAHA_BD: support 95_remotecontrol.pm features

- new additional RC icons for YAMAHA BluRay Player
- recreated REWIND and FF RC button



git-svn-id: https://svn.fhem.de/fhem/trunk@8114 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2015-02-28 23:04:01 +00:00
parent 7ad9a2b049
commit f69c101bdf
23 changed files with 55 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # Do not insert empty lines here, update check depends on it.
- feature: YAMAHA_BD: support 95_remotecontrol.pm module features
- changed: Reverted to previous version. Module not working on RPi - changed: Reverted to previous version. Module not working on RPi
- feature: 71_PHILIPS_AUDIO: Implemented UPNP/DLNA player discovery. - feature: 71_PHILIPS_AUDIO: Implemented UPNP/DLNA player discovery.
- feature: 57_CALVIEW: added multiple CALENDAR support, reading source and location for terms - feature: 57_CALVIEW: added multiple CALENDAR support, reading source and location for terms

View File

@ -54,6 +54,10 @@ YAMAHA_BD_Initialize($)
$hash->{UndefFn} = "YAMAHA_BD_Undefine"; $hash->{UndefFn} = "YAMAHA_BD_Undefine";
$hash->{AttrList} = "do_not_notify:0,1 disable:0,1 request-timeout:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 model ". $hash->{AttrList} = "do_not_notify:0,1 disable:0,1 request-timeout:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 model ".
$readingFnAttributes; $readingFnAttributes;
$data{RC_layout}{YAMAHA_BluRay} = "YAMAHA_BD_RClayout";
$data{RC_makenotify}{YAMAHA_BD} = "YAMAHA_BD_RCmakenotify";
} }
################################### ###################################
@ -143,7 +147,7 @@ YAMAHA_BD_Set($@)
return "No Argument given" if(!defined($a[1])); return "No Argument given" if(!defined($a[1]));
my $what = $a[1]; my $what = $a[1];
my $usage = "Unknown argument $what, choose one of on:noArg off:noArg statusRequest:noArg tray:open,close remoteControl:up,down,left,right,return,enter,OSDonScreen,OSDstatus,topMenu,popupMenu,red,green,blue,yellow,0,1,2,3,4,5,6,7,8,9,setup,home,clear,program,search,repeat,repeat-AB,subtitle,angle,audio,pictureInPicture,secondVideo,secondAudio fast:forward,reverse slow:forward,reverse skip:forward,reverse play:noArg pause:noArg stop:noArg trickPlay:normal,repeatChapter,repeatTitle,repeatFolder,repeat-AB,randomChapter,randomTitle,randomAll,shuffleChapter,shuffleTitle,shuffleAll,setApoint"; my $usage = "Unknown argument $what, choose one of on:noArg off:noArg statusRequest:noArg tray:open,close remoteControl:eject,up,down,left,right,return,enter,OSDonScreen,OSDstatus,topMenu,popupMenu,red,green,blue,yellow,0,1,2,3,4,5,6,7,8,9,setup,home,clear,program,search,repeat,repeat-AB,subtitle,angle,audio,pictureInPicture,secondVideo,secondAudio,power fast:forward,reverse slow:forward,reverse skip:forward,reverse play:noArg pause:noArg stop:noArg trickPlay:normal,repeatChapter,repeatTitle,repeatFolder,repeat-AB,randomChapter,randomTitle,randomAll,shuffleChapter,shuffleTitle,shuffleAll,setApoint";
if($what eq "on") if($what eq "on")
{ {
@ -303,6 +307,14 @@ YAMAHA_BD_Set($@)
{ {
YAMAHA_BD_SendCommand($hash,"<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Play_Control><Stream>2nd Audio</Stream></Play_Control></Main_Zone></YAMAHA_AV>","remoteControl","secondAudio"); YAMAHA_BD_SendCommand($hash,"<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Play_Control><Stream>2nd Audio</Stream></Play_Control></Main_Zone></YAMAHA_AV>","remoteControl","secondAudio");
} }
elsif($a[2] eq "power")
{
YAMAHA_BD_SendCommand($hash,"<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Remote_Control><RC_Code>7C80</RC_Code></Remote_Control></Main_Zone></YAMAHA_AV>","remoteControl","repeat-AB");
}
elsif($a[2] eq "eject")
{
YAMAHA_BD_SendCommand($hash,"<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Remote_Control><RC_Code>7C81</RC_Code></Remote_Control></Main_Zone></YAMAHA_AV>","remoteControl","repeat-AB");
}
else else
{ {
return $usage; return $usage;
@ -769,6 +781,47 @@ YAMAHA_BD_ResetTimer($;$)
} }
} }
#############################
# define the layout for module 95_remotecontrol.pm
sub YAMAHA_BD_RClayout()
{
my @row;
$row[0] = "remoteControl eject:EJECT,:blank,:blank,remoteControl power:POWEROFF3";
$row[1] = "remoteControl red:RED,remoteControl green:GREEN,remoteControl yellow:YELLOW,remoteControl blue:BLUE";
$row[2] = "remoteControl 1:1,remoteControl 2:2,remoteControl 3:3,remoteControl repeat-AB:REPEAT_AB";
$row[3] = "remoteControl 4:4,remoteControl 5:5,remoteControl 6:6,remoteControl subtitle:SUBTITLE";
$row[4] = "remoteControl 7:7,remoteControl 8:8,remoteControl 9:9,remoteControl angle:ANGLE";
$row[5] = "remoteControl clear:CLEAR,remoteControl 0:0,remoteControl search:SEARCH,remoteControl audio:AUDIO2";
$row[6] = ":blank,:blank,:blank,:blank";
$row[7] = "remoteControl pictureInPicture:PIP,:blank,:blank,:blank";
$row[8] = "remoteControl secondAudio:2ND_AUDIO,remoteControl home:HOMEtxt,remoteControl setup:SETUP,:blank";
$row[9] = ":blank,:blank,:blank,:blank";
$row[10] = "remoteControl topMenu:TOPMENU,remoteControl up:UP,remoteControl popupMenu:POPUP_MENU,:blank";
$row[11] = "remoteControl left:LEFT,remoteControl enter:ENTER3,remoteControl right:RIGHT,:blank";
$row[12] = "remoteControl return:RETURN,remoteControl down:DOWN,remoteControl OSDonScreen:ONSCREEN,:blank";
$row[13] = ":blank,:blank,:blank,:blank";
$row[14] = "stop:STOP,pause:PAUSE,play:PLAY,:blank";
$row[15] = "slow reverse:SLOW_REWIND,slow forward:SLOW_FORWARD,fast reverse:REWIND,fast forward:FF";
$row[16] = ":blank,remoteControl OSDstatus:STATUS,skip reverse:SKIP_REVERSE,skip forward:SKIP_FORWARD";
$row[17] = "attr rc_iconpath icons/remotecontrol";
$row[18] = "attr rc_iconprefix black_btn_";
return @row;
}
#####################################
# Callback from 95_remotecontrol for command makenotify.
sub YAMAHA_BD_RCmakenotify($$)
{
my ($name, $dev) = @_;
my $new_name="notify_$name";
fhem("define $new_name notify $name set $dev ".'$EVENT',1);
Log3 undef, 2, "[remotecontrol:YAMAHA_BD] Notify created: $new_name";
return "Notify created by YAMAHA_BD: $new_name";
}
############################# #############################
# formats a 3 byte Hex Value into human readable time duration # formats a 3 byte Hex Value into human readable time duration

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB