Kodi media players not working

I have three Kodi media players, two on Windows PCs and one OSMC Vero box. The IP addresses and port numbers (8080) are correct and I can control them with shell commands from HA but they always show up as “off” in HA.

Any idea why this would be?

I read in another post that I should disable websockets but this made no difference.

- platform: kodi
  host: 10.1.1.14
  name: 'Lounge OSMC Kodi'
  enable_websocket: false

- platform: kodi
  host: 10.1.1.2
  name: 'Lounge PC Kodi'
  enable_websocket: false

- platform: kodi
  host: 10.1.1.3
  name: 'Cinema Kodi'
  enable_websocket: false

tried adding port ?

Thanks. I forgot I added a username and password to the media players.

This works:

- platform: kodi
  host: 10.1.1.3
  port: 8080
  username: !secret kodi_user
  password: !secret kodi_password
  name: 'Cinema Kodi'
  enable_websocket: false

Loose the websocket line now, that can cause really annoying delays. If you find it stops working, use port 80 instead and all will be fine.

Done. Cheers.