Sending custom commands to Kodi via API call

i am trying to send the below to kodi via home assistant

  "method": "VideoLibrary.Export",
  "params": {
    "options": {
      "overwrite": true,
      "actorthumbs": false,
      "images": false
  "id": 1,
  "entity_id": "media_player.kodi"

it sends but doesn’t work and i get this in the debug console

Run API method media_player.kodi.VideoLibrary.Export({‘params’: {‘options’: {‘overwrite’: True, ‘actorthumbs’: False, ‘images’: False}}, ‘id’: 1}) error: {‘code’: -32602, ‘data’: {‘message’: ‘Too many parameters’, ‘method’: ‘VideoLibrary.Export’}, ‘message’: ‘Invalid params.’}

i guessing the formatting is off?

I can do other things like launch add-ons. But this always falls over

Expanding the schema here:

It seems you also need to specify a path to export the library to.

There’s are two options, one is “Single file” which requires a file path, the other is “seperate files” which puts the files next to the media files, so a path name isn’t required for that, which is the one i am trying to use


The original JSON is here, but I can’t get it working in HA :frowning:
curl -X POST -H 'content-type: application/json;' --data '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "params": { "options": { "overwrite": true, "actorthumbs": false, "images": false} }, "id": 1 }'

I explained this here

Took me ages to figure it out why it was failing
I think is the wrong issue thread, but the problem exists. I copied the kodi component to custom components folders and added the modify statement.