Support for XBMC2 plugin (formerly XBMCRepeat)

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Tue Dec 31, 2019 7:42 am

fuqit3 wrote:
Mon Dec 30, 2019 9:41 pm
Thanks! but I don't need it, things are working correctly now after an update.
OK

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

fuqit3
Posts: 20
Joined: Sat Mar 04, 2017 5:22 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by fuqit3 » Fri Jan 03, 2020 10:24 pm

Jonib
Still having issues after the update so I do need your help with this. Would you mind?
Thx!

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Jan 03, 2020 11:09 pm

fuqit3 wrote:
Fri Jan 03, 2020 10:24 pm
Still having issues after the update so I do need your help with this. Would you mind?
Sure, your in luck that I hadn't started my PC (re)build yet :D

You need my XBMC2 plugin then create a macro in EventGhost, add a "Python script" action, paste the below code:

Code: Select all

eg.plugins.XBMC2.JSONRPC(u'Addons.SetAddonEnabled', u'["pvr.wmc", False]', True, True)
eg.plugins.EventGhost.Wait(1.0)
eg.plugins.XBMC2.JSONRPC(u'Addons.SetAddonEnabled', u'["pvr.wmc", True]', True, True)
This should disable the "pvr.wmc" plugin, wait 1 second then enable it again.

Hope it works for you.

jonib

Edit: If using older XBMC2 plugin included in EventGhost .4 use this code:

Code: Select all

eg.plugins.XBMC2.JSONRPC(u'Addons.SetAddonEnabled', u'["pvr.wmc", False]', True)
eg.plugins.EventGhost.Wait(1.0)
eg.plugins.XBMC2.JSONRPC(u'Addons.SetAddonEnabled', u'["pvr.wmc", True]', True)
XBMC2 plugin to control XBMC. If you want to flatter me Image

fuqit3
Posts: 20
Joined: Sat Mar 04, 2017 5:22 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by fuqit3 » Sat Jan 04, 2020 7:29 pm

Many Many thanks!!! it works

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Sat Jan 04, 2020 7:52 pm

fuqit3 wrote:
Sat Jan 04, 2020 7:29 pm
Many Many thanks!!! it works
Great 8) , thanks for letting me know.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

powermarcel10
Posts: 1
Joined: Thu Jan 16, 2020 5:39 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by powermarcel10 » Thu Jan 16, 2020 5:48 pm

Hi and thanks for this great plugin! Using it for a lot of things..

However, I'm missing one thing..

I want the navigation buttons as triggers for events.. When I navigate through kodi, in eventghost I see these actions as raw RAW events. By example for moving down in Kodi:

XBMC2: Raw event: 'XBMC\x02\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x01\x00\x0eU\x89\x1e\xe8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x003\x00\x00R1\x00down\x00' ('MY.IP.Adress', 44775)

But im not able to use this as a trigger/event in Eventghost.

The reason I want this: For watching television, im using a windows 10 app from my tv provider wich can be launched from kodi. I like to navigate through that app by using my yatse app on my phone. So when I swipe up, kodi (and so eventghost) detects it, and simulate a pressing up button command in the actual app I'm using.

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu Jan 16, 2020 7:58 pm

What version of Kodi/XBMC are you using?
powermarcel10 wrote:
Thu Jan 16, 2020 5:48 pm
XBMC2: Raw event: 'XBMC\x02\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x01\x00\x0eU\x89\x1e\xe8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x003\x00\x00R1\x00down\x00' ('MY.IP.Adress', 44775)
That seems to be a "Broadcast event" but the format seems to be different, I'm guessing it is from a plugin and if so I need to know what plugin.

edit:
Or list the full raw events you need.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu Jan 23, 2020 12:19 pm

@jachin99: Did you get it to work?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jachin99
Experienced User
Posts: 645
Joined: Sat Feb 13, 2016 8:39 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jachin99 » Thu Apr 16, 2020 1:14 am

@Jonib, I did get that to work!! I have some other remote behaviors I would like to change in kodi. Because my remote is special editing keyboard and remote.xml files isn't doing the trick. I would like to see if I can change the actions kodi will take based on context. Going back to movie example I would like Kodi to play a disc or bring up the disc's menu if there is a movie in my PC's bluray drive, if there is no disc then I would like to simply bring up my movie library so...

If disc is in drive
play disc
else
show movie library

if that makes sense. Is that something I can do with this plugin?

Sem;colon
Plugin Developer
Posts: 701
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Sem;colon » Thu Apr 16, 2020 12:14 pm

Hi jachin,
Without looking at it, as long as Eventghost knows there is a disc in your drive, you can do that. The plugin just needs to be able to execute the commands "play disc" and "play movie".
The logic which one to use needs to be setup in Eventghost itself.
There are multiple options to do this: For example you could trigger a Python script action and put your condition and the actions in there. Another way would be to create two macros (one for each action) that trigger on the same event but get exclusively activated depending on if there is a disc in your drive or not.
If you like my work, Image me a drink :wink:

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu Apr 16, 2020 4:51 pm

There is a "Boolean condition" in Kodi "System.HasMediadvd" that should work to check for a disc.
And the PlayDisc() function should work to play the disc.

So it should all work to do via the plugin.

Unfortunately I need to replace my optical drive as my current don't work anymore I'll try to do it today.
Also my EventGhost rc6 don't allow me to edit the config so I'll have to try to fix that before I can look into this more.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jachin99
Experienced User
Posts: 645
Joined: Sat Feb 13, 2016 8:39 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jachin99 » Thu Apr 16, 2020 8:03 pm

Thanks Semi;colon, and Jonib. I'm still on RC4 for that exact reason.

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

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Apr 17, 2020 8:36 pm

jachin99 wrote:
Thu Apr 16, 2020 1:14 am
If disc is in drive
play disc
else
show movie library
Put this in a Python script action in EventGhost:

Code: Select all

result = eg.plugins.XBMC2.JSONRPC(u'XBMC.GetInfoBooleans', u'[["System.HasMediadvd"]]', True)
if result["System.HasMediadvd"]:
    print("Disc")
    eg.plugins.XBMC2.PlayDVD()
else:
    print("No disc")        
It will play the disc if available or print in the EventGhost log "No disc" when executed.

I don't have any movies scanned in my test Kodi so couldn't test the "show movie library" part, but we can expand it later.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jachin99
Experienced User
Posts: 645
Joined: Sat Feb 13, 2016 8:39 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jachin99 » Fri Apr 17, 2020 9:02 pm

Jonib, thanks for the help. When I get a chance to sit down in front of Kodi to test changes I'll try that.

jachin99
Experienced User
Posts: 645
Joined: Sat Feb 13, 2016 8:39 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jachin99 » Sat Apr 18, 2020 2:13 am

I would want to send Kodi this command if there is no disc in the tray.

ActivateWindow (10025,videodb://movies/titles/,return)

Also, I may need to set up conditions where remote presses perform different actions based on the current window so Skip Minus seeks back ten seconds if I'm watching live TV but goes to the previous chapter if I'm watching a movie for instance. How would I do something like that? I think once I set up a few more of these I might be able to make them on my own. Thanks again!!

Post Reply