Page 1 of 5
XBMC Event Receiver
Posted: Sat Dec 26, 2009 5:33 pm
by vortexrotor
This is a plugin that is based on the good work that Bitmonster and KingD did regarding Broadcast
Receiver / Listener but has many enhancements specific to
XBMC.
Code Status: GA/Mature
This plugin enables the UDP
Event Broadcast functionality of the user defined
XBMC Host (configurable within the plugin) and listen's for events generated over UDP by the
XBMC Host and parses and logs an
event(s) to eventghost so the user can do just about anything with that to generate another
event to act upon within EG.
A readme is included in the attached zip file.
As time permits I will update the link below with up to date versions.
For added future benefit, I am working on an HTTP.API integration functionality plugin and will incorporate/consolidate this into the plugin in a subsequent up-coming release for full two-way
XBMC capability.
Feel free to use, modify and suggest mods as you see fit.
As far as installation... you know the drill! Enjoy!

Re: XBMC Event Receiver
Posted: Thu Dec 31, 2009 4:46 pm
by rickardk
Great plugin!!!
Do you know if there is a way in EventGhost to match partial event name?
I would like to trigger a macro just on movie playback.
XBMC-Event.<b>MediaChanged:<li>MovieTitle:The Pony Remark;192.168.0.3;1</b>
The event contains the title (wich of course is variable). So I would like to use an asterix or something like partial event matching. Any ideas?
Re: XBMC Event Receiver
Posted: Thu Dec 31, 2009 5:32 pm
by Bartman
Normaly the different sections should be separated with points and highly variable data should be put in the payload of the event.
Re: XBMC Event Receiver
Posted: Fri Jan 01, 2010 12:06 pm
by rickardk
Thanks!
So "XBMC-Event.<b>MediaChanged:<li>MovieTitle:The Pony Remark;192.168.0.3;1</b>" should be formated like this:
"XBMC-Event.MediaChanged.MovieTitle ['The Pony Remark', '192.168.0.3']" to be more useful??
What I'm looking for is "MovieTitle" as this indicates that a video file is played and trigger a macro on this.
For audio I should be looking for "AudioTitle" to trigger macros on audio playback.
Is there anyway to parse the event name and create a new event with proper formating?
Re: XBMC Event Receiver
Posted: Fri Jan 01, 2010 12:09 pm
by Bartman
make a python script and access the prefix and suffix of the eg.event variable.
Re: XBMC Event Receiver
Posted: Fri Jan 01, 2010 5:39 pm
by rickardk
Thanks!
I now parse the event created by XBMC Event Receiver and create (for me) more usable events.
A little problem remains though. The "XBMC.<b>MediaChanged:<li>MovieTitle:Whatever;1</b>" shows when starting a new video file. But if you start and resume the same file this is never shown.
Is there anything else that is broadcasted by XBMC that a future version of the XBMC Event Receiver plugin can make use of to tell what kind (video or audio) of media that is played/started/resumed?
Re: XBMC Event Receiver
Posted: Sat Jan 02, 2010 3:22 am
by rickardk
The above should be solved if the plugin could retrieve media type ("Type:Audio" or "Type:Video") from /xbmcCmds/xbmcHttp?command=getcurrentlyplaying on every "OnPlaybackStarted" and "OnPlaybackResumed" instead of just on "OnMediaChange" I think.
Events like this:
XBMCEvent.OnPlaybackResumed.Video.[Title of movie][IP]
XBMCEvent.OnPlaybackStarted.Audio.[Artist, Album, Song][IP]
or something like that...
Would also be great to get an
event with playback status (and details) on request. An action that uses
http://xbox/xbmcCmds/xbmcHttp?command=g ... tlyplaying
on demand?
Re: XBMC Event Receiver
Posted: Tue Jan 05, 2010 1:57 am
by vortexrotor
Hello Everyone,
I am currently working on "all the above" with the integration of the HTTP.API capability of
XBMC within the plugin itself which should solve alot of those issues.
Regarding the parsing script you put together "MOD". If you can share that with me, I can include/integrate it into the plugin so everyone can benefit.
Thanks for everyone's comments!
Re: XBMC Event Receiver
Posted: Tue Mar 02, 2010 12:25 am
by JustGav
Just spotted your post your post in the
XBMC thread.
Grabbed your plugin, having some minor hassles because I use authentication on my system. Going to see what I can do.
Looks interesting though
EDIT : Eventghost under win7 issue (needed to run as administrator, doh!)

Re: XBMC Event Receiver
Posted: Sun May 23, 2010 5:04 pm
by giantpopples
Hi !
I just installed your plugin and it's working great !
How is the development going ? I see that you try to implement the httpAPI to get more information on what's playing etc.. This is the only feature missing !
There is also a JSON-RPC API that is in development, maybe you could also have a look on it ? I don't know if it would be harder to implement but it seems to replace the older HTTPApi in the future.
Thanks again !!
Re: XBMC Event Receiver
Posted: Wed Sep 15, 2010 4:29 pm
by jesterod
so how do i use this?
Re: XBMC Event Receiver
Posted: Wed Sep 15, 2010 9:49 pm
by jonib
jesterod wrote:so how do i use this?
Did you read the Readme.txt in the .Zip achieve?
jonib
Re: XBMC Event Receiver
Posted: Wed Sep 15, 2010 9:52 pm
by jesterod

no....
Re: XBMC Event Receiver
Posted: Sat Sep 18, 2010 1:05 pm
by vortexrotor
giantpopples wrote:Hi !
I just installed your plugin and it's working great !
How is the development going ? I see that you try to implement the httpAPI to get more information on what's playing etc.. This is the only feature missing !
There is also a JSON-RPC API that is in development, maybe you could also have a look on it ? I don't know if it would be harder to implement but it seems to replace the older HTTPApi in the future.
Thanks again !!
Hello BBCode, It's been awhile but been out of the country "working" my real job.
Anyhow.. I am waiting until the
XBMC JSON-RPC stuff is cooked before I finish the new plugin. I am testing Dharma at the moment and I just released a Multiroom streaming plugin and its at is early stages but looks real promising so check it out.
VortexRotor
Re: XBMC Event Receiver
Posted: Wed Sep 22, 2010 7:05 am
by Livin
vortexrotor wrote:
Anyhow.. I am waiting until the
XBMC JSON-RPC stuff is cooked before I finish the new plugin. I am testing Dharma at the moment and I just released a Multiroom streaming plugin and its at is early stages but looks real promising so check it out.
VortexRotor
Since
XBMC is in B2 now I'd think the JSON interface is pretty well baked?