I give up. This curl command used to work:
'curl -u "kodi:mypwd" --header "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"Player.SetSpeed\",\"params\":{\"playerid\":1,\"speed\":\"increment\"}}" "http://10.1.1.14:8080/jsonrpc"'
So I tried:
lounge_kodi_player_fast_fwd:
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.lounge_osmc_kodi
method: Player.SetSpeed
playerid: 1
speed: Increment
and this
lounge_kodi_player_fast_fwd:
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.lounge_osmc_kodi
method: Player.SetSpeed
params:
playerid: 1
speed: Increment
and even
lounge_kodi_player_fast_fwd:
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.lounge_osmc_kodi
method: Player.SetSpeed
params: { playerid: 1, speed: Increment }
But I keep getting this error:
ERROR (MainThread) [homeassistant.components.media_player.kodi] Run API method media_player.lounge_osmc_kodi.Player.SetSpeed({'params': OrderedDict([('playerid', 1), ('speed', 'Increment')])}) error: {'code': -32602, 'data': {'method': 'Player.SetSpeed', 'stack': {'message': 'Missing parameter', 'name': 'playerid', 'type': 'integer'}}, 'message': 'Invalid params.'}
So this is the right method. I just cant work out how to pass the parameters, playerid and speed.
It’s far too late and I’m going to bed. Hopefully someone that knows what they are doing can spot my mistake.