jaroschek / home-assistant-myuplink

Custom Home Assistant integration for devices and sensors in myUplink account.
39 stars 8 forks source link

No reconfiguration of integration possible #39

Closed kusk closed 6 months ago

kusk commented 6 months ago

Issue: If I have configured the integration with a wrong callback URL, I have no way of reconfiguring the integration with a new callback URL+ID+secret.

Steps to reproduce:

  1. Install integration from HACS.
  2. Configure integration with wrong callback URL.
  3. Everytime the integration is added under "Integration" the website "https://api.myuplink.com/oauth/error?errorId=CfD...." is opened.
  4. Removal and reinstall of integration doesnt wipe the configuration.
ChrispyGee commented 6 months ago

I'm affected by this same issue albeit with a manual installation on this plugin. I can remove it from custom_configurations and restart HA but when I add it back in again I have no opportunity to reconfigure - I am immediately directed to the page https://api.myuplink.com/oauth/error?errorId=[long string deleted] which tells me "Sorry, there was an error : invalid_request".

How can we get back to the configuration path for the plugin?

jaroschek commented 6 months ago

Please remove the stored application credentials for the integration to re-authorize the access to the myUplink api.

This was already discussed in #30:

Is there a way to reconfigure identificator and secret?

OAuth secrets are stored in application_credentials file inside .storage dir in your HA configuration directory. It could also be accessed by UI in Settings -> Devices & Services -> [3 Dots hamburger menu] -> Application Credentials. Uninstalling myUplink integration does not remove OAuth secrets so you won't be asked to provide them when reinstalling / reconfiguring integration.

kusk commented 6 months ago

Ah missed that. Awesome it works now and it even pulls power usage unlike the old plugin.