Kodi Connection Drop/Timeout

Hi people,

So I have Kodi setup and working, however unless I have the configuration option enable_websocket: false set, it fails to update the status unless I restart Home Assistant every time I want it to connect.

What I think is happening is that when Home Assistant starts, it attempts to connect to Kodi at the IP in the config over sockets. If Kodi is up - great - it establishes a connection and works properly. However, after I turn Kodi (and the system that runs it) off then the socket connection is closed.

If I then later come back and turn Kodi on, Home Assistant doesn’t re-establish a connection to the socket. As soon as I restart Home Assistant it reconnects.

I’d really like to use Kodi with enable_websocket: true as the delay for my automation is not ideal. However, restarting Home Assistant each time I restart Kodi isn’t either.

Is there an option for Home Assistant to attempt to establish a socket connection every X seconds, for example 60, so every minute it’ll see if the Kodi system has been started and connect again.

Thanks for reading,

I wanted to create a new topic until I found this one. I am having the same problem. Every time I restart Kodi I also have to restart HA.

UPDATE: A issue has been raised to see if they can fix this issue

I sort of forgot about this issue lol.

Thanks for opening the ticket/issue on github. I followed up there too. Anyone who is interested in updates to this should follow along with the Github issue linked above.