Linux Simulate BUTTON_CONTROL_STANDARD via JSON (to instantly activate screensaver)
#1
Hello everyone,
i've searched the forum all day for a solution to this problem and hope someone can tell me if its possible or not:

Basically i'd like to simulate a klick on the "preview"-button in "Settings - Appearance - Screensaver"
I found out i can change system settings via JSON's "Settings.SetSettingValue" and from

https://github.com/empatzero/xbmca10/blo...s.cpp#L928

i learned that screensaver.preview is a "BUTTON_CONTROL_STANDARD", so instead of a e.g "true", or "false" value, i'd need one that presses enter or klicks, or so..

Heres the command that i worked out so far:
{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"screensaver.preview", "value":***WHAT_TO_PUT_HERE?***}, "id":1}

I'm running Kodi 15.1 on a Rpi2
Thanks a lot
Dani
Reply
#2
Why don't active the screensaver window?

Code:
{"jsonrpc":"2.0","method":"GUI.ActivateWindow","id":1,"params":{"window":"screensaver"}}
Reply
#3
why not indeed. Big Grin

Didn't realise that was a option, it did the trick.
Thank you.

(Also, just out of curiosity: if anyone knows if my initial question would work, kindly let me know?)
Reply
#4
How to do this in libreelec KODI 18 RPI3?
Reply
#5
Exactly as above.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply

Logout Mark Read Team Forum Stats Members Help
Simulate BUTTON_CONTROL_STANDARD via JSON (to instantly activate screensaver)0