jaroschek / home-assistant-myuplink

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

Integration not working after restore update to a new computer #20

Closed Fredo70 closed 9 months ago

Fredo70 commented 9 months ago

I have move my HA from docker to HAOS on a new hardware. This integration doesn't work anymore.

2023-09-13 09:04:57.715 DEBUG (MainThread) [custom_components.myuplink] API error: 400 (Bad Request)
2023-09-13 09:04:57.716 WARNING (MainThread) [homeassistant.config_entries] Config entry 'WP_Wohlen' for myuplink integration not ready yet: 400, message='Bad Request', url=URL('https://api.myuplink.com/oauth/token'); Retrying in background

What is the right way to get the integration working again without starting everything from scratch?

7RST1 commented 9 months ago

Maybe the authentication tokens weren't transferred in the process. Did you try to reauthenticate the integration? If not, try deleting the application credentials associated with myuplink. You can find the stored application credentials by going to Devices and services and clicking the three dots top right

jaroschek commented 9 months ago

@Fredo70

Could you solve your issue?

If not, is it possible that you changed your local address for the home assistant installation as well?

If so, may be you have the same problems as described and answered in here: https://github.com/jaroschek/home-assistant-myuplink/issues/1#issuecomment-1312222671

So please check your redirect url in the application at dev.myuplink.com. Also don't try to change the url in an existing application as I experienced that this does not work. If you need a different redirect url for authentication you have to create a new application.

Hope this helps.

Fredo70 commented 9 months ago

@jaroschek Yes, I solve it. Deleting the application credentials was not possible because it is assiociated with the integration. So I deleted the integration and then deleted the credentials. Then I added the integration again and re-authenticated. After that it worked again.

jaroschek commented 9 months ago

Great, that you could solve your issue.