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.
daveotero
Posts: 3
Joined: Wed Mar 28, 2012 5:42 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by daveotero »

Livin wrote:
XBMC has a setting to automatically open Full Screen.

If you need to check using EG then use Find Window + Maximize
Thanks for the reply!

I've got it setup to open in full screen and that works if XBMC is not already open. I'm not by my XBMC setup right now so I can't double check, but I'm pretty sure I tried the Find Window > Maximize combo and it just maximized the window, which was just a full size window rather than true full screen.
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 »

you are correct, we really need XBMC to support this better. I opened a formal Trac ticket XBMC feature request for more command line window control, and a watch dog like check.

You could add to the ticket a request for an option that automatically makes the window true full screen when it is in focus.

Please post your need & support in the Trac ticket - the more users asking for it the better.

http://trac.xbmc.org/ticket/12823
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
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

jonib wrote:
blaher wrote:Is there a correct way to upgrade EG with this plugin?
This should be a one time deal, close down EventGhost, edit your EventGhost config (the XML file loaded in EG) with Notepad and find the part that references the XBMC2 plugin and change the GUID to {8C8B850C-773F-4583-AAD9-A568262B7933}, after this update to the latest EventGhost and it should work correctly.

More info about the problem here.

jonib
Thanks a lot, that did the trick.
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,
I just got a MiCasaVerde Vera 2 so I'm really going to start integrating my lighting into my overall XBMC scenes. Have you made any updates to the plugin I should be testing with?

I need to write, or leverage, a plugin for the Vera but I suspect that should be somewhat easy since Vera uses LUUP interface and JSON internally... though I have no experience with either.
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
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

I recently got a Vera 2...too. :)

You're obviously a very advanced user of EventGhost, but I thought I might share how I use XBMC with the Vera so far:
I use the plug-in here: http://forum.micasaverde.com/index.php?topic=7881.0 and here's a screenshot of how:
http://i.imgur.com/Q6g6P.gif

When I pause/stop a video on XBMC the lights dim to a certain level, but when I press play the lights go off. Are there any other ideas for integration between the two that I can implement?

Cheers
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:Have you made any updates to the plugin I should be testing with?
Unfortunately I have been sick for the past week so haven't got much done, but before that I got the the JSON events working, but I need to finish some stuff before I can release a new test version. I'll try to finish the test version now that I'm feeling better.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
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 »

cool. I'm pretty amped to get this working... the Vera2 is $88 right now on ebay... half price and so far I'm very impressed!
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
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 »

Hope you are feeling better... I got hit with something too, then got on a plane to Seattle for work. Finally over it, 2 weeks later.

Anyway... I get my Vera device this week... was hoping to try out the new code you had in the works... any ETA?
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 »

Livin wrote:any ETA?
I finally got something done and I'm nearly finished with a new test version, hopefully I can finish it tomorrow and release it.

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 »

So I finally have a new test version ready to test the events support.

If you want to test it please use a backup EventGhost config, as I'm probably going to change stuff before I make a proper/official release.

This version adds JSON-RPC notifications as events and I have changed some of the code for the broadcast events too.

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.

For the broadcast events read instructions here in the post for the last test version.

It's very late (or early) here and I need to go to bed so hopefully I didn't forget anything important.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher »

Thank you very much. I look forward to trying it.

Edit: It seems to work well triggering events, thanks, but I'm not sure how to use the information in the curly brackets. Probably simple for experienced people. :)

16:33:14 XBMC2.JSONRPC.Player.OnPlay {u'item': {u'type': u'song', u'id': 2240}, u'player': {u'playerid': 0, u'speed': 1}}
16:33:34 XBMC2.JSONRPC.Player.OnPlay {u'item': {u'type': u'movie', u'id': 1}, u'player': {u'playerid': 1, u'speed': 1}}

When I drag the event into my tree I just get: XBMC2.JSONRPC.Player.OnPlay. What should my event be to differentiate between songs and movies?

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

blaher wrote:Thank you very much. I look forward to trying it.
Thanks for testing the events support.
Edit: It seems to work well triggering events, thanks, but I'm not sure how to use the information in the curly brackets. Probably simple for experienced people. :)
EventGhost events can contain two parts, the event string that you use to activate a macro and a payload part that can contain extra information (the part in the curly brackets).

To access the payload part you need to access it via a Python variable eg.event.payload

Code: Select all

16:33:14   XBMC2.JSONRPC.Player.OnPlay {u'item': {u'type': u'song', u'id': 2240}, u'player': {u'playerid': 0, u'speed': 1}}
16:33:34   XBMC2.JSONRPC.Player.OnPlay {u'item': {u'type': u'movie', u'id': 1}, u'player': {u'playerid': 1, u'speed': 1}}
From your example events to access the type you could use eg.event.payload['item']['type'], you could put this in a Show OSD action {eg.event.payload['item']['type']} to get the result song or movie(The curly brackets are needed in the Show OSD action to indicate it's Python code and not just text)

You need to know a bit about Python variables especially the Dictionary type.
When I drag the event into my tree I just get: XBMC2.JSONRPC.Player.OnPlay. What should my event be to differentiate between songs and movies?
Unfortunately not all events have the type information so I chose not to put that information in the event string on this test version, but I'm probably going to, I just need to figure out how to handle it the best and would appropriate any feedback on it.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
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,
in order to trigger home automation events, including the type is essential. Also, will XBMC send notifications based on what Home menu item is chosen (TV Shows, Movies, Music, Photos, etc)? This would allow even greater ability to start the automation based on time of day AND what section of the media center is being browsed.
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 »

Livin wrote:in order to trigger home automation events, including the type is essential.
Jupp, I'll add it in the next test version, I just don't want to make too many special cases based on the events, as I want my plugin to work with any events that XBMC supports. That said I still want the events to be as easy/usable as possible in EventGhost, it's just not straightforward always.
Also, will XBMC send notifications based on what Home menu item is chosen (TV Shows, Movies, Music, Photos, etc)?
Sorry haven't seen any events like that. But I have only tested with the current release of XBMC, so there might be more events in the development version as there seems to be lot of changes in the JSON-RPC code.
Edit: Looks like XBMC 12.0 alpha don't either.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
peppe_sr
Posts: 5
Joined: Sat May 19, 2012 8:32 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by peppe_sr »

hi, i'm very happy with EG, i use it everyday to control xbmc.
now i'm trying to fine tune up my remotes.
i would like to have a command to clean library from remote i found in the List of built-in functions this command: CleanLibrary(database). is there a way to set a command in the xbmc2 list to do this.
thankyou
peppe
Post Reply