Cannot start music from HA Kodi

Hi All,

Hope you help me with adding KODI into HA. Im a beginner :slight_smile: Firstly hereby my Lab:
*) Kodi Build 19.3.0 installed on a Android Tablet
*) Kodi Build 19.3.0 installed on Windows 10
On both KODI’s: “Allow remote control from application on other systems” enabled.

*)Home Assistantant installed on a Debian Oracle VM
HA Version core-2021.11.1
HA Installation Type Home Assistant Supervised
*)HA Assistant installed on PI4
HA Version core-2021.11.2
Installation Type Home Assistant OS

Kodi on Win10 and Oracle Vm on the same system.

Kodi is installed via the Kodi Integration guidelines from Kodi is recognized and registered in HA.
TTS works fine and correct.
But I cannot start playing music from HA. I get the error mentioned below.
Another finding: When i start playing music on my Kodi device, it is recognized by HA. I can skip forward and back. Volume up and down is no problem.
But I cannot start music in HA from another folder, getting the same error below.
I can add KODI via the iframe as an card in Lovelace, that works find, music can be started, stopped, skipped etc. (problem is that when you switch screen in HA, the music stops).

My configuration is not in configuration.yaml

Hope that someone can help me becuase im getting crazyyyyy…

Error from Log:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/kodi/
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 3:51:26 PM (6 occurrences)
Last logged: 4:26:41 PM

[140611388732512] (-32602, ‘Invalid params.’, {‘error’: {‘code’: -32602, ‘data’: {‘method’: ‘Playlist.Clear’, ‘stack’: {‘message’: ‘Invalid type object received’, ‘name’: ‘playlistid’, ‘type’: ‘integer’}}, ‘message’: ‘Invalid params.’}, ‘id’: ‘5d54d600-c931-441b-9732-bdc4cf5855d0’, ‘jsonrpc’: ‘2.0’})
[140611388732512] (-32602, ‘Invalid params.’, {‘error’: {‘code’: -32602, ‘data’: {‘method’: ‘Playlist.Clear’, ‘stack’: {‘message’: ‘Invalid type object received’, ‘name’: ‘playlistid’, ‘type’: ‘integer’}}, ‘message’: ‘Invalid params.’}, ‘id’: ‘97b160a5-2fdc-4e67-8e0d-c3ef7b087980’, ‘jsonrpc’: ‘2.0’})
[140611388732512] (-32602, ‘Invalid params.’, {‘error’: {‘code’: -32602, ‘data’: {‘method’: ‘Playlist.Clear’, ‘stack’: {‘message’: ‘Invalid type object received’, ‘name’: ‘playlistid’, ‘type’: ‘integer’}}, ‘message’: ‘Invalid params.’}, ‘id’: ‘c83cb15b-0aa9-45e4-9bcb-b7a45a445b0a’, ‘jsonrpc’: ‘2.0’})
[140611388732512] (-32602, ‘Invalid params.’, {‘error’: {‘code’: -32602, ‘data’: {‘method’: ‘Playlist.Clear’, ‘stack’: {‘message’: ‘Invalid type object received’, ‘name’: ‘playlistid’, ‘type’: ‘integer’}}, ‘message’: ‘Invalid params.’}, ‘id’: ‘fa38c128-d6ae-43e6-acc0-ef74c4b6efed’, ‘jsonrpc’: ‘2.0’})
[140611388732512] (-32602, ‘Invalid params.’, {‘error’: {‘code’: -32602, ‘data’: {‘method’: ‘Playlist.Clear’, ‘stack’: {‘message’: ‘Invalid type object received’, ‘name’: ‘playlistid’, ‘type’: ‘integer’}}, ‘message’: ‘Invalid params.’}, ‘id’: ‘9800ec58-af36-4df4-b2a0-14c99c240e4e’, ‘jsonrpc’: ‘2.0’})
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/”, line 185, in handle_call_service
File “/usr/src/homeassistant/homeassistant/”, line 1495, in async_call
File “/usr/src/homeassistant/homeassistant/”, line 1530, in _execute_service
File “/usr/src/homeassistant/homeassistant/helpers/”, line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File “/usr/src/homeassistant/homeassistant/helpers/”, line 667, in entity_service_call
future.result() # pop exception if have
File “/usr/src/homeassistant/homeassistant/helpers/”, line 863, in async_request_call
await coro
File “/usr/src/homeassistant/homeassistant/helpers/”, line 704, in _handle_entity_call
await result
File “/usr/src/homeassistant/homeassistant/components/kodi/”, line 256, in wrapper
await func(obj, *args, **kwargs)
File “/usr/src/homeassistant/homeassistant/components/kodi/”, line 696, in async_play_media
await self.async_clear_playlist()
File “/usr/src/homeassistant/homeassistant/components/kodi/”, line 758, in async_clear_playlist
await self._kodi.clear_playlist()
File “/usr/local/lib/python3.9/site-packages/pykodi/”, line 313, in clear_playlist
await self._server.Playlist.Clear({“playlistid”: 0})
File “/usr/local/lib/python3.9/site-packages/jsonrpc_websocket/”, line 53, in send_message
return message.parse_response(response)
File “/usr/local/lib/python3.9/site-packages/jsonrpc_base/”, line 213, in parse_response
raise ProtocolError(code, message, data)
jsonrpc_base.jsonrpc.ProtocolError: (-32602, ‘Invalid params.’, {‘error’: {‘code’: -32602, ‘data’: {‘method’: ‘Playlist.Clear’, ‘stack’: {‘message’: ‘Invalid type object received’, ‘name’: ‘playlistid’, ‘type’: ‘integer’}}, ‘message’: ‘Invalid params.’}, ‘id’: ‘67a2ee11-86a1-422e-968d-10b882f01822’, ‘jsonrpc’: ‘2.0’})