Kodi thing keeps switching offline and online

Since about a fortnight my Kodi thing keeps switching offline and online again. I noticed the issue because my living room lighting does not work anymore as it usually responds to Kodi actions like this.

Excerpt of /var/log/openhab2/events.log

2019-03-25 13:21:05.242 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): Connection could not be established to ONLINE
2019-03-25 13:22:15.271 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection established
2019-03-25 13:22:25.244 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): No connection established to OFFLINE (COMMUNICATION_ERROR): Connection could not be established
2019-03-25 13:22:25.252 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): Connection could not be established to ONLINE
2019-03-25 13:23:35.284 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection established
2019-03-25 13:23:45.288 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): No connection established to OFFLINE (COMMUNICATION_ERROR): Connection could not be established
2019-03-25 13:23:45.301 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): Connection could not be established to ONLINE
2019-03-25 13:24:55.295 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection established
2019-03-25 13:25:05.298 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): No connection established to OFFLINE (COMMUNICATION_ERROR): Connection could not be established
2019-03-25 13:25:05.310 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from OFFLINE (COMMUNICATION_ERROR): Connection could not be established to ONLINE
2019-03-25 13:26:15.306 [hingStatusInfoChangedEvent] - 'kodi:kodi:f7705802' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection established

This repeats over and over almost every 1,5 minutes for no obvious reason. I have done the thing definition within Paper UI and it worked perfectly for weeks. In addition, I have made no modifications to my openHAB system at all within the last weeks.

My setup:

openHAB 2.4.0 (Build)
Raspberry Pi 3 Model B+
openHABian 
Amazon FireTV 1st generation

There are several openHAB users (@wars, @darkcheater and @rkrisi) who reported the same here.

Does anybody have an idea what is going on here?

Have you tried rebooting your Kodi client?
I’m on snapshot from Saturday. Working fine.
When pinging your Kodi client, do you see any reply dropouts?

I have tried restarting it several times. Ping working there is no lost packages, no problems.

For me it happens maybe a little bit less (around every 2-3 minutes)…

Thank you for your suggestions, Ole @OMR!

Yes, with no effect.

100 pings with no dropouts at all. Average value = 3ms.

Hmm, so this happened just out of the blue?
Did you maybe install some other services on port 8080? (probably not on a FireTV)
Just to make sure, also power cycle all routers and eth switches along the path.
Could a router FW update have messed with UPnP?
Could a Kodi update have messed with DLNA enable?

Maintainer is listed as Paul Frank, but unsure which Paul on this forum that is …

There is an Android app called Kore for controlling Kodi. Does that work as expected?

1 Like

Everything works as expected. I use several Kodi Remote Controller app, all of them works properly.
Also in openHAB, you can’t see anything just from the logs and maybe from PaperUI that the Kodi Thing goes Offline for some secs and reverts back to Online after another sec.

As some of us have this error, I think it is mostly related to some binding bug. It is unlikely that everyone has a faulty, buggy router, something on 8080 port, etc…

Also this happened on Kodi 17.6 and now 18.1 as well.

In fact, I reinstalled my pi-hole from scratch a couple of days ago, but on a different device which also works as a DNS server in my home network. I am not absolutely sure but I do not think that this has something to do with this issue.

Not yet done. Note: Restarting the router (Fritz!Box) leads to another unsolved issue of a different binding.

No update so far (Fritz!Box 7590).

No recent update. I have double checked the Kodi preparation. Actually, the Amazon FireTV got a firmware update today but the Kodi settings are still okay.

Both Yatse and Kore do work as expected.

Thank you for your suggestions, Ole @OMR!

Then I’m sorry guys. Out of ideas.
Some bindings kan be put in DEBUG logging mode in Karaf.
Maybe that will give a clue to why it loses connection?

This is what I’ll do if I have time. But this is not a big problem, so I don’t really urge myself to do this…

Im also having same issue

I am having the same issue.

I am having the same issue as well…
OpenHAB 2.5.2
CoreELEC 9.2.1
Yatse on Android

I could fix it by changing the jsonrpc port for kodi from 9090 to 9999 by adding:

    <jsonrpc>
            <compactoutput>false</compactoutput>
            <tcpport>9999</tcpport>
    </jsonrpc>

to /home/[user]/.kodi/userdata/advancedsettings.xml