Inconsistent behavior with Kodi

Hi,
I have two Kodi instances on my network, one running on a cheap Chinese “M Box” (Kodi 16, Android 4.4.4) and the other on an NVidia Shield (Kodi 17.1, Android TV 7).
The M Box one works as expected; while it’s off HA shows ‘off’, on but not playing shows ‘idle’, playing something shows “playing” and when I turn it off again, HA shows ‘off’. However, the NVidia Shield instance never changes back to ‘off’, staying ‘idle’ until HA is restarted. Even if I switch it back on while HA is incorrectly showing ‘idle’ this state never changes. It also did this while on Kodi 16.
In my configuration I have both instances defined by IP address which are assigned by DHCP to the device’s MAC address. Both are hard wired.
Configuration:

  • platform: kodi
    name: Living_room_Kodi
    host: 192.168.0.17
    username: !secret kodi_username
    password: !secret kodi_password
  • platform: kodi
    name: Bedroom_Kodi
    host: 192.168.0.11
    username: !secret kodi_username
    password: !secret kodi_password

Both ON

Both OFF

If anyone knows how to sort this, I’d be much obliged. Thanks.

Hi @rossffs, maybe related to this.

Ah ha! Disabling websockets seems to have done the trick.

So my question now is: why do websockets work on one device and not the other?

Thanks