Several bindings randomly stop working at the same time

  • Platform information:
    • Hardware: Raspberry Pi 3
    • OS: OpenhabianPi
    • openHAB version: 2.5.4-1

For some time now I’ve been noticing connectivity issues with my OH installation.
Usually it goes like this:

2020-04-22 12:52:26.863 [ERROR] [ab.binding.http.internal.HttpBinding] - No response received from 'https://coronavirus-19-api.herokuapp.com/countries/Germany?format=json'
2020-04-22 12:52:58.186 [hingStatusInfoChangedEvent] - 'tplinksmarthome:hs100:kueche' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Read timed out
2020-04-22 12:53:00.678 [ERROR] [.energenie.internal.EnergenieBinding] - Failed to connect to ip 192.168.178.45
2020-04-22 12:53:17.212 [vent.ItemStateChangedEvent] - xiaomiHubOnline changed from ON to OFF
2020-04-22 12:54:03.654 [hingStatusInfoChangedEvent] - 'tplinksmarthome:hs100:kueche' changed from OFFLINE (COMMUNICATION_ERROR): Read timed out to ONLINE
  • tplink binding goes offline
  • http and Energenie bindings throw an error
  • Xiaomi hub via network binding is set to offline (doesn’t happen everytime though)

What’s weird is that I can still access the log reader and I also see updates on items like plant sensors (bluetooth), raspi sensors and bindings like GPStracker, so it shouldn’t be a wifi issue (I did get a new router recently, but if there were an issue, other devices should be affected as well, right?).

I already set the log level of the tplink and http bindings to debug, but I could get any clue from that.

Not sure if this is binding, OH or device related. My Linux knowledge comes mostly from working with OH, so any input on how I can investigate here is highly appreciated.

Are you using an SD card, have a good power supply, any issue with power outages?

If using an SD card you may want to try a new one as they are prone to corruption after some time, especially if you have power outages. A good power supply is also a must for the Pi as a knock off or failing supply can cause weird issues.

If all the above is good you may want to try a few restarts or stop OH and clean the cache.

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2

Then after OH has fully restarted (watch the logs) do a few restarts, allowing OH to fully restart between each restart.

sudo systemctl restart openhab2

Power supply shouldn’t be an issue, cleaning the cache also didn’t help - but I did think about replacing the SD card.
Yesterday I removed the Corona tracker though, and since then I don’t get the http and Energenie errors.

Number	Corona_WW_Confirmed "Corona World confirmed [%d]"  <bedroom>    (gCorona)   {http="<[https://corona-stats.online/?format=json:600000:JSONPATH($.[?(@.country=='World')].confirmed)]"}

Since then it’s been running quite good, only thing that’s still coming up is the tplink socked going offline and online, but that could be due to the device itself… I’ll keep an eye out…

That’s a very long timeout.
EDIT - dimwit, that’s the refresh.
What is the timeout?

Does the socket have good signal strength? You may also want to try setting the socket IP address as static/reserved in your router and see if that helps.

It’s globally set to 5000.

@H102 signal strength is good, IP adress is also static… :confused: