Page 35 of 94
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Sep 24, 2012 2:46 am
by blaher
blaher wrote:I'm using version 0.6.3e, which as far as I can tell is the latest beta, and I just got the following error:
Error: JSON-RPC event (<type 'exceptions.KeyError'>, KeyError('item',), <traceback object at 0x04699058>)
I turned on raw events, like you suggested, jonib, so hopefully this helps more:
20:29:01 Error: JSON-RPC event (<type 'exceptions.KeyError'>, KeyError('item',), <traceback object at 0x0461C3F0>)
20:29:01 Raw event: {u'params': {u'data': {u'type': u'movie', u'id': 1878}, u'sender': u'xbmc'}, u'jsonrpc': u'2.0', u'method': u'VideoLibrary.OnRemove'}
http://i.imgur.com/xKEV5.png
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Sep 24, 2012 7:15 pm
by jonib
blaher wrote:I turned on raw events, like you suggested, jonib, so hopefully this helps more:
Thanks, now I can see the problem. Looks like I assumed some stuff wrong about the events, I'll try to make it more robust and to show better error message when there is an unsupported event.
You can disable the "Show raw events" if you like I don't think it's needed anymore.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Sep 28, 2012 9:00 pm
by FCB38
Hello,
I find the function
XBMC2: Minimize in the plugin XBMC2. Very cool! But where is the function
XBMC2: Maximise ? How can I maximize XBMC (Restore XBMC in full screen mode) without using this:
Find Window: XBMC.exe
Maximize
Thanks.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Sep 28, 2012 11:17 pm
by blaher
Try find window: xbmc.exe
Bring to front
Minimise didn't work for me, (presumably because I use fullscreen), so I use {alt+tab} instead.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Sep 30, 2012 10:27 am
by FCB38
I use for the moment "find window:XBMC.exe" and "Maximize". It's working almost always but is somes cases not.
That's why I would like that a command "XBMC2:maximize" exists. But for the moment that's not the case.
Perhapps a new command in the next version of the plugin XBMC2? Who can create this?
For blaher:
To minimize I use a script from Pako :
viewtopic.php?f=2&t=3578
And it's working very well.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Tue Oct 02, 2012 4:59 pm
by jonib
To anybody waiting for a response from me, sorry for not responding earlier. I have been dealing with some health stuff that make me rather unproductive, and any response that required me to do any research, I had to wait until I was up to it.
FCB38 wrote:I find the function XBMC2: Minimize in the plugin XBMC2. Very cool! But where is the function XBMC2: Maximise ? How can I maximize XBMC (Restore XBMC in full screen mode) without using this:
Well for some reason I haven't been able to find, there is no maximize/restore function in XBMC. Here is a
list of functions in XBMC. Some might be missing so here should be a complete
list.
I did find some requests for a maximize function
here and
here, but they did not get any responses and was closed.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Tue Oct 02, 2012 5:11 pm
by jonib
FCB38 wrote:I use for the moment "find window:XBMC.exe" and "Maximize". It's working almost always but is somes cases not.
"Find Window: XBMC.exe" and
"Bring to front" works fine for me. Have you tried that?
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Tue Oct 02, 2012 5:27 pm
by jonib
Lunatixz wrote:No firewall or AV, XBMC is on the same system as eventghost; i'm running 11.01 final (EDEN) System receives json and broadcast events but won't build the dat for jsonrpc... I checked my appdata folders but no file, I have no problem building the httpapi dat...
Can you use the normal actions from
XBMC2\Buttons,
XBMC2\Actions and
XBMC2\Windows?
Can you use the HTTPAPI action?
Only thing I can think of is that the first port in the XBMC2 config doesn't match what you have set in XBMC, or you haven't configured XBMC to accept external control. I'll add more debug stuff and better error messages in the next (test) version.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Oct 03, 2012 5:13 am
by blaher
As far as I can tell, that script is for determining whether an application is running full-screen or not, but that is not necessary for me, because XBMC is always running full-screen.
For some reason the minimise function in XBMC doesn't work all the time, so I use {alt + tab} instead. Just to clarify, I don't use fullscreen window, but rather a true fullscreen.
Thanks anyway, it might be handy to know in the future.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 08, 2012 5:47 am
by Livin
Joni,
I have not been using the JSON API art of your plugin for a while but decided to use it again... but now I'm getting an error connecting....
22:34:40 XBMC - enable JSON
22:34:40 XBMC2.JSONRPCEventsConnect()
22:34:40 Error in Action: "XBMC2.JSONRPCEventsConnect()"
22:34:40 Traceback (most recent call last) (1572):
22:34:40 File "<string>", line 1, in <module>
22:34:40 NameError: name 'XBMC2' is not defined
... using EG version 0.4.1 r1572 and XBMC2 latest version 'e' and XBMC Frodo Alpha 6.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 08, 2012 11:26 am
by jonib
Livin wrote:Joni,
I have not been using the JSON API art of your plugin for a while but decided to use it again... but now I'm getting an error connecting....
... using EG version 0.4.1 r1572 and XBMC2 latest version 'e' and XBMC Frodo Alpha 6.
I'm not sure from your error if this is the only problem.
But I haven't made the plugin compatible with Frodo yet, look
here for a temporary fix.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 08, 2012 3:26 pm
by Livin
The error occurs when running "XBMC2.JSONRPCEventsConnect()" ... I thought we had to run this when XBMC starts up in order for EG (your plugin) to connect?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 08, 2012 5:18 pm
by jonib
Livin wrote:The error occurs when running "XBMC2.JSONRPCEventsConnect()" ... I thought we had to run this when XBMC starts up in order for EG (your plugin) to connect?
You need to run it to activate JSON-RPC events only. I don't think any JSON-RPC actions work with Frodo unless you use the fix I linked or I actually get a new version out.
I'll try to make a new version this week, that supports Frodo and fixes any bugs reported.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 08, 2012 5:50 pm
by Livin
Ignore the 'error' I've been talking about... if all else fails, delete and recreate the action. Something happened to the action, in EG that corrupted it. Once I deleted that action and created it again, it started working.
BUT when I'm trying to create custom Actions it seems that the "Update" button is throwing an error...
Code: Select all
11:25:30 XBMC2: JSONRPC: .
11:25:30 Error in Action: "XBMC2: JSONRPC: ."
11:25:30 Traceback (most recent call last) (1572):
11:25:30 File "C:\Users\ha\Documents\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
11:25:30 return self(*args)
11:25:30 File "C:\Users\ha\Documents\EventGhost\plugins\XBMC2\__init__.py", line 895, in __call__
11:25:30 responce = self.plugin.JSON_RPC.send(method, ast.literal_eval(ParseString2(param)))
11:25:30 File "C:\Users\ha\Documents\EventGhost\plugins\XBMC2\__init__.py", line 553, in ParseString2
11:25:30 res = eval(word, {}, eg.globals.__dict__)
11:25:30 File "<string>", line 1, in <module>
11:25:30 TypeError: 'NoneType' object is unsubscriptable
11:26:02 JSON-RPC connection error: http://127.0.0.1:8080
11:26:02 {"jsonrpc": "2.0", "id": 1, "method": "JSONRPC.Version"}
11:26:02 Error opening: jsonrpc.dat
One thought/suggestion... since JSON is a PITA, it might be good to create/share EG macros that expose (capture/log/variablize) a standard set of info people will use the most... filename, moviename, songname, episode title, etc. Can you package these in the plugin itself?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 08, 2012 10:09 pm
by jonib
Livin wrote:Ignore the 'error' I've been talking about... if all else fails, delete and recreate the action. Something happened to the action, in EG that corrupted it. Once I deleted that action and created it again, it started working.
OK
BUT when I'm trying to create custom Actions it seems that the "Update" button is throwing an error...
Did you do the fix from
here? Or else it can't work as Frodo is more strict when sending commands to XBMC.
One thought/suggestion... since JSON is a PITA, it might be good to create/share EG macros that expose (capture/log/variablize) a standard set of info people will use the most... filename, moviename, songname, episode title, etc. Can you package these in the plugin itself?
I don't think I can add any macros to the plugin directly, I would need to create specific actions in that case. When I'm finished with the JSON-RPC part I'll see what can be made easier. I could link to ready made macros from the plugin and this thread, but that will have to be after I finish the next proper release.
jonib