Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor icon indicating copy to clipboard operation
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard

Request support for Smartmi A1 Vortex

Open cherryocola opened this issue 2 years ago • 9 comments

Checklist

  • [X] I have updated the integration to the latest version available
  • [X] I have checked if the vacuum/platform is already requested
  • [ ] I have sent raw map file to piotr.machowski.dev [at] gmail.com (Retrieving map; please provide your GitHub username in the email)

What vacuum model do you want to be supported?

zhimi.vacuum.wa1

What is its name?

Smartmi A1 Vortex

Available APIs

  • [ ] xiaomi
  • [ ] viomi
  • [ ] roidmi
  • [ ] dreame

Errors shown in the HA logs (if applicable)

No response

Other info

Cant retrieve raw map file, it says no such file or directory even after I added on manually

cherryocola avatar Feb 08 '23 10:02 cherryocola

Use following config:

store_map_raw: true
store_map_path: '/config'

PiotrMachowski avatar Feb 08 '23 10:02 PiotrMachowski

Hi, I've added that to yaml still says "cp: can't stat 'tmp/map_*': No such file or directory" when I run the command

thanks

cherryocola avatar Feb 08 '23 14:02 cherryocola

You don't have to use this command with this config, the file should be in the same directory as configuration.yaml file

PiotrMachowski avatar Feb 08 '23 14:02 PiotrMachowski

You don't have to use this command with this config, the file should be in the same directory as configuration.yaml file

Unfortunately, I still dont see it in the config folder

cherryocola avatar Feb 09 '23 06:02 cherryocola

Anything in logs?

PiotrMachowski avatar Feb 09 '23 10:02 PiotrMachowski

Anything in logs?

Unable to retrieve map data
8:08:21 PM – (WARNING) xiaomi_cloud_map_extractor (custom integration) - message first occurred at 2:30:54 PM and shows up 3921 times
Video camera(chuangmi.camera.ipc009): camera events is empty. {'result': 'ok', 'retriable': False, 'code': 0, 'data': {'thirdPartPlayUnits': [], 'nextTime': 1675339430000, 'isContinue': True}, 'description': '成功', 'ts': 1675944231157}
8:07:51 PM – (WARNING) Xiaomi Miot Auto (custom integration) - message first occurred at 2:31:51 PM and shows up 337 times
Update of binary_sensor.lumi_v3_d86e_motion_sensor is taking over 10 seconds
7:54:50 PM – (WARNING) helpers/entity.py - message first occurred at 2:31:16 PM and shows up 158 times
Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
7:54:49 PM – (WARNING) Camera - message first occurred at 2:31:05 PM and shows up 130 times
Stop living room speaker: Already running
7:47:55 PM – (WARNING) Automation
Timeout fetching Robot vacuum data
7:42:22 PM – (ERROR) Xiaomi Miio - message first occurred at 5:24:57 PM and shows up 4 times
STOP command requested but no session is active.
7:12:43 PM – (WARNING) components/cast/media_player.py - message first occurred at 3:13:44 PM and shows up 6 times
https://lynwoodha.duckdns.org/office-control/default_view:0:0 Uncaught
3:45:24 PM – (ERROR) components/system_log/__init__.py - message first occurred at 2:30:27 PM and shows up 17 times
Request xiaomi api: user/get_user_device_data {'did': '78818504', 'key': 'device_log', 'type': 'prop', 'time_start': 1675667061, 'time_end': 1675926321, 'limit': 1} failed, response: None
3:04:32 PM – (WARNING) Xiaomi Miot Auto (custom integration)
Sensor sensor.mi_cube_action_angle has device class None, state class None and unit ° thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2:31:37 PM – (WARNING) Sensor
The unit of sensor.lynwood_home_assitant_precipitation (mm/h) can not be converted to the unit of previously compiled statistics (mm). Generation of long term statistics will be suppressed unless the unit changes back to mm or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2:31:15 PM – (WARNING) Sensor
Could not contact https://homegraph.googleapis.com/v1/devices:requestSync
2:31:15 PM – (ERROR) Google Assistant
Updating braviatv_psk media_player took longer than the scheduled update interval 0:00:10
2:31:15 PM – (WARNING) Media player
Setup of vacuum platform xiaomi_miot is taking over 10 seconds.
2:30:59 PM – (WARNING) Vacuum
Failed to determine cast type for host <unknown> (<urlopen error EOF occurred in violation of protocol (_ssl.c:997)>) (services:{ServiceInfo(type='mdns', data='BRAVIA-4K-GB-41666165c123d8167c8ccbfbf16c5228._googlecast._tcp.local.')})
2:30:57 PM – (WARNING) components/cast/helpers.py
Lovelace is running in storage mode. Define resources via user interface

Not sure if this is what you are looking for

cherryocola avatar Feb 09 '23 12:02 cherryocola

Any news ? I can confirm no raw map file are created. With other vacuum a file like "map_data_roborock.vacuum.m1s.gz" is created. With zhimi.vacuum.wa1 nothing. Nothing interesting in logfile too. Only : "Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05". I would be happy to help if I can with a more verbose version of map extractor.

Cook23 avatar Feb 19 '24 08:02 Cook23

@cherryocola @Cook23

I don't think this is the true way, but so far I've found such a solution zhimi.vacuum.wa1 has another url to get the map, so I add _pro for this model, and it works

You need to edit the file /homeassistant/custom_components/xiaomi_cloud_map_extractor/common/vacuum_v2.py as follows

from typing import Optional

from custom_components.xiaomi_cloud_map_extractor.common.vacuum import XiaomiCloudVacuum
from custom_components.xiaomi_cloud_map_extractor.common.xiaomi_cloud_connector import XiaomiCloudConnector

class XiaomiCloudVacuumV2(XiaomiCloudVacuum):

    def __init__(self, connector: XiaomiCloudConnector, country: str, user_id: str, device_id: str, model: str):
        super().__init__(connector, country, user_id, device_id, model)

    def get_map_url(self, map_name: str) -> Optional[str]:
        url = self._connector.get_api_url(self._country) + '/v2/home/get_interim_file_url'
        if self.model == 'zhimi.vacuum.wa1':
            url += '_pro'
        params = {
            "data": f'{{"obj_name":"{self._user_id}/{self._device_id}/{map_name}"}}'
        }
        api_response = self._connector.execute_api_call_encrypted(url, params)
        if api_response is None or "result" not in api_response or "url" not in api_response["result"]:
            return None
        return api_response["result"]["url"]

    def should_get_map_from_vacuum(self) -> bool:
        return False

or just add this after url = ...

      if self.model == 'zhimi.vacuum.wa1':
            url += '_pro'

FieryBeard avatar Apr 15 '24 10:04 FieryBeard

@FieryBeard

add _pro for this model, and it works

if self.model == 'zhimi.vacuum.wa1': url += '_pro'

Thanks a lot. Works nicely.

Cook23 avatar Apr 16 '24 11:04 Cook23