Linux - [solved] Addons.SetAddonEnabled can't disable Aerial addon

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bearn Offline
Junior Member
Posts: 1
Joined: Apr 2017
Reputation: 0
Post: #1
Hi,
I'm trying to remotely disable the Aerial screensaver on kodi 17 using json-rpc and curl.
The addon is enabled:
Code:
curl -s -H "Content-Type: application/json" -X POST -d '{"jsonrpc": "2.0", "method": "Addons.GetAddonDetails", "params": {"addonid": "screensaver.atv4","properties":["enabled","name"]}, "id": 1}' http://remotecomputer/jsonrpc
gets answer:
Code:
{
        "id": 1,
        "jsonrpc": "2.0",
        "result": {
                "addon": {
                        "addonid": "screensaver.atv4",
                        "enabled": true,
                        "name": "Aerial",
                        "type": "xbmc.ui.screensaver"
                }
        }
}
but when I try to disable it by making
Code:
curl -s -H "Content-Type: application/json" -X POST -d '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": {"addonid": "screensaver.atv4", "enabled":false}, "id": 1}' http://remotecomputer/jsonrpc
I get
Code:
{
        "error": {
                "code": -32602,
                "message": "Invalid params."
        },
        "id": 1,
        "jsonrpc": "2.0"
}
while doing the same but setting "enabled" to true gets
Code:
{
        "id": 1,
        "jsonrpc": "2.0",
        "result": "OK"
}
I'm completely in the dark, if anyone could help me...
Thanks in advance.

edit: Must be because the screensaver is enabled and selected/active. If I can set active screensaver to "none" I'll be able to disable it. Unfortunately I can't delete his post, I get an error message...
Code:
curl -s -H "Content-Type: application/json" -X POST -d '{"jsonrpc": "2.0", "method": "Settings.SetSettingValue", "params": {"setting": "screensaver.mode","value": "screensaver.xbmc.builtin.dim"}, "id": 1}' http://remotecomputer/jsonrpc
sets the screensaver to "dim", now Aerial can be disabled...
(This post was last modified: 2017-04-20 10:43 by bearn.)
find quote