XBMC Event Receiver

Do you have questions about writing plugins or scripts in Python? Meet the coders here.

Re: XBMC Event Receiver

Postby jonib » Tue Jan 03, 2012 5:36 pm

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
jonib
Plugin Developer
 
Posts: 713
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby rickardk » Tue Jan 03, 2012 9:34 pm

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
rickardk
 
Posts: 14
Joined: Thu Dec 31, 2009 3:16 pm

Re: XBMC Event Receiver

Postby jonib » Wed Jan 04, 2012 12:13 am

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: 713
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby jonib » Wed Jan 04, 2012 12:40 am

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
Attachments
__init__.py
Updated to handle non US characters.
(8.95 KiB) Downloaded 167 times
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 713
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby rickardk » Wed Jan 04, 2012 4:10 am

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

Thanks a million!!
rickardk
 
Posts: 14
Joined: Thu Dec 31, 2009 3:16 pm

Re: XBMC Event Receiver

Postby zootoxin » Sat Mar 03, 2012 9:57 pm

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
zootoxin
 
Posts: 17
Joined: Mon Sep 19, 2011 1:02 pm

Re: XBMC Event Receiver

Postby jonib » Sat Mar 03, 2012 10:49 pm

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
jonib
Plugin Developer
 
Posts: 713
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby zootoxin » Sun Mar 04, 2012 9:20 pm

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
zootoxin
 
Posts: 17
Joined: Mon Sep 19, 2011 1:02 pm

Re: XBMC Event Receiver

Postby jonib » Sun Mar 04, 2012 10:26 pm

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
jonib
Plugin Developer
 
Posts: 713
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby nicobo » Sun Apr 01, 2012 2:29 pm

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
nicobo
 
Posts: 1
Joined: Sun Apr 01, 2012 1:55 pm

Re: XBMC Event Receiver

Postby satheesh.net » Sat Sep 15, 2012 10:01 am

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

Postby satheesh.net » Sat Sep 15, 2012 10:25 am

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

Postby Livin » Sat Sep 15, 2012 4:54 pm

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
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Previous

Return to Coding Corner

Who is online

Users browsing this forum: Bing [Bot] and 1 guest