Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue adding Opentherm Gateway to Home Assistant #89938

Closed
tamesvanderdoes opened this issue Mar 19, 2023 · 5 comments
Closed

Issue adding Opentherm Gateway to Home Assistant #89938

tamesvanderdoes opened this issue Mar 19, 2023 · 5 comments

Comments

@tamesvanderdoes
Copy link

The problem

Hi,

I'm trying to add my OpenTherm Gateway to Home Assistant. I have a working gateway that is working via otmonitor either via the USB-serial connection or directly from TCP using ser2net. The OpenTherm gateway is connected via USB to a Raspberry PI.

When I start adding the OpenTherm gateway in Home Assistant it first gives me an unknown error:

image

"Unknown error occurred"

Tcpdump on the Rapberry PI shows a lot of traffic between Home Assistant and the Raspberry PI on the port (in my case tcp port 2000).

When I re-add the gateway I get the following error message:

image

"Failed to connect"

I tried both firmware 4.3 and 5.8 on the Opentherm Gateway.

How can I troubleshoot this issue?

What version of Home Assistant Core has the issue?

Home Assistant 2023.3.5

What was the last working version of Home Assistant Core?

none

What type of installation are you running?

Home Assistant OS

Integration causing the issue

integration: opentherm_gw

Link to integration documentation on our website

https://www.home-assistant.io/integrations/opentherm_gw/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @mvn23, mind taking a look at this issue as it has been labeled with an integration (opentherm_gw) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of opentherm_gw can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign opentherm_gw Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


opentherm_gw documentation
opentherm_gw source
(message by IssueLinks)

@mvn23
Copy link
Contributor

mvn23 commented Mar 19, 2023

Thank you for the report. Can you provide some logs of the events? Preferably with debug logging enabled for homeassistant.components.opentherm_gw and pyotgw.

Can you also check if ser2net is throwing some additional characters (e.g. welcome banners) on the connection? A simple telnet to the gateway/pi should be sufficient to establish their presence. If they are, please try to get rid of them in your ser2net config.

@tamesvanderdoes
Copy link
Author

tamesvanderdoes commented Mar 21, 2023 via email

@mvn23
Copy link
Contributor

mvn23 commented Mar 21, 2023

2000:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner

Can you try with raw instead of telnet?

2023-03-21 20:50:43.336 WARNING (MainThread) [pyotgw.commandprocessor] Unknown message in command queue: 00000010/00000100,10.00,00000011/00000011,100.00,75.00,0.00,0/22,35.75,0.00,1.18,0.00,20.00,20.00,49.75,33.75,0.00,48.00,PS: 0
2023-03-21 20:50:43.344 WARNING (MainThread) [pyotgw.commandprocessor] Command PS failed with 00000010/00000100,10.00,00000011/00000011,100.00,75.00,0.00,0/22,35.75,0.00,1.18,0.00,20.00,20.00,49.75,33.75,0.00,48.00,PS: 0, retrying...
2023-03-21 20:50:50.154 WARNING (MainThread) [pyotgw.commandprocessor] Unknown message in command queue: Port already in use
2023-03-21 20:50:50.156 WARNING (MainThread) [pyotgw.commandprocessor] Command PS failed with Port already in use, retrying...

These lines indicate that Home Assistant is receiving invalid data from the gateway (or ser2net). The first response is 00000010/00000100,10.00,00000011/00000011,100.00,75.00,0.00,0/22,35.75,0.00,1.18,0.00,20.00,20.00,49.75,33.75,0.00,48.00,PS: 0. The first part up to and including the last comma is a partial status report from the gateway, but it is truncated for some reason and should not end with a comma. The PS: 0 part after that is the response from a second command, but it should be on a separate line.

After that, on the second attempt to request the status report, ser2net responds with Port already in use. This is definitely not coming from the gateway, so it's either ser2net or something else in between sending this.

So there probably are some things getting mangled in the communications. If the change to raw in your ser2net config doesn't work, can you try to temporarily connect the gateway to Home Assistant via USB to check that the integration logic and the gateway itself are working as expected?

@issue-triage-workflows
Copy link

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 has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants