Page 59 of 94

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Mon Dec 23, 2013 6:31 pm
by jonib
jippo wrote:Firstly I want to thank Jonib for his fantastic work on this plugin. I've been using XBMC2 for that last year and it has really made things much easier for me.
Happy to hear that.
Both XBMC instances will happily run at the same time on each respective screen, but I am having trouble controlling them. If I open up each instance of XBMC, both the remotes will only work on the first run instance of XBMC.
So you are running two XBMCs on the same computer? I don't see why it wouldn't work, I have only tested running two XBMCs on the network at the same time and that works.
Is there a way to specify which XBMC2 profile controls which instance of XBMC?
Having two XBMC2 plugins with different ports should be able to control two different XBMCs. Hmm, there might be problems with the experimental functionality that don't use the normal port number.
I thought having each XBMC running on different port would do this, so is there a way to get around this issue?
OK, I need to see your EventGhost profile (.xml config file) and I need to see part of the EventGhost log when you are sending the same command(s) to both XBMCs. So hopefully I can see where the conflict is.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 24, 2013 7:32 am
by jippo
So you are running two XBMCs on the same computer?
Yes, I am using a thin client to create two seperate user sessions in Win 7 x64. The two separate instances work fine with each XBMC instance, except for the controller conflict.
OK, I need to see your EventGhost profile (.xml config file) and I need to see part of the EventGhost log when you are sending the same command(s) to both XBMCs. So hopefully I can see where the conflict is.
Ok, I will pm both to you to see if you can figure out why it isn't working. Thanks for the help, much appreciated. :)

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 24, 2013 10:19 am
by jonib
jippo wrote:Is there a way to specify which XBMC2 profile controls which instance of XBMC? I thought having each XBMC running on different port would do this, so is there a way to get around this issue?
Looks like the plugin uses a hard coded EventServer port used for the normal actions/buttons that are sent to XBMC. It's the oldest part of the plugin and looks like I forgot the port when I made the plugin able to control multiple XBMCs. I guess I wasn't expecting anyone crazy :shock: 8) enough to run multiple XBMC on the same device. :oops:

I'll look into fixing the problem but I don't know when.

If you don't want to wait (Might take a while) you should be able to make a copy of the XBMC2 plugin (copy the XBMCRepeat dir to another), and then edit the __init__.py to change the EventServer port from 9777 to 9877 for example.

Change the line 1427:

Code: Select all

self.xbmc.connect(ip=pluginConfig['XBMC']['ip'])
to

Code: Select all

self.xbmc.connect(ip=pluginConfig['XBMC']['ip'], port='9877')
You also need to change the EventServer port in XBMCs settings file userdata\guisettings.xml -> services -> <esport>9777</esport>

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 24, 2013 12:17 pm
by jippo
Hmm ok. So I made a copy of the XBMC2 plugin folder, and added in the port and saved that. I also added the copy of updated XBMC2 plugin (with a different name) to eventghost, and assigned a few test keys. I made sure I changed the guisettings.xml port too, but it still is not working. :cry: Any idea what else I can try?

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 24, 2013 12:44 pm
by jonib
jippo wrote:Hmm ok. So I made a copy of the XBMC2 plugin folder, and added in the port and saved that. I also added the copy of updated XBMC2 plugin (with a different name) to eventghost, and assigned a few test keys. I made sure I changed the guisettings.xml port too, but it still is not working. :cry: Any idea what else I can try?
No idea, sorry, will have to look into it more later. Only thing I can think of is to change the guid of the plugin copy (if you didn't do it already).

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 24, 2013 1:05 pm
by jippo
Yes I changed the name of the plugin copy as well as the guid, as that was the only way for eventghost to detect the copied plugin.
I'll wait and see if you can find out any further info.
EDIT: Ignore the above, I rebooted and now it seems like everything is working. :oops: :oops: :oops: I wrote out a very simple guide to help me remember the details of how to do this in future, so perhaps it might help anyone else trying to do this in future...

Code: Select all

Step 1 - Go to Eventghost/plugins folder and make a copy of the XBMCRepeat folder. Rename it to something you will remember like "XBMC2 9877". I named mine after the port it will be running on,             to avoid confusion if I add more instances of XBMC later on.
Step 2 - Go into your XBMC2 9877 folder and edit the __init__.py file. I use Notepad++ to edit files, but you can use wordpad if you like.
Step 3 - Go to line 34 and edit: 	name = "XBMC2",   					
         Change "XBMC2" into "XBMC2 9877" or whatever you called your new folder.
Step 4 - Go to line 38 and edit: 	guid = "{8C8B850C-773F-4583-AAD9-A568262B7933}",	
         I simply changed the last number 3 to 4 to make the guid unique. The guid must be changed, otherwise it won't register as a plugin in Eventghost.
Step 5 - Go to line 1427 and edit: self.xbmc.connect(ip=pluginConfig['XBMC']['ip'])	
         Replace this line with:   self.xbmc.connect(ip=pluginConfig['XBMC']['ip'], port='9877') 
Step 6 - Save the file
Step 7 - Go to the XBMC folder/userdata and edit guisettings.xml. Go to line 675 and edit: <esport>9777</esport>  
         Change this to: <esport>9877</esport>
Step 8 - Go back to Eventghost, and add your XBMC2 9877 plugin which should now be in the plugin list. From there you can configure your keys, and all of them should be forwarded to the correct instance of XBMC.

Note1: If you are running XBMC in portable mode, you must edit the guisettings.xml in XBMC/portable_data/userdata instead.
Note2: If you want to run more separate instances of XBMC, you must go through all these steps again. Remember that for each instance of XBMC you want to control, you will need to make another copy of XBMC2 plugin, and it must be named differently, have a unique guid and be running on a different port.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 24, 2013 8:09 pm
by jonib
jippo wrote:EDIT: Ignore the above, I rebooted and now it seems like everything is working. :oops: :oops: :oops:
Cool, now that I know it works for you I will probably be able to update the plugin faster (But it might still take a while).
I wrote out a very simple guide to help me remember the details of how to do this in future, so perhaps it might help anyone else trying to do this in future...
So hopefully this wont be needed soon(ish) :wink:

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Fri Dec 27, 2013 3:42 am
by jonib
Here is a new test version of the XBMC2 plugin.

It only adds configuration for the EventServer port that jippo needed (or anyone that can't use the default 9777 port).

Hopefully I didn't mess anything else up. So anybody that don't need to change this port can ignore this release.

@jippo I would appropriate if you could test this version and report if it works (or not) .

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Fri Dec 27, 2013 7:09 am
by leothlon
I'm looking for a way to start a playlist (music). does anyone know how / if this is possible?

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Fri Dec 27, 2013 7:27 am
by jonib
leothlon wrote:I'm looking for a way to start a playlist (music). does anyone know how / if this is possible?
Look at these posts post1, post2 and post3.

You need a recent test version of the XBMC2 plugin, info about the test version.
And you need to use the JSON-RPC action in the Experimental folder.

Post again if you need more help.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Mon Dec 30, 2013 7:18 am
by leothlon
Thank you for the awnser, but i cant seem to work it out.
The problem is that it is not a physical playlistfile i want to start but rather jump in and play an xbmc playlist (or if possible play from favorite, setting the playlist as favorite might be a workaround?) the thing is i use http://forum.xbmc.org/showthread.php?tid=67012 to get spotify playlists into xbmc.
so when i go homescreen > music > playlists. i then have all my spotify playlists there, now the question is how can i jump in and play one of them automaticly (ether from api or from hotkey). so that i can have an event, webserver triggered event for example jump into xbmc and start playing the right playlist.
or like bind up that green button on remote is one playlist and yellow is another for example.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 31, 2013 1:07 am
by yonubear
stupid question how are you passing the left and right button presses under remote to XBMC in eventghost I am working on a JSON interface and have been unable to get left and right to also control skipping when something is playing and have gotten no help over on the xbmc site.

Thanks,
yonubear

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 31, 2013 1:48 pm
by leothlon
When i try to run activate window in the experimental json action I get error:

XBMC2: JSONRPC: GUI.ActivateWindow
Error:
{
"code": -32600,
"message": "Invalid request."
}

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 31, 2013 6:26 pm
by jonib
leothlon wrote:The problem is that it is not a physical playlistfile i want to start but rather jump in and play an xbmc playlist (or if possible play from favorite, setting the playlist as favorite might be a workaround?)
If there is no playlist file then I don't know how to open it. XBMC JSON-RPC forum is probably the best place to ask.
the thing is i use http://forum.xbmc.org/showthread.php?tid=67012 to get spotify playlists into xbmc.
I don't use Spotify so can't test.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Tue Dec 31, 2013 6:35 pm
by jonib
yonubear wrote:stupid question how are you passing the left and right button presses under remote to XBMC in eventghost
The XBMC2 plugin uses EventServer for all actions and remote buttons. JSON-RPC has Input.Right and Input.Left but I haven't tested them so don't know if they work the way you want.

Don't have time right now so can't test the JSON-RPC commands.

jonib