SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations > SageMC Custom Interface

Notices

SageMC Custom Interface This forum is for discussing the user-created SageMC custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-23-2009, 04:29 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Utility: Netflix Control v0.9 - A Netflix Silverlight Remote Control Script

Netflix Control is an AutoHotKey script for controlling a Netflix Silverlight Watch Now Movie Viewer running under Internet Explorer with a remote control. While it was made as an aid to users of the SageMC NetFlix Import that are stuck with a Silverlight account, it does not require SageTV or the SageMC Netflix Import to function. All it requires is AutoHotKey, a Netflix Silverlight account, and Internet Explorer.

Now Included with SageMC Netflix:
No need to to install Netflix Control if using with SageMC Netflix. Simply install and configure SageMC NetFlix Import v2.1 or greater. You should not need to change your SageTV remote configuration at all. If you were previously using Netflix Control with SageMC Netflix, remove and restore your SageTV remote configuration to the way it was before using Netflix Control. Then continue with the installation of SageMC Netflix v2.1 (or greater).

Overview:
Netflix Control runs in the background waiting until a Netflix Viewer running in Internet Explorer becomes active. It will then force the Netflix Viewer into full screen, translating keys into the necessary mouse movements for controlling the viewer.

Netflix Control can:
- Jump forward and backward in the time line
- Change episodes
- Play/Pause
- Mute/Unmute
- Adjust Volume
- Close the Netflix Movie Viewer

Key definitions in Netflix Control:
CTRL-a or Left Arrow: Jump back in the time line
CTRL-s or Right Arrow: Jump ahead in the time line
CTRL-f : Change to next episode (for titles that have episodes)
CTRL-b : Change to previous episode (for titles that have episodes)
F10 : Increase Volume
F9 : Decrease Volume
F8 : Toggle Mute/Unmute
CTRL-p : Toggle Play/Pause
CTRL-e : Close Netflix Viewer / IE window

If you have a remote or keyboard that use the standard windows media keys/buttons, the following also work:
STOP : Close Netflix Viewer / IE window
Next Track: Change to next episode (for titles that have episodes)
Previous Track : Change to previous episode (for titles that have episodes)
Volume + : Increase Volume
Volume - : Decrease Volume
Mute : Toggle Mute/Unmute

Installation:

1) If you have a previous version of Nerflix Control installed, please delete it, and any support files (like the "netflix_player_buttons" folder) to remove any possible confusion before installing the new version.

2) Download Netflix Control v0.9 and extract to an appropriate location. No need for AutoHotKey, unless you plan on modifying the Netflix Control scripts.

Using with EventGhost:

1) Download and install EventGhost. I use version 0.3.6.1487 (from the EventGhost "Nightly Builds")

2) Install the EventGhost plugin included with Netflix Control, as described in the plugin's readme file. (simple as copying the "NetflixSilverlightControl" plugin folder into EventGhost's plugin folder)

3) Start netflix_silverlight_control.exe (not netflix_control.exe) from the folder you extracted Netflix Control to. (Once you get things working, you'll likely want to add a shortcut to netflix_silverlight_control.exe in your Startup folder)

4) Download and extract the "NetflixControl_EventGhost_Template_v0.1.xml" EventGhost template from NetflixControl_EventGhost_Template_v0.1.zip

5) Start EventGhost, and open up the file "NetflixControl_EventGhost_Template_v0.1.xml" from step 4

6) Adding your remote plugin to the NetflixControl_EventGhost_Template_v0.1 in EventGhost:
a) From the EventGhost Menu, select "Configuration -> Add Plugin"

b) In the "Choose plugin to add..." window, select the applicable remote control device from the "Remote Receiver" branch, click "OK".

c) Configure the appropriate options for the remote receiver.

d) Once back to the main EventGhost window, expand the "EnableInputPluginOnOpen" branch.

e) Double click the "Enable: " action in the "EnableInputPluginOnOpen" branch.

f) In the "EventGhost: Enable an item" window, Expand the "Autostart" banch, and select the "Plugin: <name of remote plugin you selected>". Click "OK"

g) Once back to the main EventGhost window, expand the "DisableInputPluginOnClose" branch.

h) Double click the "Disable: " action in the "DiableInputPluginOnClose" branch.

i) In the "EventGhost: Disable an item" window, Expand the "Autostart" banch, and select the "Plugin: <name of remote plugin you selected>". Click "OK"
7) Mapping events from your remote to Netflix Control in EventGhost
a) Right-click "Plugin: <name of remote plugin you selected>", and make sure "Disable Item" is NOT checked.

b) Press a button on your remote. You should see an event pop-up in the left frame of EventGhost. If not, you may need to double click the "Plugin: <name of remote plugin you selected>" plugin and modify its configuration.

c) Expand the "Netflix Silverlight Control" tree in EventGhost.

d) Press a button on your remote that you want to assign to a Netflix function, like the stop button for example. You should see an event pop-up in the left frame.

e) Grab the event that popped up in step 7-d, and drag it to the Netflix Silverlight Control action you want to assign it to, like "Stop".

f) Repeat steps 7-d and 7-e until you assign all the buttons you desire.

g) Right-click "Plugin: <name of remote plugin you selected>", and make sure "Disable Item" IS checked. This will be enabled as necessary by EventGhost.
8) Save the EventGhost configuration file.

9) In EventGhost, select "File -> Options...". In the "Options" window, check "Launch on Windows Startup" and "Send to Systray on Close". Click "OK"

10) Open internet explorer, go to Netflix and start a Watch Now movie. The movie should automatically go full screen. If not, netflix_silverlight_control.exe is probably not running. run it.

11) Test your remote. If it works, report it back here. If not, double check all steps above, and finally check back here.


Using keyboard to control Netflix Control without EventGhost:

1) Start netflix_control.exe (not netflix_silverlight_control.exe. netflix_control.exe will automatically start netflix_silverlight_control.exe) from the folder you extracted Netflix Control to.

2) Open internet explorer, go to Netflix and start a Watch Now movie. The movie should automatically go full screen. If not, netflix_control.exe is probably not running. run it.

3) Test controlling Netflix using the keys described in "Key definitions in Netflix Control:", above.

4) Using a hauppauge 45 button remote with netflix_control.exe:
a) As the first item under [Applications] your rremote.ini add "NetflixControl=". This must be the first, default, item.

b) Add the following definitions to your rremote.ini

Code:
[NetflixControl]
BACK={ctrl}e
MUTE={F8}
VOLUP={F10}
VOLDOWN={F9}
CHNLUP={VK_UP}
CHNLDOWN={VK_DN}
NAVUP={VK_UP}
NAVDOWN={VK_DN}
NAVLEFT={ctrl}a
NAVRIGHT={ctrl}s
OK={enter}
STOP={ctrl}e
PAUSE={ctrl}p
PLAY={ctrl}p
REWIND={ctrl}a
FASTFWD={ctrl}s
SKIPFWD={ctrl}f
SKIPREV={ctrl}b
c) restart IR.EXE
Using SendMessage() to instruct Netflix Control from your application:

1) Start netflix_silverlight_control.exe (not netflix_control.exe) from the folder you extracted Netflix Control to.

2) Get the handle for netflix_silverlight_control.exe by searching for a window title of "NetflixSilverlightControl" with a class of "AutoHotKey". For example: hWnd = FindWindow("AutoHotkey", "NetflixSilverlightControl")

3) Launch a Netflix Silverlight Movie (open IE to a Watch Now movie using a Netflix Silverlight Account)

4) Send a message of "0x5555" to the window handle from step 2 with wParam of 10 and lParam between 100 and 110 (see table in 5, below, for details). Example: SendMessage(hWnd, 0x5555, 10, 100)

5) Table of lParam for use with wParam of 10:
100 - Exit the netflix movie viewer, and wait for a new viewer window to open

101 - Jump ahead in the timeline

102 - Jump back in the timeline

103 - Move to next Chapter/Episode

104 - Move to previous Chapter/Episode

105 - Play

106 - Pause

107 - Toggle play/pause

108 - Toggle Mute On/Off

109 - Move volume Up

110 - Move volume down
Modification:

If you know how to write autohotkey scripts, you can easily modify the keys bound to the different commands in netflix_control.ahk. The script source code is found the the src.zip file. The AutoHotKey documentation is a good place to start.

Change Log:

v0.9

- Made changes to hopefully resolve an issue where player button locations were not always properly detected. This resulted in the Netflix Player not going into full screen.

v0.8a:

- No changes made to the control scripts. Only change is the repair of the EventGhost plugin.

- Updated EventGhost plugin to version 0.2. Please do not use v0.1.x version of the plugin - it has many issues.

- NOTE: If you used the original EventGhost plugin from v0.8, please update to the v0.2 plugin. You will also need to remove the old plugin from your EventGhost script(s) and re-add it. Sorry for the inconvenience.

v0.8:

- Separated operations into two scripts; netflix_silverlight_control.exe and netflix_control.exe. netflix_silverlight_control.exe does the bulk of work, but does not listen for any keyboard or remote input. netflix_control.exe listens for keyboard input, and sends messages to netflix_silverlight_control.exe.

- Added EventGhost plugin for use with netflix_silverlight_control.exe (do not use netflix_control.exe with EventGhost, just netflix_silverlight_control.exe)

v0.6:

- Fixed: Netflix Navigation bar did not always become visible on some configurations, stopping commands from working.
Attached Files
File Type: zip NetflixControl_EventGhost_Template_v0.1.zip (709 Bytes, 2817 views)
File Type: zip netflix_control_v0.8a.zip (417.6 KB, 1260 views)
File Type: zip netflix_control_v0.9.zip (408.8 KB, 5131 views)

Last edited by brainbone; 02-28-2009 at 09:01 AM.
Reply With Quote
  #2  
Old 01-24-2009, 11:49 AM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Updated to version 0.6. See top post for details.
Reply With Quote
  #3  
Old 02-04-2009, 06:40 PM
SteveD's Avatar
SteveD SteveD is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Alabama
Posts: 228
Help with your control

I use a hauppauge 45 button remote with a usb-uirt. I do not understand how to program the ahk file to use this configuration.

Thanks
Steve

Last edited by SteveD; 02-09-2009 at 07:26 PM.
Reply With Quote
  #4  
Old 02-04-2009, 06:48 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
I would think Event Ghost may be the place to start, however its use may complicate your SageTV configuration.

Morgan111 is looking into the possibility of interfacing Netflix Control with the SageMC Netflix STVi at a lower level, possibly eliminating the complication that various different types of remotes can cause.
Reply With Quote
  #5  
Old 02-05-2009, 08:29 AM
alijiwani alijiwani is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 118
any chance a version of this script could be used to control HULU?
__________________
SageTV 6.5.4+Webserver 2.21+SageMC 6.3.8a, P4-2.8 Ghz, 1GB RAM, 120GB HD, 1.5TB HD, 500GB HD, PVR-150, PVR-350, AverMedia A180, ATI x1600 512MB AGP, Audigy Platinum EX, connected to an Sony 46XBR6 LCD via DVItoHDMI and Sony STR-DA2400ES receiver via 5.1 analog.
Reply With Quote
  #6  
Old 02-05-2009, 09:11 AM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
I don't see any reason why one couldn't be made, however I hesitate doing it because SageTV may soon have native support for hulu. It would also require an STVi, like the Netflix STVi, to navigate, select and launch the HULU programming for a hulu control script to use - and I don't yet have any experience in creating STVis.
Reply With Quote
  #7  
Old 02-12-2009, 03:34 AM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
I have gotten the .8a version of the plugin working with eventghost when opening netflix from internet explorer and choosing to play a movie now. It refuses to work when I launch the silverlight player through the sagetv netflix plugin. For some reason your autohotkey control is not "grabbing" or recognizing that the player is open when using through sage. Any suggestions?
Reply With Quote
  #8  
Old 02-12-2009, 06:56 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by panteragstk View Post
I have gotten the .8a version of the plugin working with eventghost when opening netflix from internet explorer and choosing to play a movie now. It refuses to work when I launch the silverlight player through the sagetv netflix plugin. For some reason your autohotkey control is not "grabbing" or recognizing that the player is open when using through sage. Any suggestions?
Did you follow the instructions? (See bolded below)

Quote:
Installation (Netflix Control v0.8+):

1) If you previously installed Netflix Control v0.6, delete it to remove any possible confusion.

2) Download Netflix Control v0.8a and extract to an appropriate location. No need for AutoHotKey, unless you plan on modifying the Netflix Control scripts.
Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #9  
Old 02-12-2009, 07:03 AM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Quote:
Originally Posted by panteragstk View Post
For some reason your autohotkey control is not "grabbing" or recognizing that the player is open when using through sage. Any suggestions?
Are you sure Netflix Control is running (green H in the systray)?

When the player is opened through Sage, is the "Full Screen" button completely visible? If not, please take a screen shot of what you see and post it here.

Is SageTV running in Fullsreen Exclusive Mode? (If it is, it could be causing issues)
Reply With Quote
  #10  
Old 02-12-2009, 01:40 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Did you follow the instructions? (See bolded below)
Yes. I only have his netflix silverlight control running. It works in IE mode only, but not when I open the player through sage.

Quote:
Are you sure Netflix Control is running (green H in the systray)?
Yes.

Quote:
When the player is opened through Sage, is the "Full Screen" button completely visible? If not, please take a screen shot of what you see and post it here.
The button is completely visible.

Quote:
Is SageTV running in Fullsreen Exclusive Mode? (If it is, it could be causing issues)[/
No fse.

This problem only happens when I open the internet explorer window/netflix player within sage. If I open it through the netflix website it works fine.
Reply With Quote
  #11  
Old 02-12-2009, 02:52 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Quote:
Originally Posted by panteragstk View Post
This problem only happens when I open the internet explorer window/netflix player within sage. If I open it through the netflix website it works fine.
Interesting. Please take a screen shot of the Netflix Player, immediately after Sage opens it, and post it here.
Reply With Quote
  #12  
Old 02-12-2009, 03:47 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
It may be a focus issue. You may need to add an event or something into Eventghost to make sure the browser windows has focus and that Sage or something hasn't grabbed focus.
panteragstk-if you mouse click on the browser window after it comes up in Sage does it work?

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #13  
Old 02-13-2009, 12:17 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Updated to v0.9

- Made changes to hopefully resolve an issue where player button locations were not always properly detected. This resulted in the Netflix Player not going into full screen.

See top post for details and download.
Reply With Quote
  #14  
Old 02-16-2009, 01:28 AM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
it still won't work for me. where can I learn to edit the autohotkey scripts so I can try to help fix this?
Reply With Quote
  #15  
Old 02-16-2009, 08:04 AM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Quote:
Originally Posted by panteragstk View Post
it still won't work for me. where can I learn to edit the autohotkey scripts so I can try to help fix this?
http://www.autohotkey.com/docs/

Copy netflix_silverlight_control.ahk from the src folder to the same location as netflix_silverlight_control.exe. Delete netflix_silverlightcontrol.exe. Install autohotkey. Now double click "netflix_silverlight_control.ahk" and make sure it works the same as the exe did. Open it in whatever text editor you prefer (I just use notepad). Edit at will. To compile to exe, simply right-click the .ahk file and select "compile".

Does the cursor move to the "full screen" button location?

After the changes to 0.9, (you also need to replace all the button graphics, not just the new exe) the script will attempt to click on the "full screen" button in the screen shot you sent me. I'm not sure why it wont on yours, but if the cursor at least gets to the "full screen" button location, then its probably just a timing issue.

Last edited by brainbone; 02-16-2009 at 10:56 PM.
Reply With Quote
  #16  
Old 02-21-2009, 12:31 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Netflix Control v2 test1:

Because of the various problems putting silverlight in full screen brings, I decided to test a different method of making the netflix silverlight player go "full screen". I say "full screen" in quotes because what this method actually does is just enlarge the browser window to the point where the movie takes up the full screen, then attempts to mask off any of the ugly bits of the browser.

The attached is a very early test of this method. It will have problems.

Note: If you use this on a system with more than one display, you will need to make sure IE is launched in kiosk mode (-k switch). Otherwise, bits of the IE window will be visible on your other display(s).

You will see flickering when the netflix navigation bar is displayed/hidden.

You may have problems with the player window, or black mask borders sticking at the topmost position. In this case, you'll need to go into task manager and kill IE and AutoHotKey.

You may have issues where your task-bar disappears.

EDIT: Use v2 test2, below.

Last edited by brainbone; 02-26-2009 at 08:54 AM.
Reply With Quote
  #17  
Old 02-22-2009, 02:21 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Netflix Control v2 test2:

This is an update to Netflix Control v2 test1, above.

Changes:

- Created "settings.ini" file to allow easy adjustment of how long the navigation bar takes to hide, if the TaskBar should be hidden or not, and the ability to specify a window that should be kept in focus.

- Mouse/Keyboard input is blocked while controlling the netflix silverlight player (during a click, etc.).

- Hiding/Showing of netflix player navigation bar should be more smooth.

Feedback would be appreciated.

EDIT: Use v2 test3, below.

Last edited by brainbone; 02-26-2009 at 08:54 AM.
Reply With Quote
  #18  
Old 02-23-2009, 09:21 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Netflix Control v2 test3:

This is an update to Netflix Control v2 test2, above.

Changes:

- Navigation buttons were not always properly located, especially if player needed to buffer for a long period of time. Make sure you replace the old "netflix_player_buttons" folder with the new v2 test3 one.

- Changed method for hiding/showing Windows TaskBar. Previous method forced "Always On Top" off after showing the taskbar.

As always, feedback appreciated.
Attached Files
File Type: zip netflix_control_v2_test3.zip (415.5 KB, 758 views)
Reply With Quote
  #19  
Old 02-12-2009, 03:47 PM
brainbone brainbone is offline
Sage Expert
 
Join Date: Oct 2006
Posts: 624
Quote:
Originally Posted by panteragstk View Post
s not "grabbing" or recognizing that the player is open when using through sage.
Just to clarify: When you say "not grabbing", I assume you mean that Netflix Control never clicks on the Full Screen button?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Control Very Sensitive GlennPT Hardware Support 5 11-09-2009 02:52 AM
Remote control - change IR frequency?? glennsantacruz SageTV Media Extender 1 12-18-2008 09:40 AM
JP1 Universal Remote Control (URC-1067) for Hauppauge MVP krasev Hardware Support 0 12-22-2007 12:02 PM
Remote Control issue with 6.2.4 pilotguy7ca Hardware Support 5 07-09-2007 12:56 PM
Firefly Remote - can it control TV? bialio Hardware Support 0 05-25-2007 01:34 PM


All times are GMT -6. The time now is 04:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.