Page 11 of 94
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Fri Oct 01, 2010 1:48 am
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
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Fri Oct 01, 2010 1:59 am
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
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Fri Oct 01, 2010 5:39 pm
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?
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Fri Oct 01, 2010 6:22 pm
by jonib
Livin wrote:You are doing a great job on this!
Thanks,

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
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sat Oct 02, 2010 5:35 pm
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.
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sun Oct 03, 2010 1:39 pm
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 !
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 !!!
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sun Oct 03, 2010 3:42 pm
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?
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sun Oct 03, 2010 5:33 pm
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
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sun Oct 03, 2010 5:41 pm
by jonib
giantpopples wrote:I tried the beta version of your plugin with json support. It works very well for me !
Cool

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 !
Could you provide more info about
"some python xPL lib"?
Thanks again for your work !!!
You're very welcome.
jonib
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sun Oct 03, 2010 7:04 pm
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.
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Mon Oct 04, 2010 5:36 pm
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

), 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.
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Mon Oct 04, 2010 6:53 pm
by Livin
@giantpopples
Why is xPL needed? I'd think sending via HTTP POSTs would be less code, and less complicated?
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Mon Oct 04, 2010 11:20 pm
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.
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Tue Oct 05, 2010 1:46 am
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.
jonib
Re: XBMCRepeat XBMC plugin based on the official plugin
Posted: Sun Oct 10, 2010 3:30 pm
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?