Git Product home page Git Product logo

Comments (20)

DavidMStraub avatar DavidMStraub commented on September 23, 2024 1

It is taken from hass.config.api.base_url. Can you please try adding the "correct" host name/IP in your HA config like

http:
  base_url: https://HOST:PORT 

from homeassistant-homeconnect.

anthonyangel avatar anthonyangel commented on September 23, 2024 1

@immert20 Sounds like you need to set your base_url parameter of the http component (and prefixing it with https)

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024 1

Can you please delete the .homeconnect-token-cache.json in your config directory and try again? It might be an invalid token from a previous try.

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

Oh, I see.

Can you try if it works when you add

import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'

at the beginning of custom_components/homeconnect/__init__.py?

from homeassistant-homeconnect.

immert20 avatar immert20 commented on September 23, 2024

Same also after the import os

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

I just checked on my own HA instance that is also behind an nginx proxy and it worked. Calling the /api/homeconnect endpoint directly, I also got a 500, but this is normal (after the login redirect, it is called with additional parameters).

Can you please double check that you have https://hasstest.domain.com/api/homeconnect listed as one of the valid Redirect URIs in your Home Connect app's settings? Perhaps you accidentally put http there?

from homeassistant-homeconnect.

anthonyangel avatar anthonyangel commented on September 23, 2024

Thanks very much, using

import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'

gets me 1 step closer, a blank file called homeconnect was downloaded (which I can assume is safe to ignore, same as with the Spotify component), and the .homeconnect-token-cache file was created correctly on the server.

Once connected I don't get a success message, the configuration popup turns blank and I'm then unable to discover any devices. I suspect that this is a different unrelated issue, but not sure what yet, will do some more digging then open up another issue if necessary
image

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

OK - that means that the authentication indeed succeeded (I also have the problem with the blank window and sometimes downloaded file, not sure how to get rid of it. Indeed I copied most of the code for that from the Spotify component).

Concerning the absence of devices, I assume you have added them to your Home Connect account (using the Android app), right? Are there any errors in the HA log?

from homeassistant-homeconnect.

immert20 avatar immert20 commented on September 23, 2024

Where do you read out the URL for Authorising? Mine url show my internal IP address.. When I edit the URL for authorise I can login with my HomeConnect credentials en get the 500 error. But when I click on Successful authorised nothing happen..

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

@immert20, so you are being shown the Home Connect login screen? This is good, because it means the redirect URI is being accepted. Then when you are done authorizing, you are getting a 500 server error, do I understand correctly?

If so, can you please check if there is any error showing in your home-assistant.log?

from homeassistant-homeconnect.

immert20 avatar immert20 commented on September 23, 2024

@DavidMStraub Yes I get that, but only after edit the url manually.. because there is an internal ip filled in. I don't know where that $vars is coming from.

from homeassistant-homeconnect.

immert20 avatar immert20 commented on September 23, 2024

Yes it works!! But I tried to switch on my Coffee machine from HASS, but it won't turn on

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

Indeed, the power on/off switches don't work for me either (also using raw API calls) and I don't know why.

Are you able to brew coffee though, once switched on manually and acticating remote start?

from homeassistant-homeconnect.

immert20 avatar immert20 commented on September 23, 2024

Hmm that's weird. I will check that tonight!

from homeassistant-homeconnect.

dvbit avatar dvbit commented on September 23, 2024

Same issue.
Behind nginx reverse proxy.
base url: https>mydomain.it
certificate by letsencrypt

blank screen
when I refresh error 500.

Items shown in homeassistant but disappear at first restart

from homeassistant-homeconnect.

FlavorFx avatar FlavorFx commented on September 23, 2024

same issue here.
HA 101
no reverse proxy
base url set (https)
certificate by letsencrypt
home connect url set
home connect login succeeded
blank screen
when I refresh error 500
I also deleted homeconnect token cache and retried but no improvement.

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

Any error in the log?

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 23, 2024

By the way I received an e-mail from the Home Connect Developer Program yesterday mentioning that they have some problems with the API due to increased traffice after relaunching their mobile app. So it might just be that the server was down.

from homeassistant-homeconnect.

FlavorFx avatar FlavorFx commented on September 23, 2024

It seems to work now. Honestly speaking, I don't know why.

from homeassistant-homeconnect.

AleXSR700 avatar AleXSR700 commented on September 23, 2024

Hello everyone,
I seem to have the same problem. I am trying to install Home Connect and I used
http://192.168.0.224:8123/auth/external/callback
as Redirect URI.
I can login when I hit "Open Website" and then when I confirm that I want to grant access to everything, I get the error
500 Internal Server Error Server got itself in trouble

Any idea what could be causing this or what to try to fix it?

from homeassistant-homeconnect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.