I have eventshost up and running well on my HTPC system where I have XBMC and BeyondTV running. The XBMC plug works like a champ. I was thinking of diving into creating a plugin for BeyondTV. Don't know much about python but have programmed in C/C++ and VB. Thought I would dive it.
I tried to us the SageTV and Windows Media Player Classic plugins as models.
The WindowClass for BeyondTV is Streamzip.WM.D3D.
Unfortunately when I try and execute commands in the plugin I get an error message 'Appliction is not running".
I am sure it is something simple that I am missing.
What is the best way to debug the python based plugins.
Creating a plugin For BeyondTV
-
- Experienced User
- Posts: 102
- Joined: Wed Feb 17, 2010 2:20 am
Re: Creating a plugin For BeyondTV
Since you use XBMC and know C, why not build the PVR interface into XBMC? There is already a framework being built for XBMC for other PVRs - if you build the BTV interface I'd DEFINITELY use it! I'm sure MANY others will too.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
Re: Creating a plugin For BeyondTV
That error message is usually because a plugin (most likely the one you are working on) is trying a SendKeys operation on a FindWindow. If the target application isn't running, that message is displayed. Searching your plugin code for the string should get you there.
As for debugging, it is a little tricky because EG works to not show the user error messages and debugging output. I will often open the python shell (under EG's help) and try to run commands manually, where errors aren't trapped.
Brett
As for debugging, it is a little tricky because EG works to not show the user error messages and debugging output. I will often open the python shell (under EG's help) and try to run commands manually, where errors aren't trapped.
Brett
-
- Experienced User
- Posts: 102
- Joined: Wed Feb 17, 2010 2:20 am
Re: Creating a plugin For BeyondTV
The error is coming from the plugin I am working on. I used WinSpy to get the window class of the BeyondTV window. That came back as Streamzap.WM.D3D
The code seems to be pretty simple at this point so I am missing something obvious.
class ActionPrototype(eg.ActionClass):
def __call__(self):
try:
hWnd = FindWindow("Streamzap.WM.D3D")
return SendMessageTimeout(hWnd, WM_COMMAND, self.value, 0)
except:
raise self.Exceptions.ProgramNotRunning
I haven't had a chance to play with the PVR functionality in XBMC. Development on that branch was pretty quiet for a while but there have been several mentions of it recently. I believe they are currently interfacing the the recording functionality in MediaPortal.
The code seems to be pretty simple at this point so I am missing something obvious.
class ActionPrototype(eg.ActionClass):
def __call__(self):
try:
hWnd = FindWindow("Streamzap.WM.D3D")
return SendMessageTimeout(hWnd, WM_COMMAND, self.value, 0)
except:
raise self.Exceptions.ProgramNotRunning
I haven't had a chance to play with the PVR functionality in XBMC. Development on that branch was pretty quiet for a while but there have been several mentions of it recently. I believe they are currently interfacing the the recording functionality in MediaPortal.
Re: Creating a plugin For BeyondTV
If you add an action the "Find a Window" to your config (you can cancel once you get the info), you can use that to get the parameters you need for find window. Just drag the bullseye thingy (the technical term) to the target window. I'm guessing you are using the classname instead of the window name.
Brett
Brett