Support
All support resources for our products. Here you can find answers to frequently asked questions, discuss with other users, recover a lost license code or file a support request.
Forum closed
This forum was closed and turned into an archive effective April 21, 2018. It is no longer possible to create new topics or reply to existing topics.

Thanks everyone for all the great questions and contributions over the years.

Please use the Contact form to get in touch.

Remote Buddy Forum

Overview 

AuthorThread
User

11.04.2011 01:47:54
EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
I know at some point this feature was behaving as expected but now Remote Buddy will NOT pause EyeTV when I switch to another behaviour.

To this end- I've implemented my own behaviour for EyeTV and I'm attempting to take it one step further and actually CLOSE the video windows when I switch over to Plex. This has been driving me UP THE WALL unfortunately for a few different reasons-

#1 - If I add an action to the Deactivation hook to close the EyeTV video windows it causes EyeTV to re-activate and steal focus from Plex (causing my Plex deactivation action to run- which kills Plex as I don't want Plex running if I'm not using it.)

#2 - If I try to use a simple "pause" script for the live video window in EyeTV rather than closing the video window the switch to Plex is much smoother however- if EyeTV has a hiccup and loses the stream for some reason- it will activate and steal focus from Plex! (As in #1 this kills the Plex process and switches me over to EyeTV so I can see the equally annoying "this channel is not available" message.)

I've tried everything I can find online in terms of scripting to close the EyeTV video windows asynchronously without activating the app. I know I could easily script this as a button press action but that's not the way I want to roll- I want EyeTV to act consistently when it is activated REGARDLESS of how it was activated- same with Plex, I want Plex to be killed off when it is deactivated so I'm not interested in "Switch to Plex" or "Switch to EyeTV" actions really as this seems very un home theater like.

I understand this is a bit rambling and off the initial subject, but does anyone have an end-all be-all set of behaviours that actually work for EyeTV and Plex? This shouldn't be that complicated and I shouldn't need to acquire a PhD in applescripting to reliably and consistently switch between a few apps using Remote Buddy. I suspect the "built-in" EyeTV and Plex behaviours would be better than the ones I've developed but the fact that I can't modify their Event Mappings makes them worthless for my implementation. Why is it that I don't even see a behaviours file for EyeTV in Application Support?

Thanks for your help! 

These entries from the FAQ may be relevant to this topic:

Configuration
General
Hardware - Apple® Remote
Hardware - EyeTV Receiver
Hardware - iPhone™ / iPod® touch / AJAX Remote
User

11.04.2011 15:01:11
Re: EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
Jason,

As I am quite happy with my "switch to Plex" (by closing live window and not actively de-activating EyeTV) and "switch to EyeTV" (by opening Live window) solution, I'm not entirely sure what you want to achieve. On my mini I simply run both applications in the background and call 1 forward I wish to use. I do not quit either app unless I put the Mac to sleep, and remote buddy simply activates the one I wish to use in the foreground.

Is there a special case where you playback recorded streams in EyeTV and want this to pause before you change over to Plex? Otherwise I don't see an issue with my above implementation and what you seem to wish yourself.

please explain a litte bit further so we can see if us users can help you

User

11.04.2011 15:11:42
Re: EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
Perhaps I'm approaching this wrong- how did you implement closing the Live TV window? I've had alot of trouble closing the window as part of the behaviour deactivation- this will usually cause the app to re-activate as I described in my initial post.

The reason I want to kill Plex is the process will average 25% of the CPU when it's running- that's alot of resources wasted as you're burning power for no reason there (my HTPC never sleeps- it's an always-on setup) The other reason I was killing Plex is I only recently discovered the "H" key mapping which will reliably stop any playing video and send Plex back to Home. Previously if you switched out of Plex it would just continue playing whatever was active and this is NOT a friendly setup. I plan to tinker around with sending the H key to Plex when deactivating but again I suspect this will cause Plex to re-activate.

User

11.04.2011 20:28:26
Re: EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
Well that is very simply really. I use 2 applescripts, one to switch to plex and one to switch back to eyetv:

Launch Plex: 
tell application "EyeTV" to close every window 
tell application "Plex" to activate

Obviously by closing the window before activating Plex will ensure you don't need to to activate EyeTV again. I ensure that EyeTV has always it's live window closed when another application is active as my other applescript shows:

tell application "EyeTV" to activate 
tell application "System Events" to keystroke "o" using {command down} <opens live window> 
tell application "System Events" to keystroke "0" using {command down} <makes windown fullscreen> 
tell application "Finder" 
set visible of process "Plex" to false <hides Plex screen as it remains on top otherwise> 
end tell

When I start my mini, I simply only start Plex and not EyeTV; the second applescript will also work fine if EyeTV has not been started yet. I scripted these as actions in remote buddy and can put them in any menu or button I want.

Advantage of this construction for me is that I can keep recording with EyeTV if I wish since I do not quit the program, but I can use Plex at the same time.

As far as CPU usage is concerned; Plex does indeed use 25% of a single core of my CPU, but EyeTV easily exceeds 130% so if any application should be closed to conserve CPU it is EyeTV :D. For me it's no issue however since I only run these two applications on my mini. I wonder why you will not it sleep though; it's very simple to wake the mac and have it start in a predefined configuration (like Plex up front or something similar). It also saves energy....

Last edited: 11.04.2011 20:32:22 

User

11.04.2011 20:45:45
Re: EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
I appreciate your response! I've tinkered with a setup just like this and you're absolutely right it does work fine. However it's not the "smooth" and contextual configuration I would prefer.

That's why I am attempting to use the Activate/Deactivate mappings on Remote Buddy behaviours. To me these (if they could be implemented successfully) are much more natural as they should be fired off REGARDLESS of how you "enter" or "exit" an application

EyeTV Deactivation tell application "EyeTV" to close every window 
EyeTV Activation tell application "EyeTV" to play; enter full screen 
Plex Deactivation tell application "System Events" to do shell script "killall Plex &"

If these 3 behaviour events actually worked then it wouldn't matter if you were switching from EyeTV to iTunes or Plex or anything, EyeTV will close all its windows, Plex will stop using resources and if you end up switching back to EyeTV then it will open the live TV window.

This implementation seems much more HTPC friendly to me and are what I was hoping to get from Remote Buddy. I've "sort of" got this working now by sticking each app (EyeTV and Plex) into their own Space, then allowing the OS to switch between the spaces. It _seems_ to be working and the transitions are pretty smooth so that's a nice bonus. EyeTV doesn't seem to be stealing focus with this setup, but in all this is still not quite as smooth as I would like. What would be FAR BETTER than the hacks I'm attempting to create is first class support from RB to implement the workflow. i.e.

************* Add an option to run the "deactivate" event handler for a behaviour BEFORE activating the next behaviour/application. This would enable me to "clean up" EyeTV before switching to another app and would likely solve ALL my issues with EyeTV in one swoop. This would also allow me to integrate something like Backdrop.app into the switching process to make the UI transition smooth, and being able to run a script BEFORE killing plex would allow me to open the EyeTV Live window and get it fullscreen BEFORE killing plex, so that transition would be much smoother as well.

This is why I'm currently experimenting with MythTV. I REALLY like the separation of concerns in Myth- there's a MythBackend daemon which is responsible for all recording and acts as a server for one or more MythFrontend clients. The frontend is FAR more capable than EyeTV- allowing you to manage recordings, schedule recordings, create "true" season passes, etc.. And when you switch to another app you can either kill the MythFrontend process or send it back to "home" where it doesn't seem to use any resources from what I can see (~ 4% of one CPU.) 

User

12.04.2011 13:24:20
Re: EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
Hi Jason,

I still don't really understand your issue; the scripts I used can easily be modified to be used regardless of whether any application is active or not. You could even choose to create a Plex on/off toggle script using if-then-else logic and put this under one of your remote buttons, and make a similar one for EyeTV. In those you can still insert logic concerning other applications (like close EyeTV live window if you activate Plex etc).

What you seem to search is to expand the basic "activate" function with some extra logic. Felix may enlighten us here, but in my understanding the action "activate" is a basic Apple function just like "quit application" is. Remote Buddy has these basic behaviours standard in the menu of every application you enable through Remote Buddy. I don't think it is possible to remove these basic functions from the menu. You can only add your own scripted actions. But if you do no use the on-screen menu of Remote Buddy but only the buttons on your remote for direct actions, I don't see why this 'hack' as you call it does not do exactly what you want.

It seems to me that the workflow you seek can be easily realized by some scripting... 

User

16.04.2011 04:40:47
EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
I am so close to idiot proofing my system.

Switching between Plex and EyeTV is a little inconsistent because you can't raise the Remote Buddy from within Plex, this is OK as I just quit Plex and my EyeTV which has been running along in the background sans Audio comes to the front and starts playing. The only issue is that because I am quitting Plex rather than deactivating its Remote Buddy behaviour the EyeTV remote behaviour doesn't activate automatically when EyeTV comes to the front.

Anyone have a fix for this? 

User

16.04.2011 10:01:01
Re: EyeTV behaviour deactivation is NOT pausing EyeTV - Making my EyeTV / Plex integration FRUSTRATING!
View

This posting is older than 6 months and can contain outdated information.
Remote Buddy will automatically switch to the correct Behaviour for the active application when it changes. This is with default settings.

You can, however, turn off automatic switching in two ways:

- at Prefs > General > Advanced, there is a setting to make the selection "stick" until the user explicitly deactivates a Behaviour via the menu. It's off by default.

- via Remote Buddy's AppleScript interface: it, too, offers the option to make a Behaviour selection "stick" until explicit deactivation by the user. The same command also allows the selection of particular Behaviours. You can find examples for its use in Remote Buddy's Applescript dictionary. A script listing all Behaviours' unique identifiers (you'll need these if you want to activate particular Behaviours from a script) is available in the FAQ.

Finally, please also check that Plex has actually quit. I remember at least two broken Plex releases where Plex would close its window, but not quit. Since it didn't quit, it kept the active application focus and Behaviours - technically fully correctly - wouldn't switch.

Best regards, 
Felix Schwarz