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.

XBMC Event Receiver

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMC Event Receiver

Post by jonib »

rickardk wrote:I've got this problem when playing files with "├Ñ, ├ñ or ├Â" in the title (UTF-8). Not sure how to fix it though.
I'll see if I can fix it, but it might take some time.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
rickardk
Posts: 14
Joined: Thu Dec 31, 2009 3:16 pm

Re: XBMC Event Receiver

Post by rickardk »

Great. I don't know how the XBMC Event Server works, but I guess it will just broadcast simple play, stop etc and then the XBMC Event Receiver plugin will use the HTTP API to get what's playing.
Must be the decoding on that read that's not done properly as getcurrentlyplaying will show the same none decoded ascii
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMC Event Receiver

Post by jonib »

rickardk wrote:Great. I don't know how the XBMC Event Server works, but I guess it will just broadcast simple play, stop etc and then the XBMC Event Receiver plugin will use the HTTP API to get what's playing.
It just listens for events on a specific network port and displays what it gets.
Must be the decoding on that read that's not done properly as getcurrentlyplaying will show the same none decoded ascii
By default Python just understands simple US-ASCII, so the code needs to use Unicode to handle other encoding's.

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: XBMC Event Receiver

Post by jonib »

I have attached a new version of this plugin, it hopefully will handle events with non US characters.

I have done only a quick test and it seems to work.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
rickardk
Posts: 14
Joined: Thu Dec 31, 2009 3:16 pm

Re: XBMC Event Receiver

Post by rickardk »

Great. No more problems where the XBMC Event Receiver plugin stops responding.

Thanks a million!!
zootoxin
Posts: 17
Joined: Mon Sep 19, 2011 1:02 pm

Re: XBMC Event Receiver

Post by zootoxin »

Can somebody please explain to me how to configure this on a windows 7 PC

The event ghost I am using is on the same PC as XBMC

The links in the readme are dead

Please help
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMC Event Receiver

Post by jonib »

zootoxin wrote:The links in the readme are dead
You did change the "xbox" part in the url so it points to where your XBMC is? like localhost or your PCs IP address.

From the readme:
Use the following to control the broadcasting of events (assumes xbox is the address of your xbox
running xbmc and xbmc has its web server turned on):
jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
zootoxin
Posts: 17
Joined: Mon Sep 19, 2011 1:02 pm

Re: XBMC Event Receiver

Post by zootoxin »

The IP of the address the PC which has Event Ghost and Xbmc is

192.168.1.30

so what now?

There seems to be two areas for IPs and Ports
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMC Event Receiver

Post by jonib »

zootoxin wrote:There seems to be two areas for IPs and Ports
In the Plugin? There you must change the XBMC Host IP and XBMC HTTP Port to match you settings in XBMC.

You might need to change the port in XBMC to something other the 80.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
nicobo
Posts: 1
Joined: Sun Apr 01, 2012 1:55 pm

Re: XBMC Event Receiver

Post by nicobo »

Hi,

I want to change the volume when I play music (75%) or video (100%). (All my music play louder than my videos and don't want to adjust volume each time).

I need events that trigger when when I play music, or video (from file, movie or TVshows)

When I launch a media I get two events:

<b>Onplaybackstarted;1<b> --> for every media

<b>mediachanged:<li>movietitle:xxxxxxx<b> --> only for tv show or movies not for video file There is no second event for video file
<b>mediachanged:<li>audiotitle:xxxxxxx<b> -->for music.

How can I create two events that trigger when I play music or video. I need to remove the title to always have the same event.

I will xbmc2 wit the api setvolume command to change the volume (works fine).

Thanks
satheesh.net
Posts: 6
Joined: Sat Sep 15, 2012 9:50 am

Re: XBMC Event Receiver

Post by satheesh.net »

Hi. I've got the plugin to work correctly and I'm quite pleased with it. I do have a few requests though. The first one is that whenever I play a movie/tv-series I've set the lights to go off and resume if I pause or stop and it does that correctly. My issue is whenever I want to play some music from the library (or use the Spotify plugin, Spoti MC), it still sends the same event:

Code: Select all

XBMC-Event.<b>OnPlayBackStarted;1</b>
And the lights go off. But I wish whenever I played music media, there wouldn't be any changes to the lights. But for that to happen, the XBMC Event must send something else than OnPlayBackStarted maybe OnMusicPlayBackStarted or something.

Previously I was using a script via SwitchKing to do the work for me and there it worked right out of the box.
See script here -> http://www.satheesh.net/2012/01/09/xbmc-lights/

Anyone with some tips on how to achieve this?? :roll:
satheesh.net
Posts: 6
Joined: Sat Sep 15, 2012 9:50 am

Re: XBMC Event Receiver

Post by satheesh.net »

Hi. I've got the plugin to work correctly and I'm quite pleased with it. I do have a few requests though. The first one is that whenever I play a movie/tv-series I've set the lights to go off and resume if I pause or stop and it does that correctly. My issue is whenever I want to play some music from the library (or use the Spotify plugin, Spoti MC), it still sends the same event:

Code: Select all

XBMC-Event.<b>OnPlayBackStarted;1</b>
And the lights go off. But I wish whenever I played music media, there wouldn't be any changes to the lights. But for that to happen, the XBMC Event must send something else than OnPlayBackStarted maybe OnMusicPlayBackStarted or something.

Previously I was using a script via SwitchKing to do the work for me and there it worked right out of the box.
See script here -> http://www.satheesh.net/2012/01/09/xbmc-lights/

Anyone with some tips on how to achieve this?? :roll:
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Post by Livin »

satheesh.net wrote:Hi. I've got the plugin to work correctly and I'm quite pleased with it. I do have a few requests though. The first one is that whenever I play a movie/tv-series I've set the lights to go off and resume if I pause or stop and it does that correctly. My issue is whenever I want to play some music from the library (or use the Spotify plugin, Spoti MC), it still sends the same event:

Code: Select all

XBMC-Event.<b>OnPlayBackStarted;1</b>
And the lights go off. But I wish whenever I played music media, there wouldn't be any changes to the lights. But for that to happen, the XBMC Event must send something else than OnPlayBackStarted maybe OnMusicPlayBackStarted or something.

Previously I was using a script via SwitchKing to do the work for me and there it worked right out of the box.
See script here -> http://www.satheesh.net/2012/01/09/xbmc-lights/

Anyone with some tips on how to achieve this?? :roll:
This plugin is depreciated... meaning, it uses information from XBMC that is no longer being developed or supported. It might be disabled in the next XBMC release. XBMC has moved to JSON API... take a look at the XBMC2 plugin, it support JSON.
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
Owel
Posts: 41
Joined: Thu May 31, 2012 5:51 am

Re: XBMC Event Receiver

Post by Owel »

Does anybody know if this plugin still works with frodo?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: XBMC Event Receiver

Post by jonib »

Owel wrote:Does anybody know if this plugin still works with frodo?
No, Frodo (and later) don't support Broadcast events anymore.

Frodo has JSON-RPC notifications instead, and my XBMC2 plugin has support for that, you need this test version for Frodo and notification support.

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