Tasshack / dreame-vacuum

Home Assistant integration for Dreame robot vacuums with map support
https://community.home-assistant.io/t/custom-component-dreame-vacuum
MIT License
784 stars 94 forks source link

p2114o issues #7

Closed jeongsik-kim closed 1 year ago

jeongsik-kim commented 1 year ago

Thank you for developing the dream vacuum

bug 1.Cleaning mode does not have sweep mode. 2.Request map data from cloud failed

Screenshots 1.image

2.image

Additional Information (please complete the following information)

Tasshack commented 1 year ago

About the first issue: Can you confirm that app allows you to select cleaning mode as sweeping while the mop pads are attached? L10/Z10 and also W10 does not allow you to only sweep when water tank or mop pad is attached because of that integration does add sweeping to the select entity options. You can try it by removing the mop pads from your device.

About the second issue: Can you switch to the testing branch and send me the full log of HA so i can get more information about the error?

You may need to set the log verbosity to info from configuration.yaml

logger:
  default: warn
  logs:
    custom_components.dreame_vacuum: info
Tasshack commented 1 year ago

Seems like similar problem with the same device exists on map extractor too.

https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues/316

jeongsik-kim commented 1 year ago

In the mihome app, can use sweeping mode while the mop pads attached When I removed the mop pad, the sweep option came alive Can't I use it if it's installed?

Tasshack commented 1 year ago

I can add exception for devices that can sweep while mop pad is attached but i need to differentiate those devices first. Is it possible to you to install your device using Xiaomi Miot Auto and send me the list of complete vacuum entitiy attributes? After that you can delete Xiaomi Miot.

attrs

jeongsik-kim commented 1 year ago

2022-10-16 18:00:42.284 INFO (Thread-7) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:00:42.442 INFO (Thread-7) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910841869}] 2022-10-16 18:00:42.528 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 10:0 took: 1.95 at scale 4 2022-10-16 18:00:42.809 WARNING (Thread-7) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912642000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=W0xEpLRpKoPFwbcS36jB4bfgISo= 2022-10-16 18:00:43.860 WARNING (MainThread) [homeassistant.components.number] custom_components.xiaomi_miot.number::MiotNumberSubEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author. 2022-10-16 18:00:43.866 WARNING (MainThread) [homeassistant.components.number] custom_components.xiaomi_miot.number::MiotNumberActionSubEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author. 2022-10-16 18:00:47.953 INFO (Thread-9) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:00:47.994 INFO (Thread-9) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910847548}] 2022-10-16 18:00:49.927 WARNING (Thread-9) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912649000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=J//exV3d0YFvLgSvDbfrb56/pEE= 2022-10-16 18:00:54.912 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform scrape is taking over 10 seconds. 2022-10-16 18:00:54.937 INFO (Thread-17) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:00:54.965 INFO (Thread-17) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910854522}] 2022-10-16 18:00:55.018 ERROR (MainThread) [homeassistant.components.rest.data] Timeout while fetching data: https://m.map.kakao.com/actions/busStationInfo?busStopId=BS461784 2022-10-16 18:01:02.990 INFO (Thread-20) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:03.022 INFO (Thread-20) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910862581}] 2022-10-16 18:01:08.962 WARNING (Thread-20) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912668000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=5CxrhIR+wlkjONugwrh79OVTp70= 2022-10-16 18:01:13.965 INFO (Thread-23) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:13.988 INFO (Thread-23) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910873549}] 2022-10-16 18:01:14.254 WARNING (Thread-23) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912674000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=7gaaFuFhXD/JBbnC8gQSCu1qBCM= 2022-10-16 18:01:19.257 INFO (Thread-25) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:19.422 INFO (Thread-25) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910878849}] 2022-10-16 18:01:19.685 WARNING (Thread-25) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912679000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=PmQXv0NX9A7JP8LSFrHHMUhLj4w= 2022-10-16 18:01:24.687 INFO (Thread-27) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:24.714 INFO (Thread-27) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910884274}] 2022-10-16 18:01:25.109 WARNING (Thread-27) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912684000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=CO/AMbqAxHRYYX6/ku8GYXHyLMU= 2022-10-16 18:01:30.112 INFO (Thread-29) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:30.138 INFO (Thread-29) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910889695}] 2022-10-16 18:01:30.397 WARNING (Thread-29) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912690000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=ntlEBfPy0AIs9YuliiL8OWO4mVA= 2022-10-16 18:01:35.400 INFO (Thread-31) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:35.570 INFO (Thread-31) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910894997}] 2022-10-16 18:01:35.827 WARNING (Thread-31) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912695000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=78S/3dtBxSREeg7l0y64Th3zEdc= 2022-10-16 18:01:40.830 INFO (Thread-34) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:40.863 INFO (Thread-34) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910900424}] 2022-10-16 18:01:41.130 WARNING (Thread-34) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912700000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=w3VdFc4/79PQOTO3vJrcErSpaGs= 2022-10-16 18:01:46.133 INFO (Thread-36) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-16 18:01:46.160 INFO (Thread-36) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665910905715}] 2022-10-16 18:01:46.421 WARNING (Thread-36) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/1653707108/1034063228/1,f4LEmacnepfZGvaF?Expires=1665912706000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=WLwdctc65sFOmwT8+HwkUF7W5kA=

jeongsik-kim commented 1 year ago

image

Tasshack commented 1 year ago

I think your device stores map data encrypted thats why map extractor is not working and received object name is formatted like 1653707108/1034063228/1,f4LEmacnepfZGvaF instead of just 1653707108/1034063228/1. f4LEmacnepfZGvaF is the key for decrypting the map data but i did not know which encryption method is used. Is there a possibility to share your device with my Mi Home account so that i can download the mi home plugin to my phone for extracting its source code to understand the encryption method? I need the device access for a very short period, just to download the plugin.

jeongsik-kim commented 1 year ago

Okay. What should I do? Should I register my vacuum cleaner on your account?

Tasshack commented 1 year ago

image

Can you send me the bottom of the list too?

Tasshack commented 1 year ago

Okay. What should I do? Should I register my vacuum cleaner on your account?

There is a share option on the profile page. Which server region are you using right now? I will open a new account on your region and send you the mi account id.

jeongsik-kim commented 1 year ago

image

jeongsik-kim commented 1 year ago

Okay. What should I do? Should I register my vacuum cleaner on your account?

There is a share option on the profile page. Which server region are you using right now? I will open a new account on your region and send you the mi account id.

I live in Korea, but you have to open it with a Chinese account

Tasshack commented 1 year ago

You can share your device with my chineese account 1724225515 and thank you for your help.

Tasshack commented 1 year ago

@jeongsik-kim i got what i need you can remove the device access.

jeongsik-kim commented 1 year ago

@jeongsik-kim i got what i need you can remove the device access.

Thank you for your help.

Tasshack commented 1 year ago

I have made some changes and commited to the testing branch. Cleaning mode is fixed with this version but map issue is not yet. I need an actual map data to test my code so the new version will print out the map data to the HA log. Can you update your integration from testing and send me the log output so i can test map data decrypting with my code?

jeongsik-kim commented 1 year ago

There was an error updating to the test component

2022-10-17 00:33:52.346 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140296194396496] Disconnected: Did not receive auth message within 10 seconds 2022-10-17 00:34:14.739 INFO (MainThread) [custom_components.dreame_vacuum.dreame.device] Initializing with host 10.0.0.39 (token 386b3...) 2022-10-17 00:34:14.743 INFO (SyncWorker_1) [custom_components.dreame_vacuum.dreame.device] Logging in... 2022-10-17 00:34:17.273 INFO (SyncWorker_1) [custom_components.dreame_vacuum.dreame.device] Connecting to device 2022-10-17 00:34:17.601 ERROR (MainThread) [custom_components.dreame_vacuum] Update failed: Traceback (most recent call last): File "/config/custom_components/dreame_vacuum/coordinator.py", line 225, in _async_update_data await self.hass.async_add_executor_job(self.device.update) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/dreame_vacuum/dreame/device.py", line 883, in update self.connect_device() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 622, in connect_device self._request_properties() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 258, in _request_properties callback0 File "/config/custom_components/dreame_vacuum/dreame/device.py", line 346, in _water_tank_changed if not self.status.started and not self.status.sweeping_with_mop_pad_available: File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2627, in sweeping_with_mop_pad_available return bool(self.self_wash_base_available and self.get_property(DreameVacuumProperty.DUST_COLLECTION) is not None) AttributeError: 'DreameVacuumDeviceStatus' object has no attribute 'get_property'

2022-10-17 00:34:17.602 WARNING (MainThread) [homeassistant.config_entries] Config entry 'robo' for dreame_vacuum integration not ready yet: 'DreameVacuumDeviceStatus' object has no attribute 'get_property'; Retrying in background 2022-10-17 00:34:22.605 INFO (MainThread) [custom_components.dreame_vacuum.dreame.device] Initializing with host 10.0.0.39 (token 386b3...) 2022-10-17 00:34:22.608 INFO (SyncWorker_0) [custom_components.dreame_vacuum.dreame.device] Logging in... 2022-10-17 00:34:25.320 INFO (SyncWorker_0) [custom_components.dreame_vacuum.dreame.device] Connecting to device 2022-10-17 00:34:25.495 ERROR (MainThread) [custom_components.dreame_vacuum] Update failed: Traceback (most recent call last): File "/config/custom_components/dreame_vacuum/coordinator.py", line 225, in _async_update_data await self.hass.async_add_executor_job(self.device.update) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/dreame_vacuum/dreame/device.py", line 883, in update self.connect_device() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 622, in connect_device self._request_properties() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 258, in _request_properties callback0 File "/config/custom_components/dreame_vacuum/dreame/device.py", line 346, in _water_tank_changed if not self.status.started and not self.status.sweeping_with_mop_pad_available: File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2627, in sweeping_with_mop_pad_available return bool(self.self_wash_base_available and self.get_property(DreameVacuumProperty.DUST_COLLECTION) is not None) AttributeError: 'DreameVacuumDeviceStatus' object has no attribute 'get_property'

Tasshack commented 1 year ago

I have made some fixes, can you update your integration again from testing and send me the log output? This time you should see the raw map data in log output.

jeongsik-kim commented 1 year ago
  1. I just updated the test and the cleaning mode is disabled

2022-10-17 14:34:18.795 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up dreame_vacuum platform for vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/dreame_vacuum/vacuum.py", line 403, in async_setup_entry async_add_entities([DreameVacuum(coordinator)]) File "/config/custom_components/dreame_vacuum/vacuum.py", line 417, in init self._set_attrs() File "/config/custom_components/dreame_vacuum/vacuum.py", line 448, in _set_attrs self._attr_extra_state_attributes = self.device.status.attributes File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2941, in attributes value = self.cleaning_modename.replace("", " ").capitalize() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2052, in cleaning_mode_name return CLEANING_MODE_CODE_TO_NAME.get(self.cleaning_mode, STATE_UNKNOWN) File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2035, in cleaning_mode if not self.status.sweeping_with_mop_pad_available: AttributeError: 'DreameVacuumStatus' object has no attribute 'sweeping_with_mop_pad_available'

  1. map data log:

2022-10-17 14:36:38.367 INFO (Thread-57) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}] 2022-10-17 14:36:38.392 INFO (Thread-57) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,f4LEmacnepfZGvaF'}, {'piid': 5, 'value': 1665984997467}] 2022-10-17 14:36:38.565 INFO (Thread-57) [custom_components.dreame_vacuum.dreame.map] Encrypted Map Data: CYYDxA4UhKf8jaMeJjuxwD05KhGdRFmg/hq629IG+kUHJSm9Leua/KoSI2XZv09Gka7kqjy+ZmIC6r3uCJ7fIbKlJRwQxPolG4C7WQZ511qLJv2fYdMeubm51WORKMbfcg5kyuLtvg/+97BZ5ez60XJ9k6Sa2g7wepDjB0CG+QP8E2J7b32e5QrPNC9s1rDdTNQbY39VtY6Ie9dn+ZTLdAD4sfOuzN7Ee+dYXJix0Bl26V9+DjTHfgK87ipEBcg+X9ceJe15jmxpNtYLlVe29dFrxwt0BNycEYd5EJPCli9X/4BRHzOn7Z2AppVPkSq3eMFORjY8tNPk3dWgpIegoob6a6CXjU+oSrsnM2EWTV2h1UFF8kcO5d84wV7gf0NLbcNxLXBGGSROKzFRs51bmIUx+Gh6JmbxTjJOfzK843njdsrobl08Tl7aW4iJIV/1o8yLWr3mQwkBvzqqbgLr2go3HqZ9fb9fz3grR+xl83969DssKeAKqQePj30esg4cpF3hJwH3EJArFm7BjfoNmEU1oueHbhcb4h5/4Z+ORfog2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xvD0QFs4uCtml2bEALf1IQo0kPGC0CWGY9hbmr5wnq9L7CbCNQHN3NeMGwFPQ0UWf67i7GnrQW4FW5Et4OX4tmFFAcqjg+R+IJX7QSXlMrkqZnpgqOjk7ngQMnLggryvZQEvIbfNvGkPUADp4WzHXBnUXZTRGCD8DR2JVvDDtvGas3bxp1Q5E9qxfyqU8DK5C9m+RnzcB61Ldc99Iu4J6Bc1PILIpkVATRvU6D4fiSlM5UYNI5rVpLlkvaAcsRwugd2mAIaD8yAUTQc+YG7sGkwfiJ5P7hD44vWd35xAmD942Bu2hTX1HhI/34jvkPKjlroGu2GcOKv4XICvDVy0T1UEJSrmn/jkjRx+bt4J/G3KFMzeFsuemQsdW+huB79X7COaXQW53r4r/E9sw/fE43Nc82NsC6mghY829es2744QYhWXzXMI3W2wwwebk5gX8EATzj6vsYKpHSIQFiGayKZmUnBfWregz6EMPg0BwB4MLA5yDb0UIzkaqlgPT5A+UabGVgjLgiQZyjBT57C1U1UTMZ6vU3zqYRgkA7+FRzPOx6jUzn4mbL0rJgMWPjs6Yf5sO/WNC+NMQln92m7gVCA=

f4LEmacnepfZGvaF

Tasshack commented 1 year ago

I fixed the cleaning mode issue but i cannot decode the map from log output string. I have added the map data url to the log, can you open the url from your log output and send me the downloaded file?

Example:

2022-10-17 10:29:57.871 INFO (SyncWorker_2) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1724225515/447428451/1'}, {'piid': 5, 'value': 1665991796995}]
2022-10-17 10:29:57.951 INFO (SyncWorker_2) [custom_components.dreame_vacuum.dreame.map] Request map data from cloud https://awsde0.fds.api.xiaomi.com/dreame-p2028/1724225515/447428451/1?Expires=1665993597000&GalaxyAccessKeyId=EAKN6TYP3O74S&Signature=k77qJY74+ajna6bKbpSoHrZCmR0=
jeongsik-kim commented 1 year ago

Oh Cleaning Mode sweep is enabled. Thank you. But there is a little problem The mopping and sweeping mode and the sweeping mode have been switched.

1.zip

Tasshack commented 1 year ago

I verified that sweeping and mopping and sweeping modes are swapped from the app and i fixed it. I also managed to decode and render the encrypted map data that you send me. Can you update the testing to latest version and check that the map is updating when the robot is moving?

Tasshack commented 1 year ago

Your custom room names cannot be rendered on map right now because korean characters not exists on the embedded font file. I will fix this later.

jeongsik-kim commented 1 year ago

Integration components are not working

log:

2022-10-17 23:16:08.122 INFO (SyncWorker_2) [custom_components.dreame_vacuum.dreame.device] Logging in... 
2022-10-17 23:16:09.573 INFO (SyncWorker_2) [custom_components.dreame_vacuum.dreame.device] Connecting to device
2022-10-17 23:16:09.859 ERROR (MainThread) [custom_components.dreame_vacuum] Update failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 225, in _async_update_data
    await self.hass.async_add_executor_job(self.device.update)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 883, in update
    self.connect_device()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 622, in connect_device
    self._request_properties()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 258, in _request_properties
    callback[0](callback[1])
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 346, in _water_tank_changed
    if not self.status.started and not self.status.sweeping_with_mop_pad_available:
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2637, in sweeping_with_mop_pad_available
    return bool(self.self_wash_base_available and self.get_property(DreameVacuumProperty.DUST_COLLECTION) is not None)
AttributeError: 'DreameVacuumDeviceStatus' object has no attribute 'get_property'
Tasshack commented 1 year ago

Can you update and test again, this time map should be working.

jeongsik-kim commented 1 year ago

Oh, finally, the map is working. You're amazing Thank you very much. Could you revise one more thing? The start drying button does not work. image image

log:

2022-10-17 23:41:17.020 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140117730163296] 'DreameVacuumDevice' object has no attribute 'start_drying'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 116, in _async_press_action
    await self.async_press()
  File "/config/custom_components/dreame_vacuum/button.py", line 204, in async_press
    await self._try_command(
  File "/config/custom_components/dreame_vacuum/entity.py", line 115, in _try_command
    await self.hass.async_add_executor_job(partial(func, *args, **kwargs))
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/button.py", line 148, in <lambda>
    action_fn=lambda device: device.start_drying(),
AttributeError: 'DreameVacuumDevice' object has no attribute 'start_drying'
Tasshack commented 1 year ago

I fixed the start_drying and stop_drying button entities, they should be working now, you can update from the testing. If there are no bugs with your device i will close this issue and merge testing branch to master branch so you can get the latest available version from hacs. I will add the Korean and Chinese characters to the current font later.

jeongsik-kim commented 1 year ago

The start drying button is activated. The Stop Drying button is not active.

image

jeongsik-kim commented 1 year ago

Is this log okay?

2022-10-18 00:16:34.766 WARNING (Thread-433) [custom_components.dreame_vacuum.dreame.map] Map update Failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 939, in update
    if not self._request_map_from_cloud():
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 191, in _request_map_from_cloud
    raise DeviceUpdateFailedException(
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: get_device_property failed

2022-10-18 00:16:34.772 ERROR (Thread-433) [custom_components.dreame_vacuum] Error requesting dreame_vacuum data: get_device_property failed
2022-10-18 00:17:07.134 INFO (Thread-438) [custom_components.dreame_vacuum.dreame.map] Update callback
2022-10-18 00:18:39.717 WARNING (Thread-455) [custom_components.dreame_vacuum.dreame.map] Map update Failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 939, in update
    if not self._request_map_from_cloud():
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 191, in _request_map_from_cloud
    raise DeviceUpdateFailedException(
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: get_device_property failed

2022-10-18 00:18:39.719 ERROR (Thread-455) [custom_components.dreame_vacuum] Error requesting dreame_vacuum data: get_device_property failed
2022-10-18 00:19:03.712 INFO (Thread-460) [custom_components.dreame_vacuum.dreame.map] Update callback
Tasshack commented 1 year ago

The start drying button is activated. The Stop Drying button is not active.

Stop drying button is only active when drying is active.

Is this log okay?

I will try to understand the reason of these logs.

jeongsik-kim commented 1 year ago

The start drying button is activated. The Stop Drying button is not active.

Stop drying button is only active when drying is active.

Is this log okay?

I will try to understand the reason of these logs.

Yes, I started drying, but I can't stop drying.

image image

jeongsik-kim commented 1 year ago

i'm trying to set up automation vacuum but dreame vacuum select first service dose not working

log:

TypeError: DreameVacuumSelectEntity.async_first() missing 1 required positional argument: 'cycle'
2022-10-18 12:59:33.935 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140588560395008] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 648, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 769, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 709, in _handle_entity_call
    result = hass.async_run_job(partial(getattr(entity, func), **data))  # type: ignore[arg-type]
  File "/usr/src/homeassistant/homeassistant/core.py", line 615, in async_run_job
    return self.async_run_hass_job(HassJob(target), *args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 570, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 473, in async_add_hass_job
    task = self.loop.create_task(hassjob.target(*args))
TypeError: DreameVacuumSelectEntity.async_first() missing 1 required positional argument: 'cycle'
2022-10-18 13:01:47.795 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: DreameVacuumSelectEntity.async_first() missing 1 required positional argument: 'cycle'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 769, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 709, in _handle_entity_call
    result = hass.async_run_job(partial(getattr(entity, func), **data))  # type: ignore[arg-type]
  File "/usr/src/homeassistant/homeassistant/core.py", line 615, in async_run_job
    return self.async_run_hass_job(HassJob(target), *args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 570, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 473, in async_add_hass_job
    task = self.loop.create_task(hassjob.target(*args))
Tasshack commented 1 year ago

Did you disable the Xiaomi Miot Auto integration? It will create conflicts with this integration and causes errors like get_device_property failed.

Tasshack commented 1 year ago

I also noticed that the robot icon is not rendering at correct position while vacuum is docked, i will fix that too.

jeongsik-kim commented 1 year ago

I removed the robot cleaner from the miot, but I am using a different device. Is there a conflict?

Tasshack commented 1 year ago

There should not be any conflict if you are using it for different device but you can temporarly disable it to make sure of and check the logs for possible errors or warnings.

jeongsik-kim commented 1 year ago

Sometimes an error appears, but there is no problem Stop drying, select first works well I think it's working perfectly now Thank you very much

2022-10-18 14:51:37.651 ERROR (Thread-150) [custom_components.dreame_vacuum.dreame.protocol] Execute api call failed: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-10-18 14:51:37.659 WARNING (Thread-150) [custom_components.dreame_vacuum.dreame.map] Map update Failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 938, in update
    if not self._request_map_from_cloud():
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 198, in _request_map_from_cloud
    raise DeviceUpdateFailedException(
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: get_device_property failed
Tasshack commented 1 year ago

Sometimes an error appears, but there is no problem Stop drying, select first works well I think it's working perfectly now Thank you very much

2022-10-18 14:51:37.651 ERROR (Thread-150) [custom_components.dreame_vacuum.dreame.protocol] Execute api call failed: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-10-18 14:51:37.659 WARNING (Thread-150) [custom_components.dreame_vacuum.dreame.map] Map update Failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 938, in update
    if not self._request_map_from_cloud():
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 198, in _request_map_from_cloud
    raise DeviceUpdateFailedException(
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: get_device_property failed

I have added additional logs for understating the reason why api request is failed. Can you send me log with the new version when it happens again?

jeongsik-kim commented 1 year ago

Of course, I just updated it.

2022-10-18 15:31:12.079 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.device] Logging in...
2022-10-18 15:31:14.136 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.device] Connecting to device
2022-10-18 15:31:14.555 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.map] Get Map List: 1653707108/1034063228/9
2022-10-18 15:31:16.069 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-10-18 15:31:16.230 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,MBTJR8vAmKToIeKT'}, {'piid': 5, 'value': 1666074674815}]
2022-10-18 15:31:17.395 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.map] Decode I map 3 24
2022-10-18 15:31:17.397 INFO (SyncWorker_6) [custom_components.dreame_vacuum.dreame.device] Get Cleaning History
2022-10-18 15:31:22.590 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform scrape is taking over 10 seconds.
2022-10-18 15:31:22.595 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform scrape is taking over 10 seconds.
2022-10-18 15:31:22.597 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform scrape is taking over 10 seconds.
2022-10-18 15:31:22.602 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform scrape is taking over 10 seconds.
2022-10-18 15:31:22.603 WARNING (MainThread) [homeassistant.components.weather] Setup of weather platform naver_weather is taking over 10 seconds.
2022-10-18 15:31:23.174 WARNING (MainThread) [homeassistant.config_entries] Config entry 'MiBedsideLamp2-D31C' for homekit_controller integration not ready yet: Timeout while waiting for connection to device 10.0.0.25:80; Retrying in background
2022-10-18 15:31:25.613 INFO (MainThread) [custom_components.dreame_vacuum] Update map
2022-10-18 15:31:27.706 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 10:0 took: 1.95 at scale 4
2022-10-18 15:31:30.031 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 3:24 took: 2.04 at scale 4
2022-10-18 15:31:35.042 WARNING (MainThread) [homeassistant.components.number] custom_components.xiaomi_miot.number::MiotNumberSubEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author.
2022-10-18 15:31:35.068 WARNING (MainThread) [homeassistant.components.number] custom_components.xiaomi_miot.number::MiotNumberActionSubEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author.
2022-10-18 15:32:54.884 INFO (Thread-52) [custom_components.dreame_vacuum.dreame.device] STATUS Changed: 14 -> 6
2022-10-18 15:32:54.885 INFO (Thread-52) [custom_components.dreame_vacuum.dreame.device] AUTO_EMPTY_STATUS Changed: 0 -> 1
2022-10-18 15:32:57.874 INFO (MainThread) [custom_components.dreame_vacuum] Update map
2022-10-18 15:32:58.920 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 3:24 took: 1.04 at scale 4
2022-10-18 15:33:05.010 INFO (Thread-56) [custom_components.dreame_vacuum.dreame.device] AUTO_EMPTY_STATUS Changed: 1 -> 0
2022-10-18 15:33:18.460 ERROR (Thread-60) [custom_components.dreame_vacuum.dreame.protocol] Execute api call failed: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-10-18 15:33:18.467 WARNING (Thread-60) [custom_components.dreame_vacuum.dreame.map] Map update Failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 938, in update
    if not self._request_map_from_cloud():
  File "/config/custom_components/dreame_vacuum/dreame/map.py", line 198, in _request_map_from_cloud
    raise DeviceUpdateFailedException(
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: get_device_property failed

2022-10-18 15:33:18.468 ERROR (Thread-60) [custom_components.dreame_vacuum] Error requesting dreame_vacuum data: get_device_property failed
2022-10-18 15:33:24.502 INFO (Thread-62) [custom_components.dreame_vacuum.dreame.map] Update callback
2022-10-18 15:33:35.492 INFO (Thread-72) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-10-18 15:33:35.578 INFO (Thread-72) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/1,hcmZ3Jrzvm4yK8m7'}, {'piid': 5, 'value': 1666074814194}]
2022-10-18 15:33:36.678 INFO (Thread-72) [custom_components.dreame_vacuum.dreame.map] Decode I map 3 26
2022-10-18 15:33:36.679 INFO (Thread-72) [custom_components.dreame_vacuum.dreame.map] Update callback
2022-10-18 15:33:36.702 INFO (Thread-72) [custom_components.dreame_vacuum] Coordinator update: 26
2022-10-18 15:33:36.702 INFO (Thread-72) [custom_components.dreame_vacuum] Update map
2022-10-18 15:33:38.425 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 3:26 took: 1.71 at scale 4
Tasshack commented 1 year ago

Ok, i have checked the log and seems like request is timed out. I think this happens when Xiaomi Miot Auto and dreame_vacuum send api request at the same time. It is not an important issue and i removed the Map update failed error when api request is timed out instead it will output a warning. If everyting is working fine now i will merge the testing branch to master and close this issue.

jeongsik-kim commented 1 year ago

Thanks to you, I implemented an automation that allows me to clean the mopping after the sweep cleaning is completed.

Tasshack commented 1 year ago

And thanks to you, i have implemented map decryption support for other new Mijia robots too and couldn't do it without the map data you sent. I have released a new version for the integration and you should use this instead of testing branch to keep track of new features and fixes. I will fix the unicode room name rendering and add the AI obstacle detection settings for this device later.

jeongsik-kim commented 1 year ago

And thanks to you, i have implemented map decryption support for other new Mijia robots too and couldn't do it without the map data you sent. I have released a new version for the integration and you should use this instead of testing branch to keep track of new features and fixes. I will fix the unicode room name rendering and add the AI obstacle detection settings for this device later.

Thank you very much. May I ask one more question? The p2114o model is very similar to the dreame s10 model. Almost identical. Can you implement the features found on the s10 model station? In the case of the s10 model, after taking out the robot vacuum cleaner from the station, water can come out to clean the rail inside the station.

for example:

https://user-images.githubusercontent.com/61031808/196409780-2757d726-b958-42a9-a44b-21ec584ecf3c.mp4

Tasshack commented 1 year ago

I can only implement features that included from the app and i think i have implemented all available features except ai obstacle settings. I couldn't understand which feature are you referring from S10. Is the action from the video can be triggered from the app?

jeongsik-kim commented 1 year ago

It works as a station button. I asked just in case. The error log continues to occur in the new version. No need to worry?

2022-10-18 20:11:50.003 ERROR (Thread-379) [custom_components.dreame_vacuum.dreame.protocol] Execute api call failed: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=5)
2022-10-18 20:11:50.009 WARNING (Thread-379) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
Tasshack commented 1 year ago

It works as a station button. I asked just in case. The error log continues to occur in the new version. No need to worry?

There are too many hidden features with these devices which not implemented on the app but i cannot find them without having the actual device.

No need to worry?

I handled the error case, you don't need to worry about those logs anymore.

I have also added the Korean, Japanese and Chinese characters to the map font but i will release the new version later.