Support for XBMC2 plugin (formerly XBMCRepeat)

Questions and comments specific to a particular plugin should go here.
MaxMan23
Posts: 19
Joined: Sat Jun 29, 2013 4:36 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by MaxMan23 » Sun May 31, 2015 4:28 pm

Hi Jonib,

is there a way to get the stereomode of an playing movie over json? Or the complete filename? When i try to select Player and getitem i got a error that the playerid is missing, but i dont know how i could ad it...

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 Jun 02, 2015 9:10 pm

MaxMan23 wrote:is there a way to get the stereomode of an playing movie over json?
All I found is a "stereomode" in the "streamdetails" property but that is always empty for me. You could ask in the Kodi JSON-RPC forum about it if you want here.
Or the complete filename?
Sure example below.
When i try to select Player and getitem i got a error that the playerid is missing, but i dont know how i could ad it...
You need to get the "playerid" first with "Player.GetActivePlayers".

Put this in a macro to get info on a currently playing video:

Code: Select all

XBMC2->JSONRPC->Player.GetActivePlayers with no parameters.
XBMC2->JSONRPC->Player.GetItem with parameters: [{{eg.result[0]["playerid"]}},["file","streamdetails"]]
The "{{eg.result[0]["playerid"]}}" part uses the "playerid" that "Player.GetActivePlayers" returns.
["file","streamdetails"] is a list of properties you want to get, here is the list of properties that you can use.

Ask again if you need more details.

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

MaxMan23
Posts: 19
Joined: Sat Jun 29, 2013 4:36 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by MaxMan23 » Thu Jun 04, 2015 10:15 am

Hi in the Json Forum they wrote:

You should be able to use GUI.GetProperties method adding a steroscoicmode property like such:

{"jsonrpc":"2.0","method":"GUI.GetProperties","params":{"properties":["stereoscopicmode"]},"id":1}

that should give you a result of the current mode like such:

{
"stereoscopicmode": {
"label": "Over/Under",
"mode": "split_horizontal"
}
}


---
How can i test it, could you help me (at moment i am at work, i can try this at home)

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 Jun 04, 2015 12:06 pm

MaxMan23 wrote:Hi in the Json Forum they wrote:
Just paste this in a JSONRPC action:

Code: Select all

{"jsonrpc":"2.0","method":"GUI.GetProperties","params":{"properties":["stereoscopicmode"]},"id":1}
And that's all you need, and when you execute the macro while viewing a 3d video you get the 3d mode.

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

hidalgo
Posts: 3
Joined: Sun Jun 14, 2015 7:40 pm

Put Kodi to sleep while recording

Post by hidalgo » Sun Jun 14, 2015 7:55 pm

I didn’t found an appropriate answer for my problem, so I try to ask by myself.
I got a HTPC running Windows 8.1 with MediaPortal an Kodi 14.2; I have an One4all remote with a Flirc IR.
My system wakes up and goes to sleep automatically when I program a timer to record a tv show. So far so good. Now my problem: I want to send my HTPC to sleep when I don’t use it. It works like a charm and also I can wake up without problem. The only issue: If a recording is active, it will stop this and sends my PC to sleep.
I would like to have a macro that is able to check if a recording is active or not.
I played a little bit around and found out that JSON could be my solution
Bildschirmfoto 2015-06-14 um 11.46.36.png
If a recording is active I get

Code: Select all

"recording":true
if not

Code: Select all

"recording":false
But how can I use it to jump from my shut down macro to cancel or to hibernate?

I hope I have explained it clearly enough.

Thanks

hidalgo
Posts: 3
Joined: Sun Jun 14, 2015 7:40 pm

Re: Put Kodi to sleep while recording

Post by hidalgo » Sun Jun 14, 2015 9:24 pm

Now I found a solution for a similar problem. Maybe someone can help me to find the correct code. In this example it evaluate if Kodi is running minimized.

viewtopic.php?f=9&t=1562&hilit=jump&start=300#p20223

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

Re: Put Kodi to sleep while recording

Post by jonib » Tue Jun 16, 2015 11:00 pm

hidalgo wrote:If a recording is active I get

Code: Select all

"recording":true
if not

Code: Select all

"recording":false
But how can I use it to jump from my shut down macro to cancel or to hibernate?
This should give you the True/False part that you can test:

Code: Select all

{eg.result["recording"]}
You don't need the "{}" if used in a Python script.

For example put this in a "Python command" action, after the JSONRPC action:

Code: Select all

eg.result = eg.result["recording"]
After this put a Jump action, configure it to jump to another macro depending on true(successful) or false(unsuccessful).

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

hidalgo
Posts: 3
Joined: Sun Jun 14, 2015 7:40 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by hidalgo » Sat Jun 20, 2015 7:17 pm

Thank you jonib. Now everything is working like expected. :D

laestrella
Posts: 4
Joined: Wed Jul 08, 2015 12:37 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by laestrella » Wed Jul 08, 2015 12:40 pm

I need some help.

I'm trying to get JSONRPC working with no luck. I get a notification in the log on the left side of eventghost saying that JSON-RPC is connected and HTTP API connected but when I go to configure the JSONRPC plugin I get an error saying error opening jsonrpc.dat. Even kodi brings up a notification saying that eventghost is connected.

Any ideas what I'm doing wrong?

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 » Wed Jul 08, 2015 1:22 pm

laestrella wrote:I'm trying to get JSONRPC working with no luck.
What version of the plugin? What version of Kodi?
but when I go to configure the JSONRPC plugin I get an error saying error opening jsonrpc.dat.
That error shouldn't be a problem, either the plugin should update the JSON commands automatically or you can press the update button. What happens after?
Even kodi brings up a notification saying that eventghost is connected.
OK, so you get a connection to Kodi so your IP setting in the plugin is correct.
Any ideas what I'm doing wrong?
Is the setting "Allow control of Kodi via HTTP" activated in Kodi?

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

laestrella
Posts: 4
Joined: Wed Jul 08, 2015 12:37 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by laestrella » Wed Jul 08, 2015 1:32 pm

jonib wrote:
laestrella wrote:I'm trying to get JSONRPC working with no luck.
What version of the plugin? What version of Kodi?
but when I go to configure the JSONRPC plugin I get an error saying error opening jsonrpc.dat.
That error shouldn't be a problem, either the plugin should update the JSON commands automatically or you can press the update button. What happens after?
Even kodi brings up a notification saying that eventghost is connected.
OK, so you get a connection to Kodi so your IP setting in the plugin is correct.
Any ideas what I'm doing wrong?
Is the setting "Allow control of Kodi via HTTP" activated in Kodi?

jonib
I had an old version of the plugin running...used the download from the first post :-(.

Thank you. It works now.

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 » Wed Jul 08, 2015 5:20 pm

laestrella wrote:I had an old version of the plugin running...used the download from the first post :-(.
Yeah it's really old unfortunately, I haven't made a "proper" release so I haven't updated the first post with the beta/test versions I have released. But now it is mostly useless so I have removed it.
Thank you. It works now.
Great.

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

laestrella
Posts: 4
Joined: Wed Jul 08, 2015 12:37 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by laestrella » Thu Jul 09, 2015 6:22 pm

I'm back with one more issue.

So I've installed eventghost on another machine with the new plugin. And none of the macros are working. It's so bizarre. The macros trigger with the remote but then they don't result in anything happening in kodi. So eventghost is doing it's job but then kodi doesn't respond. The ports are correct. The plugin is the same one that I have on the other computer...Not sure what's going on.

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 Jul 09, 2015 7:31 pm

laestrella wrote:So I've installed eventghost on another machine with the new plugin. And none of the macros are working. It's so bizarre. The macros trigger with the remote but then they don't result in anything happening in kodi.
What have you tried that don't work? attache what EventGhost is logging.

Have you tried the "Test" button in the settings?

Are you getting any errors in EventGhost or in Kodi? (check/post the log from Kodi, info here )

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

laestrella
Posts: 4
Joined: Wed Jul 08, 2015 12:37 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by laestrella » Sun Jul 12, 2015 9:37 pm

jonib wrote:
laestrella wrote:So I've installed eventghost on another machine with the new plugin. And none of the macros are working. It's so bizarre. The macros trigger with the remote but then they don't result in anything happening in kodi.
What have you tried that don't work? attache what EventGhost is logging.

Have you tried the "Test" button in the settings?

Are you getting any errors in EventGhost or in Kodi? (check/post the log from Kodi, info here )

jonib
Forgot to update but.... :oops: :oops:
I rebooted and that fixed the issue. I was beyond annoyed that solved the problem. I was driving myself crazy opening and closing both programs because it didn't make any sense. So I just rebooted the computer and then it worked. Sorry to waste your time.

Post Reply