jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
191 stars 46 forks source link

Failed to load after latest HA core update #214

Closed cyclone182 closed 1 year ago

cyclone182 commented 1 year ago

Updated to the latest HA Core 2023.5.2 instance this morning and suddenly Hubitat integration is showing "Failed to Load". Had to roll back to HA core 2023.4.6 to get it to continue working. Anyone else experience this? Does this need an update to the integration?

LindsayReid commented 1 year ago

Not had a problem myself but I did have trouble updating Hubitat to 2.3.5.135.

I waited ages for reboot and although Hubitat light was green, I could not get any response even trying to locate with it's MAC address. Eventually removed the power and rebooted - All came back in a couple of minutes with the HA Home Assistant Device Bridge working with HA Version 2023.5.2

It may be that Hubitat 2.3.5.135 is OK and your problem was updating HA to 2023.6.2 without the Hubitat update?

On Sat, 6 May 2023 at 18:16, cyclone182 @.***> wrote:

Updated to the latest HA Core 2023.5.2 instance this morning and suddenly Hubitat integration is showing "Failed to Load". Had to roll back to HA core 2023.4.6 to get it to continue working. Anyone else experience this? Does this need an update to the integration?

— Reply to this email directly, view it on GitHub https://github.com/jason0x43/hacs-hubitat/issues/214, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFWRDU7HJZFCI6B4VZFGT3XE2BOBANCNFSM6AAAAAAXYHZDDU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rspollock commented 1 year ago

Same problem here. Had to roll back to 2023.4.6 Following

jason0x43 commented 1 year ago

I've been out of town for the last week. I'll try to take a look tonight.

jason0x43 commented 1 year ago

I'm currently on Hubitat 2.3.5.123 and HA 2023.5.2, and everything seems to be running smoothly.

@cyclone182 Have you checked the HA log for any error messages?

rspollock commented 1 year ago

I tried to update again today. Everything works great until I update HA to 2023.5.2. I completely deleted the integration from Home Assistant and Hubitat and reinstalled to no avail. I have attached the HA Log. It contains a number of "AttributeError: module 'homeassistant.helpers.entity_registry' has no attribute 'async_get_registry' errors.

HA Log.txt

Any help or suggestions appreciated. In the meantime back to 2023.4.6 😊

rspollock commented 1 year ago

Eureka! I found it. Looking at the files in the Hubitat repository I noticed some had been updated in the last month, or so. So, I deleted the Hubitat integration under Settings>Intergrations, then re-downloaded the repository via HACS. Then added the Hubitat integration back on the Settings>Integrations page and re-entered the configuration information. After making sure all was still happy running release 2023.4.6, I updated to 2023.5.2. All still happy!I I never saw an update notice to the Hubitat integration via HACS, but who knows, it works now... 👌

jason0x43 commented 1 year ago

I hadn't had a chance to look into this yet, but I'm glad you found the issue!

It looks like you had missed a couple updates. Calls to async_get_registry were removed in v0.7.2, which was published 11 months ago. 🙂

rspollock commented 1 year ago

Thank you.... It is a FANTASTIC integration! Probably like most who use the integration, I use Hubitat to handle Zwave and Zigbee stuff and Home assistant for the rest. It is nice to have them play well together. Thanks for all your work on it.

cyclone182 commented 1 year ago

Will deleting then re-installing the updated integration break any of my automations, or will it use the exact same devices/entities that are currently in my Hubitat integration? Sent from my iPhoneOn May 10, 2023, at 8:11 AM, rspollock @.***> wrote: Eureka! I found it. Looking at the files in the Hubitat repository I noticed some had been updated in the last month, or so. So, I deleted the Hubitat integration under Settings>Intergrations, then re-downloaded the repository via HACS. Then added the Hubitat integration back on the Settings>Integrations page and re-entered the configuration information. After making sure all was still happy running release 2023.4.6, I updated to 2023.5.2. All still happy!I I never saw an update notice to the Hubitat integration via HACS, but who knows, it works now... 👌

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rspollock commented 1 year ago

I had the same concern, but the process did not upset anything. All devices and entities were still there and all automations still worked fine. I did not change anything in Hubitat and did not create new access token. I used the existing values when I entered the configuration data in Home Assistant. (I did backup everything before starting.) Good Luck.

jason0x43 commented 1 year ago

As long as all you're doing is deleting and reloading the integration source code, you should be fine. The problem would be if you actually removed the integration from the Integrations page in HA.

cyclone182 commented 1 year ago

Ok based on that I’m a bit confused as to how to safely update. Do I go into Settings>Integrations and delete the integration first, then re-install the integration? Sent from my iPhoneOn May 10, 2023, at 2:19 PM, Jason Cheatham @.***> wrote: As long as all you're doing is deleting and reloading the integration source code, you should be fine. The problem would be if you actually removed the integration from the Integrations page in HA.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rspollock commented 1 year ago

Jason is the pro... I'd try just downloading the new repo first and see what happens after restarting. I didn't have his input when I tried it, but everything still came out okay. The good thing is with a fresh backup you can get back to where you are.

jason0x43 commented 1 year ago

Assuming you installed with HACS, it should show that an update is available. If you’re using HACS and it’s not showing an update and you’re on an old version (<0.9.5), you should be able to remove and reinstall the repository with HACS. Just don’t remove the installed integration from HA’s Integrations page.

cyclone182 commented 1 year ago

Updated and it worked!! Thank you so much! I don’t know what I’d do without this integration!Sent from my iPhoneOn May 10, 2023, at 6:13 PM, Jason Cheatham @.***> wrote: Assuming you installed with HACS, it should show that an update is available. If you’re using HACS and it’s not showing an update and you’re on an old version (<0.9.5), you should be able to remove and reinstall the repository with HACS. Just don’t remove the installed integration from HA’s Integrations page.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

tlsvict commented 1 year ago

Thank you so much @rspollock for finding the solution and to @jason0x43 for this wonderful software.

I had installed it prior to knowing about HACS ages back, so was easy to miss updates ; I was able to get the current version installed via HACS now so hopefully it will help me stay more in sync and have things playing nicely with each other.

sresam89 commented 1 year ago

Am on 2023.5.4 docker image not hassio Integration fails for me, tried deleting and creating new one still fails home-assistant_hubitat_2023-05-31T18-05-37.185Z.log

jason0x43 commented 1 year ago

@sresam89 Make sure you're using a recent version of the integration. The errors in your log statement indicate that you're using a version of the integration that's several months old.

sresam89 commented 1 year ago

@jason0x43 am using the 2023.5.4 docker image off of this git repository. I am afraid I cant change the integration version on there

jason0x43 commented 1 year ago

The integration isn't stored in that docker image. You must either install it using the HACS integration, or clone it from GitHub into your config/custom_components directory.

jason0x43 commented 1 year ago

I'm closing this because the issue is just that old versions of the integration are being used with the latest HA, not that there's an issue with the integration.