Posts: 48
Joined: Feb 2009
Reputation:
0
Hi guys!
I'm currently working on a little home automation project and I want to integrate XBMC in it. I currently listen to JSON events and take actions accordingly, but I also want to control XBMC in some situations and I can't seem to get it right. I try for instance to pause the player using the following command, but it doesn't work.
{"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":1},"id":1}
What am I doing wrong? It doesn't work and I get no response at all. Is it some permission issue?
Posts: 48
Joined: Feb 2009
Reputation:
0
I send it using telnet for testing purposes and I tried sending another command for getting some information and it works. I'm just not sure if my syntax is incorrect for Player.PlayPause or if there are some permissions that have to be set somehow to be able to control the player. Do I have to login somehow perhaps?
Posts: 5,184
Joined: Jan 2009
Reputation:
131
He's using a TCP socket so the Content-Type doesn't matter because it's not HTTP. I can't see anything obviously wrong with your request. So a debug log of XBMC when you run your request would be necessary to see if XBMC actually receives the request or not. Maybe you are using the wrong "playerid" but in that case you should still receive an error as a response. No response is only done in case of client-side notifications but as you provide "id": 1 in your request that's not the case either.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 254
Joined: May 2011
Reputation:
2
yallah
Senior Member
Posts: 254
2012-09-30, 04:15
(This post was last modified: 2012-09-30, 04:16 by yallah.)
Hi, can't resume movie. When I start movie and stop later. Can't continue from last position. I find methods but doesn't work :
{"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "Y:/Avatar.3DBD/Avatar.mkv"} , "options":{ "resume":true } }, "id": 1}
any idea ? Thx by advance
Posts: 5,184
Joined: Jan 2009
Reputation:
131
I just tested it with a few movies and episodes I have a resume point and it works fine for every one of those independent of whether I use the path to the file or the movieid/episodeid in Player.Open. Are you sure that you have a resume point for that specific video? Depending on how you scanned it into the library the path XBMC uses to store the resume point might be different (e.g. "Y:/Avatar.3DBD/"). Did playback start at all or did you receive an error?
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.