Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
125 stars 25 forks source link

[New Version] - OTP Auth - Testers needed #180

Closed Dielee closed 3 months ago

Dielee commented 3 months ago

Info

The new OTP authentication of the volvo app is mandatory from version 1.9.0, just like in the app, also available in volvo2mqtt. Before the new function can be merged into main, i need some testers. The release is currently only available for docker containers, not as homeassistant addon.

Docker image: ghcr.io/dielee/volvo2mqtt:otp_auth

OTP Authentication

As of version v1.9.0, this addon uses the same OTP authentication as the Volvo app. The following steps are required for authentication in exactly this order:

  1. Setup volvo2Mqtt via Docker
  2. Fill in your settings and start volvo2Mqtt
  3. Your log will show the following lines
    Waiting for otp code... Please check your mailbox and post your otp code to the following mqtt topic "volvoAAOS2mqtt/otp_code". Retry 0/15
    Waiting for otp code... Please check your mailbox and post your otp code to the following mqtt topic "volvoAAOS2mqtt/otp_code". Retry 1/15
    etc ...
  4. Now, open your mailbox and copy your OTP Code
  5. Open HomeAssistant and search for the entity ID text.volvo_otp
  6. Paste your OTP into the text entity and press Enter
  7. If everything has worked, your addon is now authenticated. In the future, OTP authentication only needs to be done when updating, not when restarting the container.
FireWizard52 commented 3 months ago

Hi @Dielee

I tested my own application and it was relative easy for me to grab the Volvo ID Verification code from my email. Not a problem. During my next test I discovered that during the login process the Volvo server did not request a Volvo ID Verification code, nor that it send an email with a verification node.

This complies with your remark that the Volvo Cars app does not use these "Connected", "Energy" or "Location" API. I have always been sure that there were different API's, as I use the "molobrakos" python script, which is also used by the Volvo Cars app. I can still use the login method, as used before, but my app needs 2FA

So the question. Are you sure, that you need this to login?

B.t.w. The Volvo ID server is working again and I can connect with the verification code. Also the molobrakos python script works as before again.

Dielee commented 3 months ago

Yes, we need this login. Sooner or later Volvo will stop the login only via Username and Password. Please stop using this issue as Chat.

HWiese1980 commented 1 month ago

Isn't the retry timeout a little short?

HWiese1980 commented 1 month ago

Nevermind, I managed to do it... thanks for the update!