Did the Kodi component (sort of) break in 0.39.x?

Hi,

for some reason the Kodi media_player component doesn’t work as before for me.
My Kodi box is powered off most of the day, so the corresponding card in the web UI also shows “off” as its state.
Before 0.39 it was possible to power up the Kodi box and HA would pick up Kodi’s state immediately, e.g. “idle”, “playing”, “paused” etc.
Now HA doesn’t recognize when Kodi is fired up, so the state stays at “off” even when there’s something playing.
When I restart HA while Kodi plays something, the state shows the correct media info and also transitions to the other states (“paused”, “off” etc.) seem to work.
It’s just not working when HA is (re-)started while Kodi is off.

Does anyone else experience this?
I’m using the state transition “from off” to set my “movie lights” which currently doesn’t work anymore.

EDIT: I’m running on 0.39.3, so the discovery issue shouldn’t have anything to do with this.

Sebastian

Hi Sebastian,

there’s a new variable in kodi configuration.

enable_websocket (Optional): Enable websocket connections to Kodi via the TCP port. Defaults to true. The websocket connection allows Kodi to push updates to Home Assistant and removes the need for Home Assistant to poll. If websockets don’t work on your installation this can be set to false

if i set enable_websocket: false , kodi works like in 0.38.

Greetings
Rainer

3 Likes

Thanks, Rainer, I completely missed that!

Sebastian

^ me too, tried all sorts to fix the problem! Thanks Rainer.

But why doesn’t the websocket work? I have 9090 opened on Kodi, but HASS fails to interface with Kodi now, any fixes?

I’m wondering that too. I haven’t come around to taking a closer look at this issue yet, though.
Most times it works with websockets for me - media information is displayed correctly including title and a screenshot.
But sometimes HA doesn’t even notice when kodi is started.
There doesn’t seem to be a pattern to it.

Sebastian