Jump to content

Send "Pause/Play" via action File to Kodi

Recommended Posts

Hello,

I want to send Kodi via PSE action Module to Pause or Play the movie.

Her is my File but it doesn´t work. I think that file is wrong. Can anybody help me with the file?

Thanks in advance...

I write in my action file:

POST:http://192.168.xx.xx:8080/jsonrpc -u kodi:password -d {"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":0,"play":false},"id":1}

Link to comment
Share on other sites

  • Administrator

The code that you want is something along the lines of:

sleep://3600000

http://username:password@ip#:8080/jsonrpc
{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":0}

sleep://600000

http://username:password@ip#:8080/jsonrpc
{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":0}

Add other functions a you want. 

Make sure you have your system set up to allow this in settings > services > control.

Link to comment
Share on other sites

Hello, Now I finally got around to testing the script.

I put it in front of the feature in PSE as a script.pseaction file. If I go to action and test in edit sequence, it shows that everything is ok.

But if I let it run with a film, the pause doesn't work. Nothing happens.

 

I have enabled “Allow control via http” in Kodi. Have I perhaps forgotten something? Have you an Idea?

 

Another question would be, is it possible to display a reference to the break as an image.jpg before the break? Something Like this:

sleep://3600000

http://username:password@ip#:8080/jsonrpc
{"jsonrpc":"2.0","method":"GUI.ShowNotification","params": {"image":"image://test//hdr10.png", "displaytime":5000 },"id":"0}

sleep://2000

http://username:password@ip#:8080/jsonrpc
{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":0}

sleep://600000

http://username:password@ip#:8080/jsonrpc
{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":0}
Link to comment
Share on other sites

I test a little bit and Matts pseaction file is running perfect. My fault, I test first with the default Sequence and that doesn´t work. If I test it with a new Sequence everything is running perfekt. I can also show a notification, but if anyone has an idea, how to show a image.jpg, I´m absolutely happy.😃


Here is the pseaction Test with Notification before the Pause:

sleep://20000

http://kodi:kodi@192.0.0.0:8080/jsonrpc
{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Pause","message":"10 Minuten","displaytime":7000},"id":0}

sleep://2000

http://kodi:kodi@192.0.0.0:8080/jsonrpc
{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":0}

sleep://20000

http://kodi:kodi@192.0.0.0:8080/jsonrpc
{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":0}

 

  • Like 1
Link to comment
Share on other sites

Can someone at least tell me where I can find the KaiDialogToast.xml? Or, if this doesn't exist, as in my case, tell me what the xml is called with which I can influence the GUI.ShowNotification.

In any case, KaiDialogToast.xml cannot be found under: \\SHIELD\internal\Android\data\org.xbmc.kodi\files\.kodi\addons\skin.estuary\xml.

Thank you
Link to comment
Share on other sites

  • Administrator

Are you trying to show an image for the intermission with GUI.ShowNotification?  If so, I think that the only image in the notification is the icon.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


 Share

×
×
  • Create New...