Trouble with changing resolution in KODI with JSON-RPC
#1
Hi guys and ladies!

I'm trying to switch video screen resolution through KODI, with JSON-RPC, but some troubles are appear.

I do that with this query:

Code:
{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"videoscreen.resolution","value":41},"id":1}

And system ( in this case Raspberry Pi) change resolution, wih dialog window for submiting that change. After that, I try to submit that change with JSON-RPC query for move left cursor and query for select, but that does not work.

How to submit that change, with some JSON-RPC query ?
Reply
#2
(2016-05-10, 09:48)Bandini7 Wrote: Hi guys and ladies!

I'm trying to switch video screen resolution through KODI, with JSON-RPC, but some troubles are appear.

I do that with this query:
Code:
{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"videoscreen.resolution","value":41},"id":1}

And system ( in this case Raspberry Pi) change resolution, wih dialog window for submiting that change. After that, I try to submit that change with JSON-RPC query for move left cursor and query for select, but that does not work.

How to submit that change, with some JSON-RPC query ? 

I have the same question but more general.
is there a way to click/navigate dialog buttons from a python script? or through json-rpc?
Reply
#3
(2016-05-10, 09:48)Bandini7 Wrote: How to submit that change, with some JSON-RPC query ?

What exactly did not work. The move left or the submit?

As I can easily submit to enable the "unknown sources" for addons by moving left and then submit/select what is highlighted with:

 curl -s -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.ExecuteAction","params":{"action":"select"},"id":1}'
Reply
#4
(2020-04-10, 18:07)shmizan Wrote: is there a way to click/navigate dialog buttons from a python script? or through json-rpc?

Yes. As you can see in the posting above, you are able to send input actions via JSON.

Depending on what is available on your system, you might also be possible to use "kodi-send" which makes use of Kodi built in python functions and also actions. Like: kodi-send -a "up"
Reply
#5
(2020-04-13, 13:42)DaVu Wrote:
(2020-04-10, 18:07)shmizan Wrote: is there a way to click/navigate dialog buttons from a python script? or through json-rpc?

Yes. As you can see in the posting above, you are able to send input actions via JSON.

Depending on what is available on your system, you might also be possible to use "kodi-send" which makes use of Kodi built in python functions and also actions. Like: kodi-send -a "up" 
thanks,
tried sending the json input actions, but they don't work for dialogs, they only work for regular navigation.
does it work for you?
Reply
#6
yes, I can naviaget to the shutdownmenu via:

curl -s -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.ExecuteAction","params":{"action":"up"},"id":0}'
or
curl -s -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.ExecuteAction","params":{"action":"down"},"id":0}'
and
curl -s -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.ExecuteAction","params":{"action":"select"},"id":0}'

and then also hit "Exit" with

curl -s -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.ExecuteAction","params":{"action":"select"},"id":0}'

Not sure why it doesn't work for you
Reply

Logout Mark Read Team Forum Stats Members Help
Trouble with changing resolution in KODI with JSON-RPC0