PiotrMachowski / Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
MIT License
1.13k stars 122 forks source link

Unable to log in, check credentials #453

Closed feu77 closed 1 year ago

feu77 commented 1 year ago

Checklist

The problem

After configuration and reboot, I get the following error in the logs: Unable to log in, check credentials

Entity is showing a blue pic with a center text: failed to login

HA and device in the same network, map is showing up in the Mi home app. Device is working with the same credentials as used for the Xiaomi integration.

What version of an integration has described problem?

v2.2.0

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

roborock.vacuum.s5e

What version of Home Assistant do you use?

2023.7.1

What type of installation are you running?

Home Assistant Container

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: 192.168.2.2
    token: {token as provided by extractor}
    username: {user as used to extract token}
    password: {password as used to extract token}
    draw: ['all']
    attributes:
      - calibration_points

Errors shown in the HA logs (if applicable)

Logger: custom_components.xiaomi_cloud_map_extractor.camera
Source: custom_components/xiaomi_cloud_map_extractor/camera.py:270
Integration: xiaomi_cloud_map_extractor ([documentation](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor), [issues](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues))
First occurred: 14:14:45 (2 occurrences)
Last logged: 14:25:03
Unable to log in, check credentials

Additional information

No response

PiotrMachowski commented 1 year ago

Have you used your main Xiaomi account? Do you have some traffic filtering on network?

feu77 commented 1 year ago

Hi, I used the crdentials from the Xiaomi Mi home account. Traffic filtering was disabled.

feu77 commented 1 year ago

the same credentials to extract the token btw

PiotrMachowski commented 1 year ago

Can you try enabling debug logging?

feu77 commented 1 year ago

Ok, so i've added the debug logging to configuration.yaml but how to retrieve the logs?

PiotrMachowski commented 1 year ago

They are in home-assistant.log

feu77 commented 1 year ago
2023-07-24 05:13:20.294 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Failed to log in
2023-07-24 05:13:20.294 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-07-24 05:13:20.403 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Map name rubyslite%2F320364679%2F0
2023-07-24 05:13:20.403 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - False, map name - rubyslite%2F320364679%2F0, device retrieved - False
PiotrMachowski commented 1 year ago

Do you have a backslash in your password? If so, replace it with a double backslash

feu77 commented 1 year ago

No just letters and numbers

PiotrMachowski commented 1 year ago

Are you 100% sure you have used correct username and password? Map Extractor uses exactly the same code as Tokens Extractor, so there shouldn't be any difference

feu77 commented 1 year ago

Exactly the same, copy/paste several times, entered them manually..... The user name is a phone number with a leading +, might that be a problem?...but it worked for the extractor.

PiotrMachowski commented 1 year ago

It might... Have you tried using email or account id?

feu77 commented 1 year ago

Perfect: the Xiaomi account ID worked!!

PiotrMachowski commented 1 year ago

Great!