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 »

Derbyboy wrote:Hi,

Why do I not have any options here:
You need to press the "Update" button while XBMC(Kodi) is running to get the JSON-RPC methods that are supported.

I'll make it do it the first time automatically at some point.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Derbyboy
Posts: 6
Joined: Mon Aug 01, 2011 11:01 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Derbyboy »

Thank you Jonib, it worked!
Derbyboy
Posts: 6
Joined: Mon Aug 01, 2011 11:01 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Derbyboy »

Hi again :(

Could you help me with whis one as well?

I┬┤m trying to run the scan video library Json.

Thanks
Attachments
d.jpg
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 »

Derbyboy wrote:Could you help me with whis one as well?
Sure, but the next time (if you didn't do it) read a couple of pages back before asking and you might find a solution. :)
I┬┤m trying to run the scan video library Json.
Do this that I posted before. It's a known problem I haven't fixed yet (as I forgot about it the last time I updated the plugin :oops: )

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
builderjer
Posts: 12
Joined: Mon Nov 17, 2014 3:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by builderjer »

I am trying to use JSON to get which window is open in XBMC. I guess I have no idea on how to achieve that.

I try the GetProperties, but don't understand what parameters to use. Any help would be great.

XBMC - Gotham
OS - Windows 7

Thank you
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 »

builderjer wrote:I am trying to use JSON to get which window is open in XBMC. I guess I have no idea on how to achieve that.
Interestingly (and lucky you :) ) I've been looking into how to find out where the user is and what the user is doing in XBMC(Kodi).

You were in the right track with GetProperties. Specifically you need to use a JSONRPC action with Namespace:"GUI" and Method:"GetProperties" parameter: [["currentwindow"]]

You can access the results with eg.result["currentwindow"]["id"] or eg.result["currentwindow"]["label"].

You might need to use JSONRPC XBMC.GetInfoLabels to get more information. If I know more specific what you want to do I can help more.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
builderjer
Posts: 12
Joined: Mon Nov 17, 2014 3:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by builderjer »

Thank you for the quick response. That worked perfect. I'm new to eventghost, but really enjoy the possibilities of it. I'm sure I will be posting more as I go

Thank you again
builderjer
Posts: 12
Joined: Mon Nov 17, 2014 3:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by builderjer »

OK, so I have another question. I am trying to learn to use JSON to notify me of when media is playing. I want to use the Player.OnPlay method, but it doesn't seem to be available in the options provided. Is there a way that I can code this into a python script to achieve this?

I guess what I'm trying to do is receive the raw event sent from XBMC and process that with an action.

For example:

When a video is selected to play and starts, I want EventGhost to process that and ExclusiveEnable a specific folder.
When the video stops, I want it to ExclusiveEnable a different folder.

Any ideas on how I can accomplish this?
Last edited by builderjer on Wed Nov 19, 2014 3:15 pm, edited 1 time in total.
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 »

builderjer wrote:OK, so I have another question.
Cool
I am trying to learn to use JSON to notify me of when media is playing.
Nice
I want to use the Player.OnPlay method, but it doesn't seem to be available in the options provided. Is there a way that I can code this into a python script to achieve this?
That's a notification (event) and you just need to activate "JSON-RPC notifications" in XBMC2s settings. You also need to activate UPnP in XBMC(Kodi). After that you would get all events from XBMC and you can do whatever you want with them. :lol:

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
builderjer
Posts: 12
Joined: Mon Nov 17, 2014 3:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by builderjer »

I am receiving all of these notifications in my log, I just don't know how to use them.
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 »

builderjer wrote:I am receiving all of these notifications in my log, I just don't know how to use them.
Just drag a event to a macro you want it to activate, you can access the information in the event with "eg.event.payload".

edit: example to extract some info.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
builderjer
Posts: 12
Joined: Mon Nov 17, 2014 3:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by builderjer »

This is my log. It only shows it as a notification, not an event.
Capture.PNG
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 »

builderjer wrote:This is my log. It only shows it as a notification, not an event.
Those are "Raw" events just used for debugging, so you should turn that off. You need to disable the "Log only assigned and activated events" to see all events.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
builderjer
Posts: 12
Joined: Mon Nov 17, 2014 3:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by builderjer »

Got it!!! Thank you!!

I did have to leave the "Raw Events" checked, otherwise it didn't show the events from them.

Now it's more playing, going window to window and see the action.
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 »

builderjer wrote:Got it!!! Thank you!!
Great
I did have to leave the "Raw Events" checked, otherwise it didn't show the events from them.
That would be a bug then, mind posting a new screenshot of the log with RAW events and normal events? I'll check on my system too a bit later with Gotham and Helix

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply