OSMC Pause-Light

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 :slight_smile: The RGB light is controlled with gpio pins.

Yes this should be possible. No I have no idea how you’d do it though.

Yes via json rpc

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? :slight_smile:

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. :frowning:

You send json commands via the web interface. If you want to do it from the local command line you use

curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Stop", "params": { "playerid": 1 } }' ''

Eg use Player properties and check the speed. If speed=0 it is paused

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.

Well, I’ll give it one more try :see_no_evil: I’m a rookie trying to get my little hobby project done :smiley:

curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Property.Value", "params": {"properties": ["speed"]}}' ''

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

This is the right syntax>

curl --header ‘Content-Type: applicati “2.0”, “method”: “Player.GetProperties”, “params”: {“playerid”:1,“properties”: [“speed”]}}’ ‘

Also if you have configured a user/password for the http access you need to add that

1 Like