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: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

So first are you using the actions from XBMC2\Buttons\Remote? as those have different actions based on where you are in XBMC and can be changed in the Keymaps\remote.xml.
sunny25a wrote:Well, this is not really a specific one. I just use different actions with one key. Let give you two examples:
- I have a key exit on my remote. During media playback it just stops the video. Only in HomeScreen XBMC closes. With the help of the keymap.xml I could easily do that.
You could use any button in XBMC2\Buttons\Remote\ that you don't use and modify Keymaps\remote.xml for that button to do the same.
- I have an Info key on my remote. During media Playback the menu appears, on the home Screen the System Info appears, using it on a selected media, file the info for this appears.
A bit depending on the skin you use XBMC2\Buttons\Remote\Info should work similar or again you can modify Keymaps\remote.xml to make it work exactly like you want.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Lunatixz »

Hoping someone could help... I would like eventghost to receive a trigger when a xbmc addon starts and stops...
I had it setup to receive broadcasts events and modified my addons to send start and stop triggers...
but this method isn't working in frodo... anyone know of an easy alternative?
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

Lunatixz wrote:Hoping someone could help... I would like eventghost to receive a trigger when a xbmc addon starts and stops...
I had it setup to receive broadcasts events and modified my addons to send start and stop triggers...
but this method isn't working in frodo... anyone know of an easy alternative?
viewtopic.php?f=9&t=1562&start=570#p24845 has the links that work for me with Frodo RC2. I'll try RC3 soon, but I doubt there's much change.
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Lunatixz »

I appreciate the links... Didn't really find any useful information. I'm currently already running the latest code for EG... and all httpapi support in xbmc was dropped.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Lunatixz wrote:Hoping someone could help... I would like eventghost to receive a trigger when a xbmc addon starts and stops...
I had it setup to receive broadcasts events and modified my addons to send start and stop triggers...
As far as I have read the broadcast events are still available in Frodo it just can't be controlled right now, don't know what the plan is.
but this method isn't working in frodo... anyone know of an easy alternative?
You should be able to create events using the JSON notification: JSONRPC.NotifyAll.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

Lunatixz wrote:I appreciate the links... Didn't really find any useful information. I'm currently already running the latest code for EG... and all httpapi support in xbmc was dropped.
I just installed the latest XBMC: Frodo RC3 and using the latest plugin by jonib, I get all the proper events in the EventGhost. I think it uses JSON rather than HTTP now, but however it works, it works. :)
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Lunatixz »

blaher wrote:
Lunatixz wrote:I appreciate the links... Didn't really find any useful information. I'm currently already running the latest code for EG... and all httpapi support in xbmc was dropped.
I just installed the latest XBMC: Frodo RC3 and using the latest plugin by jonib, I get all the proper events in the EventGhost. I think it uses JSON rather than HTTP now, but however it works, it works. :)
I understand it works, lol that's not what i'm asking...
Json isn't the same as Http, your receiving events because of the script jonb wrote :)
I'm looking for an easy way to use python to generate a event in EG... the old httpapi was easy to do... not sure about jsonrcp...
I was hoping someone knows of an easy way, otherwise I will have to look into it... I want to add eg events when a xbmc addons starts and stops... in the past I modified the xbmc addons to use httpapi event... but this isn't working for json...
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

Lunatixz wrote: I understand it works, lol that's not what i'm asking...
Ah ok, sorry. :)
I want to add eg events when a xbmc addons starts and stops.
Ah, I see. What do you use those for?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Lunatixz wrote:I'm looking for an easy way to use python to generate a event in EG... the old httpapi was easy to do... not sure about jsonrcp...
I was hoping someone knows of an easy way, otherwise I will have to look into it... I want to add eg events when a xbmc addons starts and stops... in the past I modified the xbmc addons to use httpapi event... but this isn't working for json...
Try the below code in a Python script in EventGhost to create a custom event from XBMC.
There's a bit more code than necessary, it's from my test program.
You might need to change the url to match your setup, then change the "sender", "message" and "data" for the actual event. syntax for JSONRPC.NotifyAll here

Code: Select all

import urllib2
import json

url = 'http://localhost:8080'
jsonrpcurl = url + '/jsonrpc'
postdata = '{"jsonrpc": "2.0", "method": "JSONRPC.NotifyAll", "params": {"sender":"Test", "message":"Testing", "data":"Any data"}, "id": "1"}'
request = urllib2.Request(jsonrpcurl, postdata)
request.add_header('Content-Type', 'application/json')
responce = json.loads(urllib2.urlopen(request).read())
print responce
Here seems to be instructions how to send JSON from XBMC plugins

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Lunatixz »

Thanks, I'll give it a try
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Lunatixz wrote:Thanks, I'll give it a try
So ware you able to get events from a plugin?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
gquiring
Posts: 9
Joined: Wed Feb 01, 2012 7:45 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by gquiring »

I had to reloaded my XBMC PC due to a Crucial m4 failure. I am not understanding what I am doing wrong. I installed EG 0.4.1r1610, then configuration, add plugin, XBMC2.

Then I loaded my backup XML file (gq3.xml) and I get unknown plugin XBMC2. I attached a screen cap and my XML file.
Attachments
gq3.xml
(68.04 KiB) Downloaded 143 times
xbmc2.JPG
gquiring
Posts: 9
Joined: Wed Feb 01, 2012 7:45 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by gquiring »

I resolved the problem, the GUID changed. Why does app need this since it has a name 'XBMC2'?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

gquiring wrote:Why does app need this since it has a name 'XBMC2'?
I guess it was added so two plugins that happen to have the same name wouldn't conflict as long as they have unique GUIDs.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
piipes
Posts: 34
Joined: Wed Mar 23, 2011 12:21 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by piipes »

How i can get xbmc power saving/iddle command to eventghost? I want to run some commands before pc goes to sleep.
Post Reply