-
Notifications
You must be signed in to change notification settings - Fork 16
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
Integration stops working after several hours #3
Comments
Is there anyting in the logs? If now, could you enable debug logging and check? Maybe the SSE listener drops connection and doesn't reconnect (which it should in principle) or maybe token refresh failed (which is now handled internally by Home Assistant). When the sensor stops updating, can you try if you can still do things like starting programs or switching on/off? I'm asking because these trigger direct calls to the API rather than listening to a stream, so if they don't work either, it indicates a permission problem or the API being down. |
I will check that tomorrow. Enabling debug logging on my raspberry will lock the SD card down and make the whole system nearly unusable, maybe we can determine the problem without that. Regards |
OK thanks in advance! |
Yes, thats possible. If we need it i will try that. Regards |
Did you try if you can still switch power or start programs after they go out of sync? If no, does that lead to something in the log? If yes, I think it's defintely due to SSE dropping connection, that would be good to know. |
I am able to start the dishwasher but that does not update the sensors. What is SSE? Regards |
Thanks! That's indeed useful. |
I see. Are you able to reproduce that behavior? Is there anything i can do? Regards |
Yes, I think I have also run into this problem now. I will have to look at the SSE implementation in the |
Now I am completely green with respect to this code (been using HA for two weeks now), but if nothing is going over the line, the connection will get killed by a router doing NAT. |
Oops. As stated in the commit message, this is an attempted fix. I'll now update the HA component with this and would be grateful about testing. |
Will this potential fix be part of a release or do i have to update the custom component manually? Regards |
I will publish a release later today. |
Still same issue when used in HA. Br |
I had the impression that before te latest changes, with HA 103.5 it was better. Everything was still working after 24H. |
I don't see how it could have gotten worse. So what are you seeing now? Any errors in the log? Do all your appliance stop updating at the same time? (Each of them is listened to in a separate thread, so I would expect them not to fail simultaneously.) |
I can confirm that this problem still persists. Regards |
With 104.3 HA stopps updating after 20 - 24 hours |
Thanks! Does the traceback continue? I would be curious which exception it raises. |
�[36mhomeassistant |�[0m Exception in thread Thread-3: |
Oooh. That might be why I wasn't able to understand this. It's not actually a problem with the SSE stream, it's a problem with auth! Thanks a lot for this hint! Now the question is why the token is not refreshed. I thought that HA internally takes care of this but maybe I misunderstood. I will ask the core devs. |
Finally done. Closing 🎉 |
Thank you. I am using HACS to maintain Home Connect and i am only able to choose version 0.2.4, am i doing something wrong? Regards |
Hi, I haven't made any change to the |
Hi David, did you manage to make a new release by chance? Regards |
No, but you can use the master branch in the meantime. |
Hi, |
No, they are the same. Enable debug logging and monitor the log. |
I still have this issue. I prepared a log with enabled debug information: Pls reopen this issue and help to find the root course why this integrations does not update the current status and why the integrations stop working after a while. |
I'm happy to reopen the issue, but honestly I don't know what to do about it. |
Hi David,
There seems to be a connection established but no update to the corresponding integration. After a while the integration loose it's connection. Do you have any idea how to improve it? Pls help. |
Hi David, It seems that the connections get lost after 1,5 hours and it failed to reconnect. Any update or idea on that? Is there a way to support you? |
Hi, thanks for your debug logs, but I still don't know what the cause could be. The second log doesn't show any hint. In the first log, there is an exception in the SSE stream, which I also observed to happen occasionally, which is why I implemented the automatic reconnection. That's aso why this exception is actually not logged as an error, but only as a warning in HA. The log shows that the reconnection is triggered, but I don't know if it succeeded. It's the second to last entry in the log. The last entry, Don't get me wrong, I don't doubt that there is a problem - I also lose the connection to my appliances. In my current HA run, it occured after 48 hours. But since I don't know what's causing it, I don't know how to debug. My suspicion is actually that it is a problem with the token refresh, which is handled by HA internally and is unrelated to the My suggestion is to open an issue in the HA core library, unless you can reproduce the issue with this Python library directly. |
Hi David, |
What I just noticed is that I can actually still switch on my oven, even 3 days after the integration stopped updating. This proves that it is a problem with the SSE after all and not with the tokens, as the tokens still work (they need to be refreshed at least once every 24 h and HA takes care of that). Can you please check whether that also works for you? |
I can confirm this scenario as well. I can turn on the coffee machine, but the integration has stopped reporting |
Well, I have to turn on my washer manually and after that it reports during this time (after I restarted HA). But already after the second run the report update stops. |
OK so I observed something interesting. This time I had an internet outage and the updates just stopped, without any messages in the log. So my theory is that the SSE just drops from time to time when there is a network bottleneck or a hiccup of the API server. The question is just how to detect those disconnects ... |
Oh wow I think I finally found a way to solve this. By getting inspiration from the competition: the API server actually sends a |
I just released a new version (and updated the dependency in the custom component repo) that should be able to reconnect in case of a stale connection. However, it does not yet address what happens if the connection is closed and the reconnection fails (e.g. if the server is temporarily unavailable or the internet connection temporarily interrupted). Still, it would be great if someone could test this - it may well be that this solves most problems. |
I think you are on the right track. My washing machine is in the basement and there I have a powerline connection. May be there is an unreliable connection. I will test your fix. |
Unfortunately, I still have this issue. I prepared another log. I merged your changes in tip revision, restarted HA, and started my washer. HC updated accordantly. After a while I noticed a read time out. And after another time a lost the connection and HA does not update the integration. |
OK thanks. At 11:26 the new timeout fired and the reconnection was successful. At 11:47 it fired again and then at 11:52 it failed to connect. This is basically what I mentioned above, a failing reconnection because the server cannot be reached is still not handled. But I don't now what's causing it. |
Hi David, you can close it. It doesn't occurred on my live system. The error occurred on my docker dev system due to the system suspect mode. |
just tested this on a fresh hass installation and it still looses the connection after some time and it’s fixed on a reload. is there a way to enable debug logging only for this integration to help identify the issue? |
Hi, issues with the Home Assistant integration should be reported at https://github.com/home-assistant/core. |
Hi!
I am using Home Assistant 0.102.3 and Home Connect 0.2.3 (installed via HACS). For me this integration just stops updating the entities after several hours. If i restart HA the integration is working again for several hours.
I have set up an automation wich notifies me if the dishwasher finished the program, this automation just stops working because the sensor never updates:
Anything i am doing wrong here? Any suggestions?
Regards
Richard
The text was updated successfully, but these errors were encountered: