Page 73 of 94
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun May 31, 2015 4:28 pm
by MaxMan23
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...
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Tue Jun 02, 2015 9:10 pm
by jonib
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
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 04, 2015 10:15 am
by MaxMan23
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)
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jun 04, 2015 12:06 pm
by jonib
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
Put Kodi to sleep while recording
Posted: Sun Jun 14, 2015 7:55 pm
by hidalgo
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
If a recording is active I get
if not
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
Re: Put Kodi to sleep while recording
Posted: Sun Jun 14, 2015 9:24 pm
by hidalgo
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
Re: Put Kodi to sleep while recording
Posted: Tue Jun 16, 2015 11:00 pm
by jonib
hidalgo wrote:If a recording is active I get
if not
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:
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
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sat Jun 20, 2015 7:17 pm
by hidalgo
Thank you jonib. Now everything is working like expected.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Jul 08, 2015 12:40 pm
by laestrella
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?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Jul 08, 2015 1:22 pm
by jonib
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
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Jul 08, 2015 1:32 pm
by laestrella
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.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Jul 08, 2015 5:20 pm
by jonib
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
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jul 09, 2015 6:22 pm
by laestrella
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.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Thu Jul 09, 2015 7:31 pm
by jonib
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
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Jul 12, 2015 9:37 pm
by laestrella
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....
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.