Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Support for XBMC2 plugin (formerly XBMCRepeat)

Questions and comments specific to a particular plugin should go here.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by jonib »

jesterod wrote:well i fixed the problem i had with it loading but it wont send a message to my old xbox it does send to the windows based xbmc tho so i guess my xbox ver is to old witch kinda sucks
It should work to send to the XBOX, check that you have the right IP and port for the XBOX, I'll do some testing after I eat.

Edit: Works on my XBOX.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jesterod
Posts: 44
Joined: Mon Sep 13, 2010 11:09 am

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by jesterod »

yea i have the port right the ip right does it matter that the command files are not in the root to control it i have to go to http://xbox/xbox1
or xbox or ajax
EDIT:
xbox xbmc ver is "xbmc 9.04r19856(compiled: may 9 2009)
EDIT2:
yea i tryed it on a newer version that i have on the xbox and it worked
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by Livin »

jonib,
You are doing a great job on this!

Can you also build in functionality to make this an Event Receiver also (to replace the HTTP one)? I think it would be a great addition and would allow us to trigger EG Macros based on events received from XBMC. Looks like the JSON interface will also be more descriptive on what it is doing so we can have very specific triggers based on the event and the payload.. yes?
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
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by jonib »

Livin wrote:You are doing a great job on this!
Thanks, 8) have you tried any of the new commands?
Can you also build in functionality to make this an Event Receiver also (to replace the HTTP one)?
I've been thinking of adding it. But I wanted the current stuff working first, then I need to check out how the event stuff works.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by Livin »

I tried replacing the previous .py with your new one and it did not work.

I get these errors...

10:33:27 AM Right
10:33:27 AM XBMC.RemoteRight()
10:33:27 AM Error in Action: "XBMC.RemoteRight()"
10:33:27 AM Traceback (most recent call last) (1262):
10:33:27 AM File "<string>", line 1, in <module>
10:33:27 AM NameError: name 'XBMC' is not defined

nothing else in my config changed.
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
giantpopples
Posts: 13
Joined: Fri Mar 26, 2010 7:34 pm

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by giantpopples »

Hi !

I tried the beta version of your plugin with json support. It works very well for me !
I tried using action and also from within scripts and it works great !!

I also tried the "send message" action without any flaws, using XBMC dharma beta 2 on windows.

The only thing missing now is the receive event part, maybe using the broadcast functionality of XBMC but that way you get minimal information like playbackstarted, ended, stopped etc.. Sometimes you get the name of the files but not everytime..

I use some python xPL lib to broadcast these kind of event from XBMC and use your plugin to get more information, using the best of 2 worlds ! :D

Also, thanks to your plugin, one can add all the information on xbmc from a customized eventghost web interface, to incorporate it nicely to their home automation ui !

Thanks again for your work !!!
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by Livin »

If the JSON interface will send XBMC events, including payload info, this would be very useful for home automation. I can see using this in conjunction with the web UI and the Android UI to create some nice interfaces.

I already have some code that will generate ASP pages for my Homeseer app, I could likely code it to include EventGhost Macros and any other info EG will publish via HTTP.

giantpopples, do you have coding experience in Python, ASP, etc?
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
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by jonib »

Livin wrote:I tried replacing the previous .py with your new one and it did not work.

I get these errors...

10:33:27 AM Right
10:33:27 AM XBMC.RemoteRight()
10:33:27 AM Error in Action: "XBMC.RemoteRight()"
10:33:27 AM Traceback (most recent call last) (1262):
10:33:27 AM File "<string>", line 1, in <module>
10:33:27 AM NameError: name 'XBMC' is not defined

nothing else in my config changed.
That's weird, only way I can get that kind of error is if I add an action from the test version that is not available on the old version, and then put in the old version of the plugin.

Did you get any error when you started EventGhost?

Only way you should get that exact error is if you put in the original XBMC plugin over XBMCRepeat.

Does it work if you put back the previous plugin?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by jonib »

giantpopples wrote:I tried the beta version of your plugin with json support. It works very well for me !
Cool 8) Thanks for testing and for the feedback.
I also tried the "send message" action without any flaws, using XBMC dharma beta 2 on windows.
What Windows (XP/Vista/7 and 32bit/64bit)?
The only thing missing now is the receive event part, maybe using the broadcast functionality of XBMC but that way you get minimal information like playbackstarted, ended, stopped etc.. Sometimes you get the name of the files but not everytime..
I will look into it if there are no big problems with the new actions.
I use some python xPL lib to broadcast these kind of event from XBMC and use your plugin to get more information, using the best of 2 worlds ! :D
Could you provide more info about "some python xPL lib"?
Thanks again for your work !!!
You're very welcome.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by Livin »

jonib wrote:
Livin wrote:I tried replacing the previous .py with your new one and it did not work.

I get these errors...

10:33:27 AM Right
10:33:27 AM XBMC.RemoteRight()
10:33:27 AM Error in Action: "XBMC.RemoteRight()"
10:33:27 AM Traceback (most recent call last) (1262):
10:33:27 AM File "<string>", line 1, in <module>
10:33:27 AM NameError: name 'XBMC' is not defined

nothing else in my config changed.
That's weird, only way I can get that kind of error is if I add an action from the test version that is not available on the old version, and then put in the old version of the plugin.

Did you get any error when you started EventGhost?

Only way you should get that exact error is if you put in the original XBMC plugin over XBMCRepeat.

Does it work if you put back the previous plugin?

jonib

It did not error on initial load, only with button presses.
I had to restore my previous config XML and the .5 plugin to get it working again.
I'll try it again on your next update or next weekend... time depending. I have some other things I need to do before I get time again.

Really looking forward to event capturing from JSON. Hopefully it will provide us some robust triggering.
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
giantpopples
Posts: 13
Joined: Fri Mar 26, 2010 7:34 pm

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by giantpopples »

Hi!

@Livin: I do not know asp, i program in php/sql, a little bit of python (mainly to understand eventghost and xbmc :lol: ), but if i could help you with anything i'd be glad.

@jonib : I tested it in windows 7 x64, both for the server running eventghost, and for xbmc which is on another computer.
To incorporate xPL in python, i used xPLlib, downloaded here: http://www.dunnewind.net/index.php/page ... que/python

It was made by a french programmer who works on the very promising domogik project.
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by Livin »

@giantpopples
Why is xPL needed? I'd think sending via HTTP POSTs would be less code, and less complicated?
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
srs
Posts: 9
Joined: Thu Dec 18, 2008 7:53 pm

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by srs »

hi jonib,

I have made a small change to the ButtonPrototype class to allow for better handling of enduring events:

Code: Select all

class ButtonPrototype(eg.ActionClass):
    def __call__(self):
        try:
            if eg.event.shouldEnd.isSet():
                packet = PacketBUTTON(map_name=str("R1"), button_name=str(self.value), repeat=0)
                packet.send(self.plugin.xbmc.sock, self.plugin.xbmc.addr, self.plugin.xbmc.uid)
            else:
                packet = PacketBUTTON(map_name=str("R1"), button_name=str(self.value))
                packet.send(self.plugin.xbmc.sock, self.plugin.xbmc.addr, self.plugin.xbmc.uid)
                eg.event.shouldEnd.wait()
                self.plugin.xbmc.release_button()                
        except:
            raise self.Exceptions.ProgramNotRunning
I think this works better because XBMC then handles when and how to repeat events. For example when you hold the down arrow on the keyboard, XBMC will stop at the bottom of a list instead of wrapping around to the top. This behaviour still doesn't happen for event clients because it is not implemented yet by xbmc, but the plugin can still be ready for when this is implemented for eventclients.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by jonib »

srs wrote:I think this works better because XBMC then handles when and how to repeat events. For example when you hold the down arrow on the keyboard, XBMC will stop at the bottom of a list instead of wrapping around to the top. This behaviour still doesn't happen for event clients because it is not implemented yet by xbmc, but the plugin can still be ready for when this is implemented for eventclients.
Nice :) , looks interesting.
When I first started to work on this plugin repeat was something I wanted to work, but the remote plugin I used Hauppauge didn't seem to work properly when a button was held down, and that's where the plugin got it's name. :P

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
badubo
Posts: 3
Joined: Sun Oct 10, 2010 3:23 pm

Re: XBMCRepeat XBMC plugin based on the official plugin

Post by badubo »

Hello,
I find your pluggin really useful.
I tested some JSOn commands and it works pretty well. But I have a question, how can we use the result (return) of the commands?
I can see it in the log viewer, but I don't know how I can use them in a script or in another action?
i.e. I want to check which player is active (audio, video,...) and select the correct action according to the result
Any help?
Post Reply