home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.29k stars 30.61k forks source link

vicare authentification fails #113830

Closed arfoll closed 7 months ago

arfoll commented 7 months ago

The problem

Can't manage to authenticate to viessmann backend. My token is generated as per the instructions: Screenshot from 2024-03-19 19-46-16

I'm using the flow on my smartphone that has the vicare app installed and working correctly. There is a vitoconnect OPTO2 with a Vitocal 200-S connected and working. Just using the default flow from either my pixel6 (as per instructions) or from the laptop results in an authentification error but seemingly not much more detail

What version of Home Assistant Core has the issue?

core-2024.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

vicare

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vicare/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Kit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.119 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6)): Received {'type': 'frontend/get_translations', 'language': 'en', 'category': 'title', 'integration': ['vicare'], 'id': 75}
2024-03-19 19:12:50.754 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140447923781440] Brendan from 192.168.* (Mozilla/5.0 (Linux; Android 14; Pixel 6 Build/AP1A.240305.019.A1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.119 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6)): Sending b'[{"id":73,"type":"result","success":true,"result":{"resources":{"component.vicare.config.abort.reauth_successful":"Re-authentication was successful","component.vicare.config.abort.single_instance_allowed":"Already configured. Only a single configuration possible.","component.vicare.config.abort.unknown":"Unexpected error","component.vicare.config.error.invalid_auth":"Invalid authentication","component.vicare.config.flow_title":"{name} ({host})","component.vicare.config.step.reauth_confirm.data.client_id":"Client ID","component.vicare.config.step.reauth_confirm.data.password":"Password","component.vicare.config.step.reauth_confirm.description":"Please verify credentials.","component.vicare.config.step.user.data.client_id":"Client ID","component.vicare.config.step.user.data.heating_type":"Heating type","component.vicare.config.step.user.data.password":"Password","component.vicare.config.step.user.data.username":"Email","component.vicare.config.step.user.description":"Set up ViCare integration. To generate client ID go to https://app.developer.viessmann.com"}}},{"id":74,"type":"result","success":true,"result":{"resources":{}}}]'
2024-03-19 19:12:50.755 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140447923781440] Brendan from 192.168.88.12 (Mozilla/5.0 (Linux; Android 14; Pixel 6 Build/AP1A.240305.019.A1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.119 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6)): Sending b'{"id":75,"type":"result","success":true,"result":{"resources":{"component.vicare.title":"Viessmann ViCare"}}}'
2024-03-19 19:12:50.822 DEBUG (MainThread) [homeassistant.loader] Importing platform vicare.config_flow took 0.03s (loaded_executor=False)
2024-03-19 19:13:10.528 DEBUG (SyncWorker_4) [ViCare] Token file argument not provided or file does not exist
2024-03-19 19:13:10.531 DEBUG (SyncWorker_4) [ViCare] Auth URL is: https://iam.viessmann.com/idp/v3/authorize?response_type=code&client_id=CORRECT_ID&redirect_uri=vicare%3A%2F%2Foauth-callback%2Feverest&scope=IoT+User&state=cXXXC7EWzJ&code_challenge=FeYa4xSwIBLXXXXea6Tj6VM&code_challenge_method=S256

Additional information

I've never had this configured or working before so the "one client" messages are rather odd. My account is new from today as I only just installed the OPTO2.

home-assistant[bot] commented 7 months ago

Hey there @cfenner, mind taking a look at this issue as it has been labeled with an integration (vicare) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `vicare` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign vicare` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vicare documentation vicare source (message by IssueLinks)

CFenner commented 7 months ago

Did you just create the client? There were other users with the same issue but it got resolved by time.

arfoll commented 7 months ago

I guess it was ~1h ago. I also saw such reports, will try again tomorrow and see if I get lucky.

On March 19, 2024 8:12:10 PM GMT+01:00, Christopher Fenner @.***> wrote:

Did you just create the client? There were other users with the same issue but it got resolved by time.

-- Reply to this email directly or view it on GitHub: https://github.com/home-assistant/core/issues/113830#issuecomment-2007937237 You are receiving this because you authored the thread.

Message ID: @.***>

CFenner commented 7 months ago

Maybe we should add this to the docs.

arfoll commented 7 months ago

Working as expected - took ~12hrs for the token to work. Sorry for the noise.