Hi there!
Would it be possible to have a script running in the background checking if a movie is paused and if nothing is running?
I have a 5M RGB LED stripe around my projector screen. I would like it to light up when no movie is running and when a movie gets paused.
Maybe I could check if anything is running or is paused through the terminal somehow?
Looking forward to see creative solutions The RGB light is controlled with gpio pins.
Yes this should be possible. No I have no idea how youâd do it though.
Hi there Fzinken, I canât find out how to use json rpc to check if anything is running through terminal. Sorry for being a rookie⌠Could you maybe explain further?
Btw, as written I wish to be able to check if the movie is paused or not.
Through Json rpc I can find solution checking if there is any movie playing or not. But thatâs not the same as if a movie is paused or not.
You send json commands via the web interface. If you want to do it from the local command line you use 127.0.0.1
curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Stop", "params": { "playerid": 1 } }' 'http://127.0.0.1:8080/jsonrpc'
Eg use Player properties and check the speed. If speed=0 it is paused
http://kodi.wiki/view/JSON-RPC_API/v4#Player.Property.Name
Hi Fzinken.
Could you also give me an example of how the command would be for checking the Player.Probery.Name - speed?
Sorry, but I think the explanation I gave above she be clear enough. Just replace the method.
fzinken:
curl --header âContent-Type: application/jsonâ --data-binary â{ âidâ: 1, âjsonrpcâ: â2.0â, âmethodâ: âPlayer.Stopâ, âparamsâ: { âplayeridâ: 1 } }â âhttp://127.0.0.1:8080/jsonrpc â
Well, Iâll give it one more try Iâm a rookie trying to get my little hobby project done
curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Property.Value", "params": {"properties": ["speed"]}}' 'http://127.0.0.1:8080/jsonrpc'
Could you maybe try help me, whatâs wrong here?
I am mobile so hard to check. But read this thread should tell you how to do it
https://forum.kodi.tv/showthread.php?tid=230874
This is the right syntax>
curl --header âContent-Type: applicati â2.0â, âmethodâ: âPlayer.GetPropertiesâ, âparamsâ: {âplayeridâ:1,âpropertiesâ: [âspeedâ]}}â âhttp://127.0.0.1:8080/jsonrpc â
Also if you have configured a user/password for the http access you need to add that
1 Like