-
Notifications
You must be signed in to change notification settings - Fork 45
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
"Failed to set up" integration when HA is restarted #317
Comments
Can you provide a diagnostic output please as have not been able to create this issue. |
For me the same since the last update, beside the reload do not solve the problem. I only have a floorheating system with 4 Thermostats and the bridge version 1. Logs:
If you need more logs let me wich one and where. |
Here are the diagnostics. I had to go through the reload-update cycle (so that the integration was functioning) before I had the option to download them. I hope that doesn't make them useless! Happy to provide any more info, or to dig around myself if helpful (I am competent with python etc but new to HA). Thanks for all your work! config_entry-wiser-2f19cc38495459ad1d8a320c7774cfbe.json-5.txt |
I meant to say that it’s not perfectly reliable. After a handful of restarts it’s perhaps 50/50 for me. |
Ben, your diagnostic file was perfect. I use this to emulate your hub in my mock hub server to make sure there is no data related issue that we do not catch. This worked perfectly and loaded and functioned fine. As such, I can only think that for some reason, it is failing getting an update from the hub at startup. We have suppressed a lot of this but if you know how to pull a version from the dev branch and run that in your HA environment then, I can enable some logging and we can see better what is happening. Let me know. I also have a couple of questions if you can provide answers:
|
@thecem - can you also please answer the 2 questions above plus: What version of HA are you running? Thanks |
Going back to 3.1.7 is directly working. |
Yes I’m very happy to try a dev version.
Yes, I ran most of the betas but not sure exactly which.
No, I was afraid of breaking automations etc. but perhaps I don’t need to be? |
OK, Ben if you want to update form the dev branch and see if the logs show any better errors when you restart. |
In 3.2.0 there is no diagnostic information button. In 3.1.7 it is: config_entry-wiser-71de748eec083b56f128f048f9ba6ada.json.txt |
@thecem - ok this is a different issue. Running your hub diagnostics on my emulator showed an issue with the UFH controller code. I will transfer this to another issue and provide a fix in the next couple of days (once I know what this issue with Ben's is). |
I installed the dev branch, and couldn't reproduce the problem across 6 restarts. Instead, in the 'Integrations' page, I initially get "Retrying setup: None". Then, after HA has finished starting up, this switches to the normal success card. In the logs, I get:
I then reinstalled 3.2.0 from HACS and got "Failed to set up" again (which doesn't resolve itself) in one of two restarts. TLDR: dev branch seems to fix the problem for me |
Hmm. It looks like your hub does not respond to the initial request within 10s. I made a couple of changes to both improve logging but also fail the setup and retry if no data from the hub has been retrieved. That is the integration not ready message. Not sure why it does not update on first request. I would have thought timeout this is plenty long enough as mine responds in a few hundred ms. I'll think a bit more if there is anything that might cause this problem with a slow responding hub but for now, I'll push a v3.2.1 version from the dev branch so at least it works more reliably and fixes thecem's issue also. |
Could the slowness be on the HA end? I'm running on a Pi Zero which is usually fine but it does take a long time to start up. |
That could be the issue - we did have a different retry strategy in 3.1.7 but all 3.2beta versions were the same. Anyway, v3.2.1 is now available to download via HACs which should now work although you may get the setup retry on each restart. |
Yes, v3.2.1 works great for me. Thanks for working on this! |
This was discussed on the forum thread, but now seems to happen reliably on restart for me. The integration is unavailable on restart, and the integrations page in HA says "Failed to set up" for the Wiser integration. I seem to be able to get it to work by going to the 3-dot menu for the integration, then Reload, then 3-dot menu again, System options, Update.
The text was updated successfully, but these errors were encountered: