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.14k stars 121 forks source link

Unable to recover the map with my Xiaomi S12 vacuum. #544

Open jserieye opened 1 month ago

jserieye commented 1 month ago

Checklist

The problem

Good morning,

Unable to recover the map with my Xiaomi S12 vacuum.

image

What version of an integration has described problem?

v2.2.1

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

xiaomi.vacuum.S12

What version of Home Assistant do you use?

2024.7.3

What type of installation are you running?

Home Assistant Core

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    draw: ['all']
    attributes:
      - calibration_points  
    force_api : roidmi
    store_map_raw: true
    store_map_path: "/config"

Errors shown in the HA logs (if applicable)

Enregistreur: homeassistant.helpers.entity
Source: helpers/entity.py:944
S'est produit pour la première fois: 16:20:51 (111 occurrences)
Dernier enregistrement: 16:29:59

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1298, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 278, in update
    self._handle_map_data(map_name)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 335, in _handle_map_data
    map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 27, in get_map
    response = self.get_raw_map_data(map_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 45, in get_raw_map_data
    map_url = self.get_map_url(map_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum_v2.py", line 18, in get_map_url
    if api_response is None or "result" not in api_response or "url" not in api_response["result"]:
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Additional information

No response

tiahgo123 commented 1 month ago

any news ?

jserieye commented 1 month ago

any news ?

No :/

tiahgo123 commented 1 month ago

Do you have any ETA ? Maybe I can try to help you

jserieye commented 1 month ago

You want a Estimated Time of Arrival? Sorry, I'm a novice

tiahgo123 commented 1 month ago

Yes. Do you know Estimated Time of Arrival?

jserieye commented 1 month ago

Yes. Do you know Estimated Time of Arrival?

Sorry, I don't understand your request.

I bought this vacuuma month ago.

Here is the information that comes back for him in HA with Xiaomi Miot Auto integration

fan_speed_list: Slient, Standard, Medium, Turbo battery_level: 100 battery_icon: mdi:battery-charging-100 fan_speed: Standard model: xiaomi.vacuum.b106eu lan_ip: 192.1XX.X.XX mac_address: b8:XX:XX:XX:XX:XX entity_class: MiotVacuumEntity home_room: Maison XXXXX miot_type: urn:miot-spec-v2:device:vacuum:0000A006:xiaomi-b106eu:1 vacuum.status: 4 vacuum.fault: 2105 vacuum.mode: 0 vacuum.sweep_type: 0 vacuum.restricted_walls: [1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1] disturb.dnd_enable: 0 disturb.dnd_start_hour: 23 disturb.dnd_start_minute: 0 disturb.dnd_end_hour: 9 disturb.dnd_end_minute: 0 disturb.multi_prop_dnd: [0,23,0,9,0] map.remember_state: 1 map.cur_map_id: 1721666668 map.map_num: 1 map.cur_cleaning_path: null map.build_map: 0 map.has_new_map: 0 point_zone.target_point: [1100,1100] order.all_enable_count: [0,0] sweep.repeat_state: 0 sweep.door_state: 3 sweep.cloth_state: 0 sweep.suction_state: 1 sweep.water_state: 1 sweep.mop_route: 0 sweep.side_brush_life: 97 sweep.side_brush_hours: 175 sweep.main_brush_life: 98 sweep.main_brush_hours: 355 sweep.hypa_life: 97 sweep.hypa_hours: 175 sweep.mop_life: 100 sweep.mop_hours: 180 sweep.time_zone: -7200 sweep.cur_lang: fr_FR sweep.cleaning_time: 37 sweep.cleaning_area: 35 sweep.dirt_recognize: 0 sweep.pet_recognize: 0 sweep.ai_recognize: 0 sweep.carpet_booster: 0 sweep.multi_prop_vacuum: [0,3,0,1,1,0,-7200,37,35.1,0,"fr_FR","475022SD2311A09513","fr_FR",0,-1,0,0,1,2,1] sweep.tank_shake: 1 sweep.shake_shift: 2 sweep.map_encrypt: 1 alarm: false alarm.volume: 8 state_updater: lan vacuum.status_desc: Charging sub_entities: battery-3.battery_level-1 friendly_name: BOB Robot Cleaner supported_features: 12536

Thank you for your help !

gmcinalli commented 5 days ago

I've the same error.