-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Opentherm Gateway component not working #17263
Comments
CC @mvn23 |
This looks like a connection issue to me. A few things you can try to confirm/troubleshoot this:
In the first scenario, you should see a few lines of 9 characters each appearing roughly every second. If not, try typing
In the second scenario, if the thermostat and boiler are not connected, you should see the line |
Seems like I have an issue in the combination of Home Assistant, my NodeMCU/OTGW and my Google Home mini. I just accidentally discovered that when I have my Google Home mini unplugged and reboot Home Assistant, the connection between HA and the NodeMCU/OTGW stays OK, until I plug my GHM back in. Not sure why this is happening and I am a bit puzzled, because OTmonitor (which also runs from a Docker container on the same host as Home Assistant) doesn't have this issue, it stays connected with the NodeMCU/OTGW (although it is now turned off, because I first that that was blocking HA from connecting to the NodeMCU/OTGW). |
I had IP reservations on the DHCP server for all the mentioned devices. I have removed the DHCP address reservation for the Google Home Mini on my router and it seems that it solved the issue (for now). But I have another question: is it possible that the OTGW component reconnects itself after it got disconnected? Or let it at least attempt to reconnect? Now I have to restart HA completely to achieve that. |
Automatic reconnection may be added in a future release, but it is quite low on my to-do list. In it's normal config, the gateway is a serial device that may be connected through a serial-to-USB interface, so any disconnect or intermittent connection would be considered an abnormality. Using ser2net is a way to make the setup more versatile, but as you noticed it is definitely not perfect. |
@mvn23 Hopefully you can move it up on your to-do-list a little someday. I don't have the possibility to connect the OTGW wired to my Home Assistant instance unfortunately. Thanks for the time and effort you've put in this component. Too bad I can't use at this moment. |
I'll chime in here - I have an OTGW with an ESP8266 using a software serial build I made and have otmonitor talking to it for more than a year. Reasoning for that setup is in the repo description. I had to build a wrapper script around otmonitor because I suspect otmonitor isn't queueing commands and sometimes HASS will send a command to otmonitor while it's already sending a command to the OTGW and that freezes/breaks otmonitor. So I've also scripted a restart of otmonitor in case it isn't replying to commands that are being sent. As for the usage in HASS, I don't have a physical thermostat so my OTGW is in "standalone" mode. I send I'd gladly dump otmonitor, but since the OTGW is really a critical component, controlling it has to be reliable and fault-tolerant. Having the heater on for too long has really bad effects :) |
@WumsWatchFace this may be related, Google Home devices seem to be affected as well. However, firmware should have been updated automatically already. @infernix your setup will not be officially supported as you're looking to replace your thermostat rather than control it. However, when I start working on the implementation of services I will take it into consideration while deciding which commands to implement. |
I am also running my OTGW with a NodeMCU and am trying to connect it to Home Assistant. From my windows machine, OTmonitor works perfectly. I can ping the NodeMCU from the Hass.io docker instance. However, the component does not work. I have no Google home appliances running. In the log the following is mentioned:
|
@fmslottje I have set up a docker container with hass.io just now for testing and I can't reproduce your issue so far. |
@mvn23 Hi, little bit off-topic to the problem but i am looking for a tutorial to what to buy and how to set it up. i want to control my heating with Home Assistant. Could not find it anywhere else and you seem very knowledgeable about this:) |
@magin1 please direct your question through the Proper Support Channels™ |
Thanks @mvn23, I have installed the SSH addon and were able to nc, part of the output is as follows (truncated):
|
Is that the actual format or does it print each message on its own line? |
sorry, each message on its own line, like this:
|
Ok, the connection seems to be fine, so the component 'should' work... If I write something up for you to put in custom_components and try with that, could you then provide me a debug log? |
Sure, many thanks for following this up, greatly appreciated! |
@fmslottje please put the contents of this repo in your custom_components folder and post a debug log to Hastebin. |
I've got a similar issue. The opentherm_gw component cannot connect to my OTGW using a TCP socket. I get the following error:
To me this looks like a connection issue. The OTGW uses an ESP module loaded with ESP link. This is working for more than a year now. I'm using a python tool that connects to the ESP and publishes values to a MQTT topic. So I know the OTGW should be accessible using python (socket). I would love to use the opentherm_gw component to get rid of third party tools. Any help would be appreciated. |
@mvn23 I have some mixed success now, sometimes it works, sometimes it doesn't, so it's kind of hard to put a finger on the problem. I found this in the log at a moment in which the climate component didn't load:
btw, my OTGW is on 192.168.1.109 so the error on 192.168.1.102 seems unrelated |
Please post a full log with log level set to debug. Run logger:
logs:
homeassistant.components.climate: debug This will be a long log, so please use hastebin or similar. @silvanverschuur looks like a connection issue indeed. So far I am unable to reproduce any of these issues so it's hard to trace the real problem. Debug logs are welcome though ;) |
@mvn23 I've enabled DEBUG logging for the component. This is the log:
After this stacktrace nothing is logged anymore. I've also started hass with default logging set to debug but the results were the same (besides a lot of debug information from other components). So it looks to me that the component completely stops when the OTGW connection cannot be established. |
Sorry, I should have specified. Debug logs with the custom_component from here. |
@mvn23 The debug log with the custom component adds one stack trace to the log:
|
I assume you're running 0.81 here? The custom_component was made for 0.80. I will make one for 0.81 later on. |
Yes, I'm using 0.81. I'll wait for the 0.81 component. |
I have the same issue
Using this configuration:
The Opentherm gateway is connected using a nodemcu running ESPEasy which uses ser2net. |
Yeah exact the same problem here... Same errors, hassio 0.81, OTMonitor.exe does work on ESPEasy with Ser2net.... |
@mvn23 i just run the debug log with custom component on 0.80 (refrained from updating for now). I have also added another wifi access point to my setup (practically next to the OTGW) to make 100% sure that the wifi signal is ok, and at -45db RSSI that should be absolutely fine. Many thanks for looking into this, much appreciated! |
Thanks for the debug log. It is giving me some more insight into what's going on. At a certain point, the gateway stops responding to commands for ~50 seconds, but it keeps on sending reports during this time. Recent versions of the library skip over these unanswered commands with just a log entry, but never recover the missing values. Without a test setup in my dev environment, it will be nearly impossible to track down the exact issue here as there's a whole chain of tools at play (network, serial, etc). One thing I can do about this is add a retry for the failed commands - possibly with a delay - to obtain the missing values, but that feels rather hacky to me. I'll order a NodeMCU soon to play around a bit, see what I can find. |
This is what I am suspecting as well, that transmitting and receiving at the same time causes problems. |
I definitely want to but I’m not sure if I have the opportunity coming days/weekend. If I do, I’ll let you know. |
What is the way to test? Copy the pyotgw.py, protocol.py and vars.py from github over the existing ones in site-packages/pyotgw folder, and restart HA? |
That's what I do when testing for longer periods. |
Seems like it works. Got this in my logfile:
But OTGW is still connected! |
That's a very strange error to say the least. It may indicate an unexpected reset of the gateway. logger:
default: warning
logs:
pyotgw.pyotgw: debug
pyotgw.protocol: debug |
I'm testing retry_reconnect too. First observation - it was able to 'reconnect' itself to proper data, when normal restarts of HASS didn't help. Will see how it goes further. I also really appreciate your work. Would like to have it stable as controller. :-) |
Thanks for the update! Now it makes it hard to recognize when there was a connectionproblem, due to the huge amount of debug logs and the system reconnects itself... |
It will throw one or more |
What showed in log (no debug tho).
|
Ok, finally have some time to try this, but... Don't know how to copy the 3 files to hassio. Tried to replace the files in |
I'm testing it for few days already. Is it possible that while it has connection/reconnection issues, the component makes whole async overloaded with task and other components may also have problems? I think it's causing some kind of hiccups of performance or other sensors refreshing issues which I didn't have before (like darksky or synologydsm on local network) |
I'll look into this soon. |
I am running with the debug version for a while now:
Some are relating to times when I was restarting HASS, but others did not. So what other information do you like to get? |
Any warnings, errors and all output from pyotgw would be great. That will be a lot of data, so please use hastebin or similar. |
I do not like to share my complete log on the internet, but no problem to send it you. Are you the same mvn23 at Tweakers? I can send you a pm over there. |
The very same. |
May be reopened due to a bug in the updated lib. Working on a patch. |
Home Assistant release with the issue:
0.79.3
Last working Home Assistant release (if known):
None
Operating environment (Hass.io/Docker/Windows/etc.):
I am running Home Assistant from Docker
Component/platform:
https://www.home-assistant.io/components/climate.opentherm_gw/
Description of problem:
Component does not work basicly. I sometimes have to reboot Home Assistant a few times to get the component going:
and When it finally works, it stops working after a few minutes. When I try to change the temperature an error is added to the log:
My openthermgateway is connected to a nodeMCU with ESP Easy running ser2net.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Additional information:
Here a log of a 'successful' connection after reboot and then almost imediately a crash of the component when I try to set a temperature:
The text was updated successfully, but these errors were encountered: