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 »

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

Re: XBMC Event Receiver

Post by Livin »

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

Re: XBMC Event Receiver

Post by jonib »

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

Re: XBMC Event Receiver

Post by Livin »

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

Re: XBMC Event Receiver

Post by jonib »

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

Re: XBMC Event Receiver

Post by Livin »

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

Re: XBMC Event Receiver

Post by jonib »

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

Re: XBMC Event Receiver

Post by Livin »

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

Re: XBMC Event Receiver

Post by jonib »

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

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

Post by Livin »

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: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: XBMC Event Receiver

Post by Livin »

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

Re: XBMC Event Receiver

Post by jonib »

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

Re: XBMC Event Receiver

Post by Livin »

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

Re: XBMC Event Receiver

Post by jonib »

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
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: XBMC Event Receiver

Post by Lunatixz »

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
Post Reply