home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Gateway disconnect after certain time #33231

Closed bartandeweg closed 4 years ago

bartandeweg commented 4 years ago

The problem

My opentherma gateway looses its connection and become unresponsive. Problem is there after upgrading to version 0.105 or 0.106 don't know exactly anymore but still exists in version 0.107.6. The OTG integration worked like a charm for a couple of months. Without loosing connections.

Environment

arch | armv7l dev | false docker | true hassio | true os_name | Linux os_version | 4.19.106-v7 python_version | 3.7.7 timezone | Europe/Amsterdam version | 0.107.6 virtualenv | false

Problem-relevant configuration.yaml

living_room:
  device: /dev/ttyUSB0
  name: CV Thermostaat
  climate:
    precision: 0.5
    floor_temperature: True

Traceback/Error logs

Logger: pyotgw.pyotgw
Source: __main__.py:342
First occurred: 2:52:15 (4 occurrences)
Last logged: 3:01:18

Timed out waiting for command: PR, value: L.
Timed out waiting for command: PR, value: M.
Timed out waiting for command: PR, value: B.
Timed out waiting for command: PR, value: C.
Logger: pyotgw.protocol
Source: __main__.py:342
First occurred: 2:51:31 (28 occurrences)
Last logged: 3:11:07

Disconnected: None
Unknown message in command queue: R: A=OpenTherm Gateway 4.2.5
Command PR failed with R: A=OpenTherm Gateway 4.2.5, retrying...
Disconnected: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Command PR failed with SE, retrying...

Additional information

probot-home-assistant[bot] commented 4 years ago

Hey there @mvn23, mind taking a look at this issue as its been labeled with a integration (opentherm_gw) you are listed as a codeowner for? Thanks!

mvn23 commented 4 years ago

Thanks for the report. Can you provide a full debug log of the following components:

bartandeweg commented 4 years ago

Hi @mvn23

I want to. But should i enable the logger integration on these components and do a restart and send the logs afterwards?

mvn23 commented 4 years ago

Indeed, something like this in configuration.yaml should do the trick:

logger:
  default: warning
  logs:
    homeassistant.components.opentherm_gw: debug
    pyotgw.pyotgw: debug
    pyotgw.protocol: debug

Then restart HA, wait for the issue to occur and post the log. It will be quite big, so please consider using something like hastebin.com to share it.

bartandeweg commented 4 years ago

Ok. Will do right away

Appesteijn commented 4 years ago

I had similar problems. This fixed it for me: Apparently the otgw can sometimes start ignoring the incoming commands. I think this can cause the timeouts. What solved the issue for me is to reset the otgw by connecting the two RST pins on the otgw board (keep the power on): https://gathering.tweakers.net/forum/view_message/54350307 After this the integration found the otgw and it works again.

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.