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 »

Livin wrote:I cannot change/edit the Command Syntax box.
You should be able to change the combobox next to the first Command text.

Anyway I have attached (hopefully) the fixed version, I needed to change just one number and everything is fine again. :lol:

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 »

EDIT: I needed to select the UPDATE button again... seems it does not refresh on its own, even after an EG restart?

the proper info is showing now in the dialog box

I'll see if it receiving XBMC info now...
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:EDIT: I needed to select the UPDATE button again... seems it does not refresh on its own, even after an EG restart?
Sadly no, something I will improve hopefully when I'm done with events. The command info don't change that often so I save it locally so not to download it unnecessarily.
the proper info is showing now in the dialog box
:)
I'll see if it receiving XBMC info now...
Don't forget that you need to activate events in the plugins settings.

jonib
Last edited by jonib on Tue Mar 20, 2012 4:50 pm, edited 1 time in total.
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 »

OK... plugin events enabled... will report back
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 »

Reporting Back...

Looks like it is working. I get events such as...

XBMC2.OnAction.ACTION_BUILT_IN_FUNCTION
XBMC2.OnAction.ACTION_PLAYER_PLAY


Though, this info is not useful for me. I already get 99% of these based on IR that EG already logs.

I will need to know specifics like...
- what section has been selected: Movies, TV, Photos, Favorite="New", etc. This is the only way to trigger events relevant to what is happening.
- name of the video, music, photo, etc is showing/playing.

Possible to get these specifics passed through?
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:Reporting Back...
Thanks.
Looks like it is working. I get events such as...

XBMC2.OnAction.ACTION_BUILT_IN_FUNCTION
XBMC2.OnAction.ACTION_PLAYER_PLAY
Good. Those are the OnAction events basically any button/action you send from EventGhost will generate those. You can disable those by setting SetBroadcast to "1".

Though, this info is not useful for me. I already get 99% of these based on IR that EG already logs.
Hihi, sorry but I was expecting this reaction. The broadcast events are a bit limited. I'll be adding JSON-RPC notifications next and those should be a bit more useful.
I will need to know specifics like...
- what section has been selected: Movies, TV, Photos, Favorite="New", etc. This is the only way to trigger events relevant to what is happening.
Unfortunately I don't think XBMC supports any of these kind of event yet.
- name of the video, music, photo, etc is showing/playing.
These kind of events should be showing, have you tried to start/stop playing files
Example of events I get:

Code: Select all

XBMC.MediaChanged.MovieTitle u"ETC: EXCLUSIVE FIRST LOOK: Transformers 3D the RIDE BEHIND THE SCENES!"
XBMC.OnPlayBackPaused
XBMC.OnPlayBackStopped
XBMC.OnPlayBackStarted
XBMC.OnPlayBackResumed
XBMC.OnPlayBackSeek.25951
Possible to get these specifics passed through?
Next test version should have more useful events, but I'm limited to what XBMC supports.

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 »

I did not get any events like you posted.

For Home Automation most of the events listed are not what we call "actionable"... there is no usable info to form conclusions on what is happening to trigger events.

I don't see why the JSON interface would not be able to easily add reporting of what menu item has been selected... I'd think this would be only a single (or few) lines of code to enable it... the XBMC debug log captures it already.
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:I did not get any events like you posted.
Hmm, that's weird, would you mind running the attached Python script and see what events you get (it's not for EventGhost). What XBMC version are you using?
For Home Automation most of the events listed are not what we call "actionable"... there is no usable info to form conclusions on what is happening to trigger events.
If you know something happened, you can always get more info via JSONRPC or HTTPAPI actions.
I don't see why the JSON interface would not be able to easily add reporting of what menu item has been selected... I'd think this would be only a single (or few) lines of code to enable it... the XBMC debug log captures it already.
Well that's up to the XBMC developers, when I get the JSONRPC events implemented if there are missing events you can always make a feature request.

The events you got did they repeat three times or only once? as I always get three events when I should get one.

jonib
Attachments
Socket.py
Simple XBMC event script
(372 Bytes) Downloaded 142 times
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 »

I can run the script later today. I don't get repeated events in the log.
If you know something happened, you can always get more info via JSONRPC or HTTPAPI actions.
I'd think if they are not sent then that is all there is to it. Do I misunderstand?
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:I can run the script later today. I don't get repeated events in the log.
Interesting, and you did not check the Event workaround option?
I'd think if they are not sent then that is all there is to it. Do I misunderstand?
For example if you get a "Video starts playing" event you could use the JSONRPC\Player.GetItem action to retrieve more info like filename and other things.

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 wrote:
Livin wrote:I don't get repeated events in the log.
Interesting, and you did not check the Event workaround option?
I did not check any options but to turn on the events
For example if you get a "Video starts playing" event you could use the JSONRPC\Player.GetItem action to retrieve more info like filename and other things.

XBMC should simply have an option to send those events automatically, aka push notifications.

The root of the issue is dependent on what the goal(s) of the event system are...

If it is simply to provide information on a "pull" basis then fine, though this is inefficient, and tedious to work with if information is needed often... and nearly impossible if information is needed in real-time.

If it is to provide enough information to create automation around the events then detailed information will be required in real-time (aka push notifications)


As it sits, without push notifications from XBMC of specifics, the notifications are simply noise, and not actionable. Getting a button press or the title of a movie/song/show etc is of no use for an automation system...
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 »

jonib,
From what I'm hearing, and reading, the OnPlayer notifications from JSON provide a 'type' which might provide what we need to add context to the action - thus get some real HA from it.

Can you see about pulling out this 'type' from the notifications?

my inquiry about it...
http://forum.xbmc.org/showthread.php?ti ... pid1054618


Wiki info...
http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v4
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:From what I'm hearing, and reading, the OnPlayer notifications from JSON provide a 'type' which might provide what we need to add context to the action - thus get some real HA from it.

Can you see about pulling out this 'type' from the notifications?
These are some examples of JSON-RPC events from the plugin:

Code: Select all

XBMC.Player.OnPlay {u'item': {u'type': u'movie', u'id': 4030}, u'player': {u'playerid': 1, u'speed': 1}}
XBMC.Player.OnPlay {u'item': {u'type': u'song', u'id': 66}, u'player': {u'playerid': 0, u'speed': 1}}
XBMC.VideoLibrary.OnUpdate {u'item': {u'type': u'movie', u'id': 4324}}
JSON-RPC events are working in the (unreleased) XBMC2 plugin, but because it needs a direct connection with XBMC I need to implement more functionality in the plugin before it's usable.

Edit: Do you get a XBMC.StartUp event when starting up XBMC?

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 wrote:Edit: Do you get a XBMC.StartUp event when starting up XBMC?
I don't remember seeing it but I could be wrong. I'll look in a bit - I need to upgrade XBMC to Eden gold after we finish watching basketball.

I have XBMC & EG on the same PC so a direct connection should not be an issue.
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:I'll look in a bit
Thanks, as I would like to use the StartUp event to connect to XBMC when XBMC starts if they are not on the same machine.
I have XBMC & EG on the same PC so a direct connection should not be an issue.
I didn't mean they needed to be on the same machine just that XBMC2 plugin needs to have an active connection to XBMC to get JSON-RPC events, with broadcast events XBMC2 only needs to listen on the network and not be connected to a specific XBMC. (Probably still not making sense :shock: )

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