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.
spitz66
Posts: 6
Joined: Wed Oct 14, 2009 4:42 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by spitz66 »

jonib wrote:
spitz66 wrote:Seems like it try to establish connection on port 80 and my XBMC listens on port 9514 for HTTP.
Tried to edit the "__init__.py" file and change to port 9514 but with no luck.
Your config worked for me so you added the actions correctly. I had to change the port by doubleclicking on the XBMC2 entry in the Autostart folder and changed from 80 to my port. Hopefully thats your problem.

jonib
Thanks alot, it finally works! :D

I had to specify login & password in the "__init__.py" file though, i.e replace on row 629:

responce = urllib.urlopen('http://'+self.ip+':'+self.port+'/xbmcCmds/xbmcHttp?command='+method+'('+urllib.quote(eg.ParseString(params), ':\\')+')').readlines()
with:
responce = urllib.urlopen('http://user:password@'+self.ip+':'+self.port+'/xbmcCmds/xbmcHttp?command='+method+'('+urllib.quote(eg.ParseString(params), ':\\')+')').readlines()

Might be good to be able to change that when doubleclicking on the XBMC2 entry in the Autostart folder as well?

Now when pausing LiveTV works, do you know how to send "record"? :wink:
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 »

spitz66 wrote:Thanks alot, it finally works! :D
Great :)
I had to specify login & password in the "__init__.py" file though, i.e replace on row 629:

responce = urllib.urlopen('http://'+self.ip+':'+self.port+'/xbmcCmds/xbmcHttp?command='+method+'('+urllib.quote(eg.ParseString(params), ':\\')+')').readlines()
with:
responce = urllib.urlopen('http://user:password@'+self.ip+':'+self.port+'/xbmcCmds/xbmcHttp?command='+method+'('+urllib.quote(eg.ParseString(params), ':\\')+')').readlines()

Might be good to be able to change that when doubleclicking on the XBMC2 entry in the Autostart folder as well?
I don't use the login so hadn't thought of it and nobody has requested it before. But it should be easy to add.
Now when pausing LiveTV works, do you know how to send "record"? :wink:
Sure, now that I know it works I can add all from this list. Hopefully it's complete.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
spitz66
Posts: 6
Joined: Wed Oct 14, 2009 4:42 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by spitz66 »

Sure, now that I know it works I can add all from this list. Hopefully it's complete.

jonib
Thanks for the link, I've now tried record, ffwd & rewind and they all work... :D
satheesh.net
Posts: 6
Joined: Sat Sep 15, 2012 9:50 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by satheesh.net »

Hi. How can I use this plugin to read XBMC events? I use the XBMC Event Receiver currently, but it doesn't really give me all the info I need. As far as I've noticed the XBMC Event Receiver is outdated and XBMC2 is the way to go. But I need to know how to listen to XBMC' events.

Anyone?
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 »

satheesh.net wrote:Hi. How can I use this plugin to read XBMC events? I use the XBMC Event Receiver currently, but it doesn't really give me all the info I need. As far as I've noticed the XBMC Event Receiver is outdated and XBMC2 is the way to go. But I need to know how to listen to XBMC' events.
You need to use the test version I posted here to get events support. I haven't had an opportunity to finish it so I haven't made a proper release, but it seems to work OK.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
satheesh.net
Posts: 6
Joined: Sat Sep 15, 2012 9:50 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by satheesh.net »

jonib wrote:
satheesh.net wrote:Hi. How can I use this plugin to read XBMC events? I use the XBMC Event Receiver currently, but it doesn't really give me all the info I need. As far as I've noticed the XBMC Event Receiver is outdated and XBMC2 is the way to go. But I need to know how to listen to XBMC' events.
You need to use the test version I posted here to get events support. I haven't had an opportunity to finish it so I haven't made a proper release, but it seems to work OK.

jonib
Thank you. I downloaded the file and I got more options now when adding the plugin. But can you please help me out on what exactly the values should be?
See attached screenshot. My XBMC is running on IP 192.168.1.105 and the current web port (http) is set to 9595 with username/password on. (I have already set the xbmcCmd/xbmcHttp?command-SetBroadcast&parameter=2,9595 and I know it's working, because of the XBMC Event Receiver plugin.

PS! I know the port number on the screenshot shows 80, but I changed it to 9595 without any luck...
Screenshot
Screenshot
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 »

satheesh.net wrote:But can you please help me out on what exactly the values should be?
From your screenshot, you need to change the 80 to your port as that is used when sending commands to XBMC. The JSON-RPC notification port is only used to get the JSON notifications from XBMC and that port needs to be changed in the advancedsettings.xml in XBMC.

The config dialog is not finished so is not too descriptive, and I will probably change stuff in there before a proper release.

I haven't added the ability to use a login/password so you will need to change the plugin, look here for an example.

Hopefully this is what you need to get it working.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
satheesh.net
Posts: 6
Joined: Sat Sep 15, 2012 9:50 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by satheesh.net »

jonib wrote:
satheesh.net wrote:But can you please help me out on what exactly the values should be?
From your screenshot, you need to change the 80 to your port as that is used when sending commands to XBMC. The JSON-RPC notification port is only used to get the JSON notifications from XBMC and that port needs to be changed in the advancedsettings.xml in XBMC.

The config dialog is not finished so is not too descriptive, and I will probably change stuff in there before a proper release.

I haven't added the ability to use a login/password so you will need to change the plugin, look here for an example.

Hopefully this is what you need to get it working.

jonib
Thank you for that, got it working. BUT, I only get informational events. I cannot use them as events... :shock:
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 »

satheesh.net wrote:Thank you for that, got it working. BUT, I only get informational events. I cannot use them as events... :shock:
OK, you kinda have to SHOW ME what you are getting, or I can't help you.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
satheesh.net
Posts: 6
Joined: Sat Sep 15, 2012 9:50 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by satheesh.net »

jonib wrote:
satheesh.net wrote:Thank you for that, got it working. BUT, I only get informational events. I cannot use them as events... :shock:
OK, you kinda have to SHOW ME what you are getting, or I can't help you.

jonib
Sorry, forgot the screenshot. Here you go:
Screenshot 2
Screenshot 2
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

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 »

satheesh.net wrote:Thank you for that, got it working. BUT, I only get informational events. I cannot use them as events... :shock:
So in your log you are getting the raw broadcasting events, to get actual usable events you probably need to uncheck the "Broadcast event workaround" as that is only needed if you get same events repeated.

Now the broadcast events are an older type of events that XBMC supports.

To use/activate the newer type of events JSON-RPC notifications that are probably more useful, you need to follow the instructions here.
The JSON-RPC events work a bit different to the broadcast events, so it can't be activated from the settings instead you need to use the XBMC2\Experimental\JSONRPCEventsConnect action, put it in a macro with Main.OnInit and Task.Created.XBMC events to trigger it.
Are you running XBMC and EventGhost on the same computer?

And here is the latest test version of the XBMC2 plugin.

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 »

I'm having connection issues... json, http connect, brodcast, but I can't send http or json request I get an application not running! error... at one point i was able to build a jsonrpc.dat, but not anymore, getting application not running! and of course xbmc is started!! My setup: xbmc2 plugin has my ip, and web port 8080, json ports left default 9090, 5, 5... and broadcast left default 8278 I think...
I also have the json connect action started... as mentioned in forum.

Any help would be great...
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 having connection issues... json, http connect, brodcast, but I can't send http or json request I get an application not running! error... at one point i was able to build a jsonrpc.dat, but not anymore, getting application not running! and of course xbmc is started!! My setup: xbmc2 plugin has my ip, and web port 8080, json ports left default 9090, 5, 5... and broadcast left default 8278 I think...
What XBMC version are you using? Is it on the same computer? Have you checked if your firewall/antivirus is interfering?
Almost always its a problem with wrong IP/port or some other software using the same port, so please double check both in the plugin and XBMC, also check in XBMC that it allows network control, also you can try another port.

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 »

jonib wrote:
Lunatixz wrote:I'm having connection issues... json, http connect, brodcast, but I can't send http or json request I get an application not running! error... at one point i was able to build a jsonrpc.dat, but not anymore, getting application not running! and of course xbmc is started!! My setup: xbmc2 plugin has my ip, and web port 8080, json ports left default 9090, 5, 5... and broadcast left default 8278 I think...
What XBMC version are you using? Is it on the same computer? Have you checked if your firewall/antivirus is interfering?
Almost always its a problem with wrong IP/port or some other software using the same port, so please double check both in the plugin and XBMC, also check in XBMC that it allows network control, also you can try another port.

jonib
No firewall or AV, XBMC is on the same system as eventghost; i'm running 11.01 final (EDEN) System receives json and broadcast events but won't build the dat for jsonrpc... I checked my appdata folders but no file, I have no problem building the httpapi dat...
Post Reply