jaroschek / home-assistant-myuplink

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

How to start the integration setup #47

Open Erik-MG opened 6 months ago

Erik-MG commented 6 months ago

I have downloaded the integration, restarted HA and MyUplink appears under HACS. I created an application with credentials on dev.myuplink.com. However, I see no way to start the setup process and enter the parameters. What am I overlooking?

jaroschek commented 6 months ago

Hello,

as soon as you have sucessfully connected to the myUplink API, the setup is completed.

The Integration will pull the abailable systems, devices and parameters from the api to create entities grouped by devices.

You canbcheck the available parameter points in the myUplink API yourself. You can do a request of the data points from the API directly.

Go to the MyUplink Swagger site, and authorize (top right). Find your device ID by querying ​"/v2​/systems​/me", enter it when querying "/v2/devices/{deviceId}". Find the relevant data points.

All available parameters should be available as entity in Home Assistant.

Through this automatic process no other action should be necessary.

Erik-MG commented 6 months ago

Hi Jaroischek,Thanks answering my query.I think I never get to ‘successfully connected’ to the MyUplink account, at least not though your HACS integration. I never get the chance to provide the Credentials, Client Secret and CallbackURI. I suppose your integration requires those to make a successful connection and retrieve the data point.I can’t find any entities related to MyUplink in my entity list.I have no difficulty retrieving the datapoints though through the Swagger interface.Any clue?Thanks for your continued help,Erik  _____Sent from my mobileErik @. 29 Dec 2023, at 13:02, Stefan Jaroschek @.> wrote: Hello, as soon as you have sucessfully connected to the myUplink API, the setup is completed. The Integration will pull the abailable systems, devices and parameters from the api to create entities grouped by devices. You canbcheck the available parameter points in the myUplink API yourself. You can do a request of the data points from the API directly. Go to the MyUplink Swagger site, and authorize (top right). Find your device ID by querying ​"/v2​/systems​/me", enter it when querying "/v2/devices/{deviceId}". Find the relevant data points. All available parameters should be available as entity in Home Assistant. Through this automatic process no other action should be necessary.

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

Mortenjoe commented 5 months ago

@Erik-MG: Have you added the integration (Settings -> Devices and services -> Add integration)? Just asking 'cause it fooled me the first time :-)

Morten

siggeb commented 5 months ago

I had the same issue as above, not knowing where to go next to finish this.

Maybe add this to the setup instructions? I am myself also quite new to HA and the HACS flow has always been a mystery. Is this the standard procedure that I have been missing for all the things?

ie. Add this to the setup instructions:

For callback URL: "Use exactly this as the callback URL in the Myuplink application setup https://my.home-assistant.io/redirect/oauth" (it now seems editable there as well)

"Start the myUplink integration setup by going to "Settings -> Devices and services -> Add integration > myUplink" and log in with your credentials." alas, I did not have to insert the client id and secrets, I just had to log in with regular creds...

siggeb commented 5 months ago

Anyway, I succeeded in adding my CTC Ecozenith 360 heat pump through this integration.

Erik-MG commented 5 months ago

Thank you all very much. Indeed I had not added the integration once more though the Settings -> Devices and services -> Add integration route.

However, the first time I did this I could log in to myUplink but nothing happened thereafter (just a blank screen with myUplink logo was shown). As I couldn't find any way to reinitiate the start-up procedure other than removing the integration completely via the HACS menu and re-install it.

In the mean time I had also deleted my existing myUplink App (with credentials and secret) and created a new App with the prescribed callback URL. After going through the HACS and Settings route I re-installed the myUplink integration but I don't get the chance to provide my new credentials and see immediately a message "Error. Sorry, there was an error : unauthorized_client". It looks to me my old credentials are stored somewhere in HA and re-used while they should have been deleted when I removed the myUplink integration (or at least get a chance to provide the new credentials). Logging in with my new credentials in Swagger is no problem and I can retrieve my heat pump details.

Anyone to help me any further?

7RST1 commented 5 months ago

You can delete the old credentials by going to the Devices & Services page, clicking the three dots top right and select "Application Credentials". Delete the one originating from myuplink, and you'll be prompted for credentials next time you set up the integration.