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.

Support for XBMC2 plugin (formerly XBMCRepeat)

Questions and comments specific to a particular plugin should go here.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

GhostMine wrote:I'm having the same issue as AceJoker. For no reason the plugin seems to just stop announcing events. If I go into the plugin and untick json and broadcast then apply, then Ok.....then go back in and reselect them and apply then it usually starts working again for a while.
Seems a bit different as AceJoker don't seem to get any events at all.
What version of XBMC/Kodi(and on what system) are you using? Do you have any info on when the events stop? Like have you done anything specific before the events stop? Any information could help me get an idea what might be the problem.

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: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Acejoker wrote:I've been desperately trying to get eventghost to detect events from XBMC/Kodi (V14.2) with no luck. I have the JSON-RPC Notification enabled in eventghost (0.4.1r1700) and Service Remote Control and UPnP are also enabled in Kodi.

The Eventghost log doesn't throw any error of any sort and also displays that JSON-RCP is communicating with Kodi. (XBMC2: Connected to XBMC ( 127.0.0.1 : 9090 ), ready to receive JSON-RPC notifications.). However, when I use Kodi, I don't see any events being logged into eventghost other than Task.Activated/Task.Deactivated.
Could you try the attached XBMC2 plugin? (Just place it in "EventGhost dir\Plugins\XBMCRepeat") activate the "Debug" option in the plugins settings, then post the EventGhost log after you have started Kodi and waited a couple of minutes. So I see whats happening after the plugin connects to Kodi.

Hopefully this gives me an idea whats happening.

jonib
Attachments
__init__.py
XBMC2 debug ver 0.6.21 "Log me bro" edition.
(113.78 KiB) Downloaded 126 times
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: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

GhostMine wrote:For no reason the plugin seems to just stop announcing events.
Could you test the test plugin I just posted above? If you get the same problem activate the debug option and post a log (if you can) when XBMC/Kodi stops sending events.

The plugin sends a "Ping" command so XBMC/Kodi knows the plugin is still listening, this shouldn't be necessary as there is an active connection, but that was my only idea at the moment without more information.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Acejoker
Posts: 7
Joined: Wed Apr 29, 2015 2:55 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Acejoker »

jonib wrote:Could you try the attached XBMC2 plugin? (Just place it in "EventGhost dir\Plugins\XBMCRepeat") activate the "Debug" option in the plugins settings, then post the EventGhost log after you have started Kodi and waited a couple of minutes. So I see what's happening after the plugin connects to Kodi.
jonib
I tried the plugin you gave me and I was just getting a timeout loop until I changed my HTTP port to '8080' in Kodi, then I started to get the 'Pong' response. I'm still not getting any events logged even after successfully getting the response though...
Untitled-1.jpg
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Acejoker wrote:I tried the plugin you gave me and I was just getting a timeout loop until I changed my HTTP port to '8080' in Kodi, then I started to get the 'Pong' response. I'm still not getting any events logged even after successfully getting the response though...
Your log shows that you are getting some events from Kodi, the "XBMC2.Input.OnInput*" ones. So it seems the plugin is working and properly connected to Kodi.
If you are missing some events then it seems Kodi is not sending them.

Edit: Try the attached plugin, It shows "Notifications" that show what events Kodi is sending, maybe yours is configured differently for some reason. So post this "XBMC2: JSON-RPC responce: "notifications":" from the log, thanks.

jonib
Attachments
__init__.py
XBMC2 debug ver
(114.12 KiB) Downloaded 141 times
XBMC2 plugin to control XBMC. If you want to flatter me Image
Acejoker
Posts: 7
Joined: Wed Apr 29, 2015 2:55 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Acejoker »

jonib wrote:Try the attached plugin, It shows "Notifications" that show what events Kodi is sending, maybe yours is configured differently for some reason. So post this "XBMC2: JSON-RPC responce: "notifications":" from the log, thanks.
jonib
I downloaded your plugin and suddenly started to get notifications. However, I only get notifications for playback stop play event types. If I try to launch an addon, nothing shows up on the EG log. Here's a screenshot of xbmc2 displaying notifications from kodi in EG;
Untitled-1.jpg
Here's the log from the plugin running the debug script;
Untitled-2.jpg
and finally, here are my plugin settings; in case I did anything stupid...
Untitled-3.jpg
I wish I new if the plugin wasn't working because of some settings on my end, but I have no idea what I did other than install your new plugin to get XBMC2 to start login some events.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Acejoker wrote:However, I only get notifications for playback stop play event types. If I try to launch an addon, nothing shows up on the EG log.
It seems starting a plugin won't create an event at the moment, unless the plugin creates it itself.
I wish I new if the plugin wasn't working because of some settings on my end, but I have no idea what I did other than install your new plugin to get XBMC2 to start login some events.
Seems like EventGhost and my plugin works correctly for you now, so your configuration seems correct.
If you need some events that you are not getting you need to ask/make a request in the Kodi JSON-RPC forum, as I have no control of making new events.

I'm working on a context menu in EventGhost that checks where in Kodi I am (like in a plugin) and shows a different menu, so I have relevant commands in the menu. I am going to post a tutorial how to do it (When? no idea) and maybe you can use the same technique for your use case, it's not as convenient as getting an event but it should work .

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Acejoker
Posts: 7
Joined: Wed Apr 29, 2015 2:55 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Acejoker »

jonib wrote:If you need some events that you are not getting you need to ask/make a request in the Kodi JSON-RPC forum, as I have no control of making new events.
jonib
I had a look at the link you provided and ended up looking at the JSON-RCP API wiki page and it looks like the command I'm looking for is the Addons.ExecuteAddon. however, I have no idea how to implement JSON code with Eventghost.

Would you be able to provide some guidance as to how I should approach this?

Thanks again for the help.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Acejoker wrote:Would you be able to provide some guidance as to how I should approach this?
Don't have time right now but check this link (ignore the test version part), it has an example how to use Addons.ExecuteAddon in EventGhost. If you search for ExecuteAddon in this forum you find other examples.
If you tell me what plugin you want to start I'll see if I can give an example, if the other examples aren't enough.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Acejoker
Posts: 7
Joined: Wed Apr 29, 2015 2:55 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Acejoker »

jonib wrote:it has an example how to use Addons.ExecuteAddon in EventGhost. If you search for ExecuteAddon in this forum you find other examples.
jonib
Got it working with an example you had previously given to someone else. I'll just rewrite it here in case someone else is struggling with this as well;

{"jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "params": { "addonid": "plugin.program.advanced.launcher"}, "id": 1 }

I also had no idea where to put the JSON Custom Code, so for anyone wondering this is where the code gets entered;

Add Action --> XBMC2 --> Experimental --> JSONRCP

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Acejoker wrote:Got it working with an example you had previously given to someone else.
Great, and thanks for posting back that you got it working (and how), as too many people just disappear when they got what they wanted.

And I'm working on documenting (making examples of) these kind of commands but it is going sloow, as that is the least interesting part of development for me (and one of the most important unfortunately).

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
GhostMine
Posts: 4
Joined: Mon Sep 09, 2013 9:13 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by GhostMine »

jonib wrote:
GhostMine wrote:I'm having the same issue as AceJoker. For no reason the plugin seems to just stop announcing events. If I go into the plugin and untick json and broadcast then apply, then Ok.....then go back in and reselect them and apply then it usually starts working again for a while.
Seems a bit different as AceJoker don't seem to get any events at all.
What version of XBMC/Kodi(and on what system) are you using? Do you have any info on when the events stop? Like have you done anything specific before the events stop? Any information could help me get an idea what might be the problem.

jonib
Oh I see. Ya I can get it to work, but suddenly its offline. I am not sure what is going on when it happens. I know right away when starting Kodi if it is working or not as I added a speech macro to catch its starting up event. If it doesn't say "cody active" when I start the program, or "cody shut down" when exiting, I know the plugin is offline.

I will try the updated plugin when I get some time here. Just putting out all sorts of fires since upgrading to Lollipop on my phone and losing 2 3TB hdd's virtually simultatneously. :|
peppe_sr
Posts: 5
Joined: Sat May 19, 2012 8:32 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by peppe_sr »

hi guys, i need a little help, i would like to map a button of my remote with this command.

Code: Select all

RunScript(script.audio.profiles,0)
could someone point me on right way.
tnx
Peppe
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

peppe_sr wrote:hi guys, i need a little help, i would like to map a button of my remote with this command.

Code: Select all

RunScript(script.audio.profiles,0)
could someone point me on right way.
So the RunScript command is not available in the plugin at the moment. But I held this reply hostage just to force me to add this (and other BuiltInFunctions), it took a bit longer than I wanted. So sorry for the late reply and the next post will have a new development version of the plugin with the new functions.

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: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib »

Hi, so here is a new development version 0.6.23.

I have (finally) added all the missing built-In Functions, that I basically forgot to finish as I started to work on JSON-RPC support and my development became less efficient. :lol: :cry:

So there is a new action XBMC2->Experimental->BuiltInFunctions
BuiltInFunctions.png
It gets the syntax from Kodis wiki unfortunately not all functions parameters are documented.

Edit: I did a fast update to add support for using Python code in the parameter field using "{ python code }",

Like always please backup your config and old plugin if you are going to test/use this. Any feedback is appreciated.

jonib
Attachments
__init__.py
XBMC2 dev ver 0.6.23 The function(al) edition.
(121.88 KiB) Downloaded 451 times
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply