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 »

DeeWay wrote:But I want to be my playlist list opens
Hopefully this is what you mean: HTTPAPI\ExecBuiltIn and ActivateWindow(10025,"special://profile/playlists/video/Penguins.xsp") for the command (change the playlist name).
XBMCPlaylist.PNG
jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
supertusse
Posts: 8
Joined: Sat Nov 20, 2010 10:12 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by supertusse »

Hello!

Does XBMC2 work with the new v12 alphas (aka nightlies?).

I've been running eventghost 0.3.7 and xbmc eden with xbmcrepeat for a long time, but decided I want to change to the 12 alphas because of some database improvements. Thing is, after upgrading xbmc, xbmcrepeat/xbmc2 doesn't work anymore. I also upgraded eventghost to the newest version available for download, to see if that would help.

No matter which eventghost version, eventghost + xbmc eden works fine. with xbmc 12 alpha I get messages like this:

Executing a video library scan action:

Code: Select all

19:32:30   XBMC2: JSONRPC: VideoLibrary.Scan
19:32:30      Error in Action: "XBMC2: JSONRPC: VideoLibrary.Scan"
19:32:30      Traceback (most recent call last) (1568):
19:32:30        File "H:\Program Files\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
19:32:30          return self(*args)
19:32:30        File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 890, in __call__
19:32:30          responce = self.plugin.JSON_RPC.send(method)
19:32:30        File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 681, in send
19:32:30          return json.loads(responce)
19:32:30        File "json\__init__.pyc", line 307, in loads
19:32:30        File "json\decoder.pyc", line 319, in decode
19:32:30        File "json\decoder.pyc", line 338, in raw_decode
19:32:30      ValueError: No JSON object could be decoded
Clicking "update" inside the xbmc2 plugin:

Code: Select all

19:33:49   Traceback (most recent call last) (1568):
19:33:49     File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 914, in OnUpdate
19:33:49       UpdateMethods()
19:33:49     File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 929, in UpdateMethods
19:33:49       responce = self.plugin.JSON_RPC.send('JSONRPC.Version')
19:33:49     File "H:\Program Files\EventGhost\plugins\XBMCRepeat\__init__.py", line 681, in send
19:33:49       return json.loads(responce)
19:33:49     File "json\__init__.pyc", line 307, in loads
19:33:49     File "json\decoder.pyc", line 319, in decode
19:33:49     File "json\decoder.pyc", line 338, in raw_decode
19:33:49   ValueError: No JSON object could be decoded
After reinstalling xbmc eden, everything is back to normal.

Regards,
tusse.
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 »

supertusse wrote:Does XBMC2 work with the new v12 alphas (aka nightlies?).
It did work :D . I just tried the last nightly and I'm getting errors too. So something in the response from XBMC must have changed (And there might be bugs in XBMC2 :wink: )

The normal control actions seems to work.

I'll look into it. I'm in the process of moving (from my analogue home) so I don't know when.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
supertusse
Posts: 8
Joined: Sat Nov 20, 2010 10:12 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by supertusse »

Hi again.

I did a small modification in the send method inside class XBMC_JSON_RPC. The 'try' block now reads:

Code: Select all

		try:
			#responce = urllib.urlopen('http://'+self.ip+':'+self.port+'/jsonrpc', json.dumps(self.jsoninit)).read()
			request = urllib2.Request('http://'+self.ip+':'+self.port+'/jsonrpc',json.dumps(self.jsoninit))
			request.add_header('Content-Type', 'application/json')
			responce = urllib2.urlopen(request).read()
I also had to add import urllib2 at the start of the program.

.. and it works again. :-) Seems like the trick is to add the content-type header for xbmc v12.

I have no idea if you really need to used urllib2 for this, or if you can do it differently with urllib, but it works.

tusse.
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 »

supertusse wrote:I did a small modification in the send method inside class XBMC_JSON_RPC. The 'try' block now reads:
Nice. Makes my job easier. :D Thanks for posting.
.. and it works again. :-) Seems like the trick is to add the content-type header for xbmc v12.
Aha, yes I read about XBMC 12 being stricter with the header, but hadn't looked into it yet.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
nonob
Experienced User
Posts: 76
Joined: Tue Dec 06, 2011 6:52 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by nonob »

DeeWay wrote:I've created several playlists in XBMC, now I want to put any playlist on a button on the remote control with Event Ghost .. how can this be done?

I think the easiest is to use the HTTPAPI command PlayFile.

Make a macro and add the HTTPAPI action from XBMC2\Experimental. Configure it like the picture below (with a path to your playlist file).

XBMCPlayFile.PNG

jonib
Hi,
First thanks for this great plugin :)

I have also some music playlists and would like to play them with a assigned remote button.

I tried your instruction but it doesn't work, i have just this line inlog :

Code: Select all

   '<div style="position:absolute;right:1em;bottom:1em;font-size:10px;color:red"></div>'
My playlists are all smart playlist (file in userdata is .xsp and i think it is just the smart playlist configuration, not exactly a standart playlist file (m3u) to play with links to files...).

Is there a way to load and play my smart playlists ?

Thanks
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 »

nonob wrote:First thanks for this great plugin :)
Thanks. :)
Is there a way to load and play my smart playlists ?
Looks like you need to use this for music playlists: ActivateWindow(10502,"special://profile/playlists/music/All.xsp"). Change All.xsp to your specific playlist filename.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
nonob
Experienced User
Posts: 76
Joined: Tue Dec 06, 2011 6:52 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by nonob »

Hi,

It doesn't work, what am i doing wrong ?
(I don't want to open my xbmc playlist "list", i just want to play it).

Image

Thanks
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 »

nonob wrote:It doesn't work, what am i doing wrong ?
What version of XBMC are you using?

I didn't have time to test before so the command might be wrong, I'll check when I have eaten. :D

Edit: Oops :oops: , Try the command from this post.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
nonob
Experienced User
Posts: 76
Joined: Tue Dec 06, 2011 6:52 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by nonob »

I already tried this, it's the first command i tried, but it didn't work... :

Image

I have XBMC eden ...

Thanks
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 »

nonob wrote:I already tried this, it's the first command i tried, but it didn't work... :
Hmm, Would you mind trying a different network port in XBMC (and in the plugin). As I'm suspecting the "div styles" log result is not from XBMC, maybe there is a port conflict.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
nonob
Experienced User
Posts: 76
Joined: Tue Dec 06, 2011 6:52 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by nonob »

Yeah! It works :D

I didn't think about my share server software (weezo) which work on port 80.

But there was another little thing: http support wasn't checked in xbmc settings.., but it wasn't the main cause.

So i checked it, i change port to 81, i also change port in xbmc plugin by double clicking on xbmc2 in autostart arborescence (i searched a little time for that ;) ), and it works with the "playfile" command.

Thanks a lot.

Hum, i take this opportunity to ask you another thing: i'm suprised to see the "0" remote button start all my music files when i'm on music screen, on the "genre", "artist", "album" or "song" menu.
Anyway, it could be a good thing but with my about 5000 songs loaded in playlit, XBMC become extremly slow..
Do you think my 5000 songs is too much for XBMC ??
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Livin »

jonib,
any updates to test?

Do you know if they added any more JSON functionality? I opened this thread and it seems they might be receptive...
http://forum.xbmc.org/showthread.php?tid=126413

TRAC ticket...
http://trac.xbmc.org/ticket/12830
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: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

nonob wrote:Yeah! It works :D

I didn't think about my share server software (weezo) which work on port 80.

But there was another little thing: http support wasn't checked in xbmc settings.., but it wasn't the main cause.

So i checked it, i change port to 81, i also change port in xbmc plugin by double clicking on xbmc2 in autostart arborescence (i searched a little time for that ;) ), and it works with the "playfile" command.

Thanks a lot.
Great.
Hum, i take this opportunity to ask you another thing: i'm suprised to see the "0" remote button start all my music files when i'm on music screen, on the "genre", "artist", "album" or "song" menu.
Anyway, it could be a good thing but with my about 5000 songs loaded in playlit, XBMC become extremly slow..
Do you think my 5000 songs is too much for XBMC ??
Sorry for the late response, I have very limited experience with XBMC's music functionality, so don't know. sorry.

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

Post by jonib »

Livin wrote:any updates to test?
Not at the moment. I was hoping for more feedback from the last test version. But I'll have to assume it works perfectly 8) and I'll make a proper release soonish (hopefully). When I'm done with my apartment moving.
Do you know if they added any more JSON functionality?
There has been activity, but I haven't been following it too closely at the moment.

jonib
Last edited by jonib on Mon Jun 25, 2012 10:50 pm, edited 1 time in total.
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply