Another cry for help authenticating into Vesync integration

I see several posts over the years about authentication failing with the Vesync integration. Frequently they are about a formerly functioning install. I am attempting to configure the integration for the first time.
My HA: Home Assistant Container; Core 2025.6.3; Frontend 20250531.4
I’ve configured my supported device (Levoit 300S air purifier) in the app and can manage it there.
Attempting to install/configure the integration in HA gives me a credentials input box. I know my creds are good.
The log shows only this single line:
2025-06-28 10:43:44.594 ERROR (SyncWorker_7) [pyvesync.vesync] Error logging in with username and password
Any clues? Thx.

2 Likes

Iam on same boat, also would use s help

1 Like

Me too, cannot get past the login page. Invalid credentials. Has anyone have any idea what I’m doing wrong?

1 Like

Having the same problem. Didn’t work with 2025.6.3 and doesn’t work with 2025.7. Is there a solution?

1 Like

No one has provided the needed details to help get this fixed. Please post logs to the github issue. Debug logs are key here.

Here is the current issue: vesync authentification failed · Issue #147715 · home-assistant/core · GitHub

Changing your region to United States in the VeSync app solves the problem.

1 Like

Same issue, new install. I tried changing the password to not contain symbols, same error.
(Complete new install, HAOS on Proxmox, vesync android app configured to Germany)

Log details (ERROR)

Logger: pyvesync.vesync
Source: /usr/local/lib/python3.13/site-packages/pyvesync/vesync.py:408
First occurred: 22:31:50 (4 occurrences)
Last logged: 22:37:00

Error logging in with username and password

Started having the issue after I enabled the 2FA in the VeSync account. Was able to login and use the integration before enabling the 2FA.

Mine still isn’t working. I’ve had 2FA enabled before I even got started on HA. Tried disabling it and it still doesn’t work. Also tried changing my password which also didn’t fix things. I’m not even sure how the connection broke, IIRC it wasn’t after an update or anything and I hadn’t touched anything vesync related on either the HA or vesync app side.

Having similar issues myself. Got an authenticaiton failed after updating to the latest - can’t login - even with changing username/password.

I saw the author posted a new version, but I don’t understand how to update it.

A fix for it is created but since it is a large re-write of code most likely will be in 2025.10 release.

1 Like

VeSync has completely overhauled its authentication process for new users, which breaks the current integration. As mentioned elsewhere in this thread the new login flow has been reverse-engineered, and a fix is already available in a beta version of the underlying library.

You can get your integration working immediately by manually overriding the built-in component to use the new beta library.

Here are the steps:

  1. Go to your Home Assistant config folder (the one with configuration.yaml).
  2. Create a folder named custom_components if it doesn’t already exist.
  3. Download the VeSync integration code:
  • Go to the Home Assistant Core GitHub page here: homeassistant/components/vesync/
  • Click the Code button, then Download ZIP.
  • Unzip the file and find the vesync folder inside the homeassistant/components/ directory.
  1. Copy the vesync folder you just downloaded into your /config/custom_components/ directory. The final path will be /config/custom_components/vesync/.
  2. Check the manifest.json file inside your new /config/custom_components/vesync/ folder. Find the requirements line and change the version to 3.0.0b8. It should look like this:JSON"requirements": ["pyvesync==3.0.0b8"],
  3. Restart Home Assistant. Go to Developer Tools > YAML and click Restart. A full restart is required.

After restarting, Home Assistant will automatically download the new library version, and you should be able to add the VeSync integration and log in successfully.

The Permanent Fix

Community developers have already merged this fix into the pyvesync library. According to comments in the GitHub issues, this fix is expected to be included in the official Home Assistant 2025.10 release.

For the curious, here are the technical details of what changed:
  • Password Hashing:
    • Old Method: Sent your plain-text password.
    • New Method: Sends a 32-character MD5 hash of your password.
  • Authentication Flow:
    • Old Method: A single API call to log in.
    • New Method: A two-step process:
      1. Step 1: The client sends the email and MD5 hash to a new global endpoint (.../authByPWDOrOTM) to get a temporary authorizeCode.
      2. Step 2: The client sends that authorizeCode to a second endpoint (.../loginByAuthorizeCode4Vesync) to get the final, permanent session token.

You can track the official progress on the fix at the following link:

Hope this helps everyone get their devices back online!

1 Like

Thanks for doing the write up! As a reminder to everyone - please delete this custom vesync folder when you update to 2025.10 since keeping it means you won’t get bug fixes or updates on this integration.

I fully expect some bug fixes required since this is essentially a full re-write.

Hmmm… I did these steps exactly and I still can’t get past the failed login. Trying to figure out how to debug further now but manually adding custom components isn’t something I’ve done before in HA so I’m sort of flying blind :).

Thank you! This was super helpful to get authentication working. There is one more step though- Home Assistant won’t load a custom integration without a version. The following error was buried in the Home Assistant Core raw logs…

[homeassistant.loader] The custom integration 'vesync' does not have a version key in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details

Once I added "version": "2025.10" to manifest.json and restarted, HomeAssistant accepted the custom integration and showed the red box (indicating a custom component replacing the core component), and everything worked perfectly.

Turning off MFA “fixed” this for me.