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

Xiaomi Cloud Map Extractor two factor auth required (see logs) #471

Closed arsenal3008 closed 10 months ago

arsenal3008 commented 10 months ago

Checklist

The problem

Hass kernel update not showing map

What version of an integration has described problem?

v2.2.1

What was the last working version of an integration?

v2.2.0

What vacuum model do you have problems with?

vacuum.chuangmi_hmi707

What version of Home Assistant do you use?

Home Assistant 2023.10.0

What type of installation are you running?

Home Assistant OS

Camera's configuration

camera:                                                       
  - platform: xiaomi_cloud_map_extractor                         
    host: 192.168.1.130                                           
    token: "*********************"                   
    username: ***********@*******.**                              
    password: **********                                          
    colors:                                                       
      color_map_inside: [32, 115, 185]             
      color_map_outside: [64, 148, 155]            
      color_map_wall: [100, 196, 254]              
      color_map_wall_v2: [112, 58, 148]             
      color_grey_wall: [93, 109, 126]               
      color_ignored_obstacle: [14, 22, 89, 1]      
      color_obstacle: [14, 89, 18, 1]               
      color_path: [255, 255, 255]                   
      color_goto_path: [0, 255, 0]                  
      color_predicted_path: [255, 255, 0, 0]        
      color_cleaned_area: [127, 127, 127, 0.1]      
      color_zones: [0xAD, 0xD8, 0xFF, 0x8F]       
      color_zones_outline: [0xAD, 0xD8, 0xFF]    
      color_virtual_walls: [255, 0, 0]              
      color_new_discovered_area: [38, 115, 133]    
      color_no_go_zones: [255, 33, 55, 127]       
      color_no_go_zones_outline: [255, 0, 0]       
      color_no_mop_zones: [163, 130, 211, 127]     
      color_no_mop_zones_outline: [163, 130, 211]  
      color_charger: [0x66, 0xff, 0xff, 0x00]       
      color_robo: [75, 235, 149]                   
      color_room_names: [255, 255, 255]             
      color_unknown: [0, 0, 0]                      
      color_scan: [0xDF, 0xDF, 0xDF]                
    room_colors:                                                   
      1: [23, 158, 21]                                                
      2: [40, 124, 239]                                           
      3: [185, 184, 102]                                             
    draw: ['all']                                                  
    attributes:                                                   
      - calibration_points                                          
      - charger                                                     
      - cleaned_rooms                                               
      - country                                                    
      - goto                                                       
      - goto_path                                                   
      - goto_predicted_path                                        
      - image                                                       
      - is_empty                                                   
      - map_name                                                   
      - no_go_areas                                                 
      - no_mopping_areas                                           
      - obstacles                                                   
      - ignored_obstacles                                           
      - path                                                        
      - room_numbers                                               
      - rooms                                                      
      - vacuum_position                                             
      - vacuum_room                                                
      - vacuum_room_name                                            
      - walls                                                       
      - zones                                                       
    map_transformation:                                            
      scale: 3                                                     
      rotate: 0                                                     
      trim:                                                        
        top: 8                                                      
        bottom: 10                                                
        left: 8                                                    
        right: 8                                                   
    sizes:                                                       
      charger_radius: 6.5                                           
      vacuum_radius: 6.5                                            
      path_width: 1                                                 
      obstacle_radius: 1                                          
      ignored_obstacle_radius: 1                                   
    scan_interval:                                                 
      seconds: 10                                                  
    auto_update: true                                             
    store_map_raw: false                                            
    store_map_image: true                                         
    store_map_path: "/config"                                      
    force_api: roidmi

Errors shown in the HA logs (if applicable)

No response

Additional information

No response

PiotrMachowski commented 10 months ago

Was it working before?

arsenal3008 commented 10 months ago

Was it working before? Yes, everything worked fine before, thanks for the excellent work

PiotrMachowski commented 10 months ago

If you have 2FA issues check out this discussion

arsenal3008 commented 10 months ago

If you have 2FA issues check out this discussion if you mean add country: cn then it didn't help

PiotrMachowski commented 10 months ago

There are lot of other solutions in other comments

arsenal3008 commented 10 months ago

I think this is a xiaomi mistake The login of Xiaomi account needs security verification. [Click here](https://account.xiaomi.com/identity/authStart?sid=xiaomiio&context=***********) to continue! 本次登录小米账号需要安全验证,[点击这里](https://account.xiaomi.com/identity/authStart?sid=xiaomiio&context=*************)继续!你需要在与HA宿主机同局域网的设备下完成安全验证,如果你使用的是云服务器,将无法验证通过。

PiotrMachowski commented 10 months ago

Check out this approach: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues/157#issuecomment-1658658607