natekspencer / hacs-vivint

Home Assistant integration for a Vivint home security system.
MIT License
66 stars 6 forks source link

Unable to Re-Authenticate my Credentials after changing Vivint Password #130

Closed amathews84 closed 7 months ago

amathews84 commented 7 months ago

The problem

I recently changed my password and that caused my Vivint integration to break. I went into the integration and click configure. However, I see no way to input my new credentials based on the Options screen. After submitting the Options it tells me Options have been saved. It takes me back to the Vivint integration page which still shows that setup is failed.

I also tried to add a hub and log in with the new credentials but it says "Account is already configured"

What version of Home Assistant Core are you running?

2024.2.5

What was the last working version of Home Assistant Core?

No response

Anything in the logs that might be useful?

Screenshots posted here: https://community.home-assistant.io/t/vivint-integration/110667/95?u=alexcapone

Additional information

No response

natekspencer commented 7 months ago

Can you enable debug logs and post those so I can see what error is actually being thrown? In the past, it would throw a 4xx error when authentication changed, which is caught and then bubbles up to Home Assistant to ask for new credentials.

Integrations generally don't give you a way to change credentials unless it identifies an authentication error. Instead, you can delete the integration and then re-add it with the new credentials.

amathews84 commented 7 months ago

Here are my logs related to Vivint Integration:

2024-03-04 01:59:39.915 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration vivint which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-03-04 02:00:05.204 ERROR (MainThread) [custom_components.vivint.hub] Unable to connect to the Vivint API

When you say to delete the integration and re-add it with the new credentials does that mean the devices in the original integration will be disabled and become ghost devices? In other words will I have to replace all the old entities/devices wherever they are used in dashboards and automations?

natekspencer commented 7 months ago

Can you try updating the Vivint integration to 2024.3.0 and seeing if that allows you to re-authenticate? I think I may have been able to resolve the issue.

When you say to delete the integration and re-add it with the new credentials does that mean the devices in the original integration will be disabled and become ghost devices? In other words will I have to replace all the old entities/devices wherever they are used in dashboards and automations?

Yes and no. When deleted, they will be marked as deleted. But if you add the integration again before they are purged (based on your history settings) and the unique identifiers are the same, the device would come back and so long as you didn't modify the original entities, the entity ids should also remain the same.

amathews84 commented 7 months ago

That worked! In the Devices and Services page I now have an option to re-configure the integration. I was able to add my updated credentials and authenticate MFA.

Thank you!