XBMC Event Receiver

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

Re: XBMC Event Receiver

Postby jonib » Wed Sep 22, 2010 11:59 am

Livin wrote:Since XBMC is in B2 now I'd think the JSON interface is pretty well baked?
Looks like the JSON-RPC interface isn't planned to be fully finished until Eden, at least there is some documentation now here, unfortunately it's not complete.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Livin » Wed Sep 22, 2010 3:14 pm

darn... and I cannot get this plugin to work 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
User avatar
Livin
Experienced User
 
Posts: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby jonib » Wed Sep 22, 2010 9:18 pm

Livin wrote:darn... and I cannot get this plugin to work either.
It seems to work fine for me on XBMC Dharma beta1&2.

Edit: using port 8080

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Livin » Wed Sep 22, 2010 9:30 pm

jonib wrote:
Livin wrote:darn... and I cannot get this plugin to work either.
It seems to work fine for me on XBMC Dharma beta1&2.

Edit: using port 8080

jonib


What IPs are you using for both address it asks for? Are you using 8080 for both also?
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: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby jonib » Wed Sep 22, 2010 9:51 pm

Livin wrote:What IPs are you using for both address it asks for? Are you using 8080 for both also?
XBMCEvent.PNG

Edit: I only changed XBMC host IP and XBMC HTTP port.
Edit2: I think Respond to Self Broadcast needs to be checked if XBMC is running on the same system.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Livin » Wed Sep 22, 2010 11:55 pm

I tried your exact settings (and others)... It crashes, and I must kill EG since the dialog never closes.

Code: Select all
4:54:26 PM   Traceback (most recent call last):
4:54:26 PM     File "EventGhost.pyw", line 31, in <module>
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 102, in Main
4:54:26 PM       stackless.run()
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 41, in ProcessingTask
4:54:26 PM       self.Configure(*args, **kwargs)
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 126, in Configure
4:54:26 PM       self.item.Configure(*args)
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 107, in Configure
4:54:26 PM       return self.executable.Configure(*args)
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\plugins\XBMCEventReceiver\__init__.py", line 175, in Configure
4:54:26 PM       urllib.urlopen(url_xbmc)
4:54:26 PM     File "urllib.pyc", line 87, in urlopen
4:54:26 PM     File "urllib.pyc", line 206, in open
4:54:26 PM     File "urllib.pyc", line 345, in open_http
4:54:26 PM     File "httplib.pyc", line 892, in endheaders
4:54:26 PM     File "httplib.pyc", line 764, in _send_output
4:54:26 PM     File "httplib.pyc", line 723, in send
4:54:26 PM     File "httplib.pyc", line 704, in connect
4:54:26 PM     File "socket.pyc", line 514, in create_connection
4:54:26 PM   IOError: [Errno socket error] [Errno 10061] No connection could be made because the target machine actively refused it
4:54:26 PM   Traceback (most recent call last):
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\Classes\ButtonRow.py", line 108, in OnOK
4:54:26 PM       self.parent.OnOK(event)
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 161, in OnOK
4:54:26 PM       self.DispatchEvent(event, wx.ID_OK)
4:54:26 PM     File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 122, in DispatchEvent
4:54:26 PM       self.__processingChannel.send(wx.ID_OK)
4:54:26 PM   TaskletExit
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: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby jonib » Thu Sep 23, 2010 12:09 am

I changed the HTTP port to 8081 in the plugin, and I got the same error as you did.
What port do you have in XBMCs HTTP setting? as that needs to be the same.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Livin » Thu Sep 23, 2010 12:31 am

thx... XBMC must be running otherwise it pukes. So looks like I need to have it disabled when EG starts up and only enable it when XBMC launches.

would be a good thing to put in the read me ;)
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: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby jonib » Thu Sep 23, 2010 1:19 am

Livin wrote:would be a good thing to put in the read me ;)
Or make it not puke. :twisted:

jonib
Attachments
__init__.py
Non puking version
(8.75 KiB) Downloaded 193 times
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Livin » Thu Sep 23, 2010 2:10 am

ha... funny :)

very cool. thx.
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: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby Livin » Sun Sep 26, 2010 12:31 am

I got this running but it does not send me any usable data. Example...

4:34:11 PM XBMC Event Broadcast listener ENABLED on Local Host @ 192.168.2.11:8278. Response to XBMC is True.
4:34:11 PM XBMC-Event.<b>OnAction:1;2</b>
4:34:12 PM XBMC-Event.<b>OnAction:1;2</b>
4:34:13 PM XBMC-Event.<b>OnAction:1;2</b>
4:34:16 PM XBMC-Event.<b>OnAction:7;2</b>
4:34:19 PM XBMC-Event.<b>OnAction:7;2</b>
4:34:20 PM XBMC-Event.<b>OnAction:4;2</b>
4:34:21 PM XBMC-Event.<b>OnAction:3;2</b>
4:34:21 PM XBMC-Event.<b>OnAction:4;2</b>
4:34:22 PM XBMC-Event.<b>OnAction:7;2</b>
4:34:23 PM XBMC-Event.<b>OnAction:10;2</b>


... how are we to translate that into what is really going on?

My goal is to trigger macros based upon what XBMC is doing, like...

1) when different libraries are entered (Movies, TV Shows, Pictures, Video, etc) so I can trigger Macros in EG
2) when a specific script is run, by script name would be best.

any ideas?
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: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby jonib » Sun Sep 26, 2010 12:57 am

Livin wrote:I got this running but it does not send me any usable data. Example...
I'm getting some usable data (just removed some duplication)
Code: Select all
XBMC Event Broadcast listener ENABLED on Local Host @ 192.168.0.102:8278. Response to XBMC is True.
XBMC-Event.<b>OnAction:79;2</b>
XBMC-Event.<b>OnPlayBackResumed;1</b>
XBMC-Event.<b>OnAction:79;2</b>
XBMC-Event.<b>OnPlayBackPaused;1</b>
XBMC-Event.<b>OnAction:13;2</b>
XBMC-Event.<b>OnPlayBackStopped;1</b>
XBMC-Event.<b>OnAction:9;2</b>

... how are we to translate that into what is really going on?
Experiment :twisted: , or ask on the XBMC forum.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Livin » Fri Oct 01, 2010 5:37 pm

I've not found any viable info on this... plus, with the HTTP interface going away it might not be worth it at all.
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: 753
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Postby jonib » Fri Oct 01, 2010 6:21 pm

Livin wrote:I've not found any viable info on this... plus, with the HTTP interface going away it might not be worth it at all.
I don't think the events stuff is going to change that much, as the HTTP API is only used to control event level and to turn it on or off.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 748
Joined: Thu Mar 26, 2009 9:33 pm

Re: XBMC Event Receiver

Postby Lunatixz » Fri Apr 29, 2011 7:02 pm

Can someone tell me how to setup XBMC Event receiver with Dharma Build?

I've enabled Web server, and setup port... but EG never receives commands..
log shows: str(url_xbmc) Connection Error

Any help would be great... I'm trying as many users are to capture xbmc events to trigger eg commands
Lunatixz
 
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

PreviousNext

Return to Coding Corner

Who is online

Users browsing this forum: No registered users and 4 guests