Page 19 of 94
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jul 07, 2011 7:22 pm
by jonib
copota wrote:Is there a way I can create an action for XBMC2 to trigger that particular event for XBMC Flicks?
There might be a way, I have not tested to control a plugin/addon yet.
Unfortunately I'm at the hospital at the moment (been here for the last two weeks) with only my Android phone, so can't check at the moment.
jonib (Bored to the death at the hospital)
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jul 08, 2011 2:22 am
by copota
jonib wrote:
There might be a way, I have not tested to control a plugin/addon yet.
Unfortunately I'm at the hospital at the moment (been here for the last two weeks) with only my Android phone, so can't check at the moment.
jonib (Bored to the death at the hospital)
Well, being at the hospital is simply no excuse. Just walk it off and get back to coding!
Joking, of course. Get well soon, or if you're there for a loved on, hope they get well soon too.
Thanks for the reply.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jul 08, 2011 1:20 pm
by jonib
copota wrote:Well, being at the hospital is simply no excuse. Just walk it off and get back to coding!
Actually, I did walk it off but apparently a heart attack wasn't something I could walk off so I was sent to the hospital.

And I would have loved to be able to do some coding, but doing it on the Android phone and not having access to XBMC or EventGhost was kinda hard. I did look at Python support for the Android but doing it on the phone was just too tedious.
Get well soon
Thanks, now I'm back home and itching to do some coding.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jul 08, 2011 7:46 pm
by jonib
copota wrote:I use the XBMC plugin named "XBMC Flicks" which gives an interface for using NetFlix. I would like to add a command to EventGhost that will start the "Instant Moveis and Shows" for the XBMC Flicks plugin.
You need to add a
HTTPAPI action from the
XBMC2\Experimental folder then you need to configure it like the screenshot below:
And add this code like in the screenshot:
Code: Select all
ActivateWindow(10025,"plugin://plugin.video.xbmcflicks/?mode=0")
I found this code by making the "Instant Moveis and Shows" a favorite in XBMC and then checking the
favourites.xml in XBMCs userdata directory.
Hope this is all you need to get it working if not just ask.
Next release will probably include the ActivateWindow (and others too) as a direct function.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sat Jul 09, 2011 3:23 pm
by copota
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sat Jul 09, 2011 5:39 pm
by jonib
copota wrote:Your solution worked.
Great, luckily the netflix plugin worked without having to login so I could test it.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Jul 17, 2011 7:14 pm
by mkleynhans
Jonib, firstly, thanks for all the amazing work that you have put into this plugin. I have been trying
to build feedback from XBMC to third party remote controls for ages and this is really good news for
me.
Is there any way to get the parsed results which end up in the log to be accessible? ie. I want to be
able to assign actions or macros to call JSON RPC events on XBMC and then parse the response from
Eventviewer to an AMX or Philips Pronto processor.
The only thing I need to be able to do is to output the XBMC2 results in the log to a processor via either
IP using a TCP client connection or via serial.
Is such a thing possible at the moment?
Thanks,
Mike
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Tue Jul 19, 2011 1:12 pm
by jonib
mkleynhans wrote:Jonib, firstly, thanks for all the amazing work that you have put into this plugin.
Thanks.
Is there any way to get the parsed results which end up in the log to be accessible?
Hmm, lets see if I understand. If you get a response in the log you can access it via the {eg.result} variable, you don't need the
{} if accessing via Python.
If this wasn't what you wanted could you provide an example and a screenshot of the log.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jul 21, 2011 9:56 pm
by mkleynhans
Hi again, I have been sitting here figuring out what the best screenshot should be and then thought
it best to try and explain.
Basically, when I call the JSON.RPC command in eventghost for say, Audio, Get Artists, it returns
a list of all the artists that I have in my XBMC collection in the eventghost log. I need to try and
get this out of eventghost somehow and send this to one of two remote control system processors.
I was hoping to send the eventghost log data returned when calling the JSON command using
either a TCP client connection to my processor or by sending it directly out of the serial port of
the pc running eventghost. Hopefully this makes a bit more sense...
Is there any way of doing this?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Jul 22, 2011 12:28 am
by jonib
mkleynhans wrote:Basically, when I call the JSON.RPC command in eventghost for say, Audio, Get Artists, it returns
a list of all the artists that I have in my XBMC collection in the eventghost log. I need to try and
get this out of eventghost somehow and send this to one of two remote control system processors.
I was hoping to send the eventghost log data returned when calling the JSON command using
either a TCP client connection to my processor or by sending it directly out of the serial port of
the pc running eventghost. Hopefully this makes a bit more sense...
The output in the log is just to show what data you got, to actually use the returned data you use a variable "
eg.result" it contains different data depending on what JSONRPC method you use. the
eg.result is the standard way you use any returned info in EventGhost and to use in other actions.
Below screenshot shows my test macro and log output:
I limited the GetArtists method to return 2 artists to keep the log short:
I use the Show OSD action to show the output. To use the eg.result variable in here I need to enclose it with "
{}" to access the data in the variable, you don't need to do that if using it directly in Python.
Code: Select all
{eg.result["artists"][0]["artist"]}
This shows the first "artist" from the result which is "2Pac" from my log. You need to know a bit about how to work with Python variable types to use the result.
Hopefully this gets you started.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Aug 04, 2011 8:21 am
by jonib
So mkleynhans, was my instructions useful?
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Aug 05, 2011 3:09 pm
by Hitcher
Great plugin but there's one control I can't get to work and that's the OSD for Music Visualisation. Even trying the event directly doesn't bring up the OSD.
Thanks.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Aug 05, 2011 5:21 pm
by jonib
Hitcher wrote:Great plugin but there's one control I can't get to work and that's the OSD for Music Visualisation. Even trying the event directly doesn't bring up the OSD.
Yes it doesn't work don't know why, based on this
documentation it should work, and my plugin is sending the right command, as it works for videos.
XBMC2\Buttons\Remote\Menu works to show the OSD, or you can send a HTTPAPI command
ExecBuiltIn(ActivateWindow(MusicOSD)).
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Aug 28, 2011 6:41 am
by garbear
Hi jonib,
XBMC has a problem where you can toggle Shuffle or Repeat via XBMC:Random and XBMC:Repeat, but you have no way of knowing the current shuffle/repeat state of XBMC. This has been fixed in the XBMC source code by giving PlayerControl(Random) a second parameter called Notify. XBMC2 script can use this new parameter by updating the two lines mentioned here,
http://forum.xbmc.org/showthread.php?t=108436.
The change is backwards compatible, of course, so if you're using an XBMC build older than 28 August 2011 it will safely ignore the Notify parameter.
Regards,
garbear
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Aug 29, 2011 12:10 am
by jonib
Sure no problem, I'll add them when a nightly with support is released. Hopefully I'll make a release shortly after.
edit: looks like it's supported already

I failed at my quick test before.
jonib