Giter VIP home page Giter VIP logo

xiaomi_vacuum's People

Contributors

alexbelgium avatar davidconnack avatar harisma-git avatar htmltiger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xiaomi_vacuum's Issues

Zone cleaning status

Hi. I start zone cleaning and the status of the vacuum cleaner goes to idle. How to make the status change to cleaning during zonal cleaning? Thank you

Dreame D9

Hi there, is there any chance to get this working with the Dreame D9 vaccum?

Integration warning

Hello, I get the following warning in the logs after each reboot.

Logger: homeassistant.helpers.service
Source: helpers/service.py:405
First occurred: 22:02:54 (1 occurrences)
Last logged: 22:02:54

Unable to find services.yaml for the xiaomi_vacuum integration

vacum

Xiaomi 1C not working after last HA update

After the last update, the vacuum showed some errors on the Home Assistant LOG, and the status of the device is all NULL.
I double-checked the token and the IP address.

This is the error the LOG shows:

This error originated from a custom integration.

Logger: custom_components.xiaomi_vacuum.miio.device
Source: custom_components/xiaomi_vacuum/miio/device.py:218
Integration: Xiaomi Vacuum (documentation)
First occurred: 2:14:24 PM (6 occurrences)
Last logged: 2:15:04 PM

Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 3}, {'did': 'timer', 'siid': 18, 'piid': 2}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]
Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'water_level', 'siid': 18, 'piid': 20}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}]
Unable to request properties [{'did': 'audio_volume', 'siid': 24, 'piid': 1}, {'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}]

Connection with robot randomly drops

Hi, I am very happy with your custom component. What I notice is random errors in "core" log file :

2021-09-14 03:15:13 ERROR (SyncWorker_10) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 3}, {'did': 'timer', 'siid': 18, 'piid': 2}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]
2021-09-14 03:15:17 ERROR (SyncWorker_10) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'water_level', 'siid': 18, 'piid': 20}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}]
2021-09-14 03:15:19 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.vacuum_cleaner is taking over 10 seconds
2021-09-14 03:15:21 ERROR (SyncWorker_10) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'audio_volume', 'siid': 24, 'piid': 1}, {'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}]
2021-09-14 03:15:33 ERROR (SyncWorker_49) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 3}, {'did': 'timer', 'siid': 18, 'piid': 2}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]
2021-09-14 03:15:37 ERROR (SyncWorker_49) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'water_level', 'siid': 18, 'piid': 20}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}]
2021-09-14 07:46:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.vacuum_cleaner is taking over 10 seconds
2021-09-14 07:55:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.vacuum_cleaner is taking over 10 seconds
2021-09-14 07:59:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.vacuum_cleaner is taking over 10 seconds
2021-09-14 07:59:41 ERROR (SyncWorker_53) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 192.168.1.2
2021-09-14 07:59:41 ERROR (SyncWorker_53) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'water_level', 'siid': 18, 'piid': 20}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}]
2021-09-14 07:59:46 ERROR (SyncWorker_53) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 192.168.1.2
2021-09-14 07:59:46 ERROR (SyncWorker_53) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'audio_volume', 'siid': 24, 'piid': 1}, {'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}]
2021-09-14 08:11:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.vacuum_cleaner is taking over 10 seconds
2021-09-14 08:11:40 ERROR (SyncWorker_51) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 192.168.1.2
2021-09-14 08:11:40 ERROR (SyncWorker_51) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 3}, {'did': 'timer', 'siid': 18, 'piid': 2}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]
2021-09-14 08:11:45 ERROR (SyncWorker_51) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 192.168.1.2
2021-09-14 08:11:45 ERROR (SyncWorker_51) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'water_level', 'siid': 18, 'piid': 20}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}]

Anything to do maybe?

thanks

No 'version' key in the manifest file

Hey, I was trying to integrate into Homeassistant and got this error. Is there a way to fix it on my side maybe? Thanks

WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'xiaomi_vacuum'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'xiaomi_vacuum'
ERROR (MainThread) [homeassistant.components.homeassistant] Platform error vacuum.xiaomi_vacuum - No module named 'miio'

Errors in log

Integration work is fine, but i have errors in log:
My settings:

vacuum:
- platform: xiaomi_vacuum
  host: 192.168.1.105
  token: "34id_of_vacuum1"
  name: Shnir

Log:


2021-02-22 20:03:52 ERROR (SyncWorker_5) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 192.168.1.105
2021-02-22 20:03:52 ERROR (SyncWorker_5) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}, {'did': 'audio_volume', 'siid': 24, 'piid': 1}]
2021-02-22 20:03:57 ERROR (SyncWorker_5) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 192.168.1.105
2021-02-22 20:03:57 ERROR (SyncWorker_5) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}]
2021-02-22 20:03:57 ERROR (MainThread) [homeassistant.helpers.entity] Update for vacuum.shnir fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 482, in async_device_update
    await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_vacuum/vacuum.py", line 253, in update
    state = self._vacuum.status()
  File "/config/custom_components/xiaomi_vacuum/miio/dreamevacuum.py", line 259, in status
    return self.get_properties_for_dataclass(DreameStatus)
  File "/config/custom_components/xiaomi_vacuum/miio/miot_device.py", line 63, in get_properties_for_dataclass
    response = {
  File "/config/custom_components/xiaomi_vacuum/miio/miot_device.py", line 64, in <dictcomp>
    prop["did"]: prop["value"] if prop["code"] == 0 else None
TypeError: list indices must be integers or slices, not str

How i can fix it?

Not compliant with HACS

Adding the repository as custom repository to HACS throws the following error message.

Repostitory structure for master is not compliant.

Home Assistant: 0.112.2
HACS: 1.1.2

Great job...finally...but many errors in the log

Hi, congratulations. Finally a partial integration in HA. However, there are many errors in the registry. Here are a few.

Logger: custom_components.xiaomi_vacuum.miio.device
Source: custom_components/xiaomi_vacuum/miio/device.py:218
Integration: Xiaomi Vacuum
First occurred: 23 giugno 2020, 21:01:02 (931 occurrences)
Last logged: 10:10:57

Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 4}, {'did': 'timer', 'siid': 18, 'piid': 5}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]
Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}, {'did': 'audio_volume', 'siid': 24, 'piid': 1}]
Unable to request properties [{'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}]

Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_vacuum/miio/miot_device.py:65
First occurred: 23 giugno 2020, 21:01:02 (623 occurrences)
Last logged: 10:11:02

Update for vacuum.cincin fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/xiaomi_vacuum/vacuum.py", line 253, in update
state = self._vacuum.status()
File "/config/custom_components/xiaomi_vacuum/miio/dreamevacuum.py", line 259, in status
return self.get_properties_for_dataclass(DreameStatus)
File "/config/custom_components/xiaomi_vacuum/miio/miot_device.py", line 66, in get_properties_for_dataclass
property_mapping, max_properties=cls._max_properties
File "/config/custom_components/xiaomi_vacuum/miio/miot_device.py", line 65, in
for prop in self.get_properties_for_mapping(
TypeError: list indices must be integers or slices, not str

[Solved with firmware update to 3.5.8_1096] - Issue on migration or new version

Hi,

I recently had to move all my configuration to a new microSD cuz an error on my las raspberry config. When i restored the bakcup and set the environment i detect this issue and the system dont add the vacuum to the devices on the hass.

My configuration:

#Hacs xiaomi vacumm
vacuum:
  - platform: xiaomi_vacuum
    host: 192.168.0.1XX
    token: "the token info"
    name: Robotina

System Health

version 2021.1.5
installation_type Home Assistant Supervised
dev false
hassio true
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 5.4.83-v7+
arch armv7l
timezone America/Bogota
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4901
Installed Version 1.10.1
Stage running
Available Repositories 710
Installed Repositories 8
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Hass.io
host_os Raspbian GNU/Linux 10 (buster)
update_channel stable
supervisor_version 2021.01.7
docker_version 20.10.2
disk_total 14.0 GB
disk_used 5.3 GB
healthy true
supported failed to load: Unsupported
supervisor_api ok
version_api ok
installed_addons File editor (5.2.0), Bitwarden RS (0.7.0), Duck DNS (1.12.4), NGINX Home Assistant SSL proxy (3.0.1), Nginx Proxy Manager (0.8.2), MariaDB (2.2.1), SQLite Web (2.3.2), Home Assistant Google Drive Backup (0.103.1), MQTT Server & Web client (1.2.0)
Lovelace
dashboards 1
mode storage
views 8
resources 3
Spotify
api_endpoint_reachable ok

I attach the log errors.

Logger: custom_components.xiaomi_vacuum.miio.device
Source: custom_components/xiaomi_vacuum/miio/device.py:218
Integration: Xiaomi Vacuum
First occurred: 10:38:07 AM (3 occurrences)
Last logged: 10:38:17 AM

Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 3}, {'did': 'timer', 'siid': 18, 'piid': 2}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]
Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}, {'did': 'audio_volume', 'siid': 24, 'piid': 1}]
Unable to request properties [{'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}]
Logger: homeassistant.components.vacuum
Source: custom_components/xiaomi_vacuum/miio/miot_device.py:64
Integration: Vacuum (documentation, issues)
First occurred: 10:38:17 AM (1 occurrences)
Last logged: 10:38:17 AM

xiaomi_vacuum: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
    await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_vacuum/vacuum.py", line 322, in update
    state = self._vacuum.status()
  File "/config/custom_components/xiaomi_vacuum/miio/dreamevacuum.py", line 260, in status
    return self.get_properties_for_dataclass(DreameStatus)
  File "/config/custom_components/xiaomi_vacuum/miio/miot_device.py", line 63, in get_properties_for_dataclass
    response = {
  File "/config/custom_components/xiaomi_vacuum/miio/miot_device.py", line 64, in <dictcomp>
    prop["did"]: prop["value"] if prop["code"] == 0 else None
TypeError: list indices must be integers or slices, not str

License

What's the license for code of this custom integration?
I'd like to use parts of this code for python-miio which is licensed under GPL

Error in Connection

You can never connect to the robot, the error always comes up and does not connect

2021-10-08 20:54:20 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.robot_cosito is taking over 10 seconds 2021-10-08 20:54:20 ERROR (SyncWorker_4) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 10.20.30.86 2021-10-08 20:54:20 ERROR (SyncWorker_4) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'last_clean', 'siid': 18, 'piid': 13}, {'did': 'total_clean_count', 'siid': 18, 'piid': 14}, {'did': 'total_area', 'siid': 18, 'piid': 15}, {'did': 'total_log_start', 'siid': 18, 'piid': 16}, {'did': 'button_led', 'siid': 18, 'piid': 17}, {'did': 'clean_success', 'siid': 18, 'piid': 18}, {'did': 'water_level', 'siid': 18, 'piid': 20}, {'did': 'life_sieve', 'siid': 19, 'piid': 1}, {'did': 'life_brush_side', 'siid': 19, 'piid': 2}, {'did': 'life_brush_main', 'siid': 19, 'piid': 3}, {'did': 'dnd_enabled', 'siid': 20, 'piid': 1}, {'did': 'dnd_start_time', 'siid': 20, 'piid': 2}, {'did': 'dnd_stop_time', 'siid': 20, 'piid': 3}, {'did': 'map_view', 'siid': 23, 'piid': 1}] 2021-10-08 20:54:25 ERROR (SyncWorker_4) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 10.20.30.86 2021-10-08 20:54:25 ERROR (SyncWorker_4) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'audio_volume', 'siid': 24, 'piid': 1}, {'did': 'audio_language', 'siid': 24, 'piid': 3}, {'did': 'timezone', 'siid': 25, 'piid': 1}] 2021-10-08 20:54:35 ERROR (SyncWorker_7) [custom_components.xiaomi_vacuum.miio.miioprotocol] Unable to discover a device at address 10.20.30.86 2021-10-08 20:54:35 ERROR (SyncWorker_7) [custom_components.xiaomi_vacuum.miio.device] Unable to request properties [{'did': 'battery', 'siid': 2, 'piid': 1}, {'did': 'state', 'siid': 2, 'piid': 2}, {'did': 'error', 'siid': 3, 'piid': 1}, {'did': 'status', 'siid': 3, 'piid': 2}, {'did': 'brush_left_time', 'siid': 26, 'piid': 1}, {'did': 'brush_life_level', 'siid': 26, 'piid': 2}, {'did': 'filter_life_level', 'siid': 27, 'piid': 1}, {'did': 'filter_left_time', 'siid': 27, 'piid': 2}, {'did': 'brush_left_time2', 'siid': 28, 'piid': 1}, {'did': 'brush_life_level2', 'siid': 28, 'piid': 2}, {'did': 'operating_mode', 'siid': 18, 'piid': 1}, {'did': 'area', 'siid': 18, 'piid': 3}, {'did': 'timer', 'siid': 18, 'piid': 2}, {'did': 'fan_speed', 'siid': 18, 'piid': 6}]

No 'version' key in the manifest file for custom integration 'xiaomi_vacuum'

After upgrading to HA Core 2021.3.0, this error shows up in logs:
No 'version' key in the manifest file for custom integration 'xiaomi_vacuum'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'xiaomi_vacuum'

xiaomi_vacuum integration installed through HACS

No longer works with D9

The robot constantly shows as cleaning even when it's docked. The Robot also doesn't respond to requests nor is the data from the robot visible.

Dreame f9 / essential

Hi, just a question, will this also work for the dreame f9 or the xiaomi mi essential?

I believe its a different model then the C1

Feature Request: Water Level Settings

Hi,

Just like the fan speed, is it possible to add water level settings?

"siid":18
"piid":20
"value": [1/2/3]

Thanks.

LOW
2021-03-19 21:43:10 -> {"id":1428,"method":"set_properties","params":[{"did":"332951724","siid":18,"piid":20,"value":1}]}
2021-03-19 21:43:10 <- {"code":0,"message":"ok","result":[{"siid":18,"did":"332951724","piid":20,"code":0}],"id":1428}
2021-03-19 21:43:10 -> {"id":1429,"method":"get_properties","params":[{"did":"332951724","siid":18,"piid":6},{"did":"332951724","siid":18,"piid":20}]}
2021-03-19 21:43:10 <- {"code":0,"message":"ok","result":[{"siid":18,"did":"332951724","piid":6,"value":1,"code":0},{"siid":18,"did":"332951724","piid":20,"value":1,"code":0}],"id":1429}

MEDIUM
2021-03-19 21:43:15 -> {"id":1430,"method":"set_properties","params":[{"did":"332951724","siid":18,"piid":20,"value":2}]}
2021-03-19 21:43:15 <- {"code":0,"message":"ok","result":[{"siid":18,"did":"332951724","piid":20,"code":0}],"id":1430}
2021-03-19 21:43:15 -> {"id":1432,"method":"get_properties","params":[{"did":"332951724","siid":18,"piid":6},{"did":"332951724","siid":18,"piid":20}]}
2021-03-19 21:43:15 <- {"code":0,"message":"ok","result":[{"siid":18,"did":"332951724","piid":6,"value":1,"code":0},{"siid":18,"did":"332951724","piid":20,"value":2,"code":0}],"id":1432}

HIGH
2021-03-19 21:43:18 -> {"id":1433,"method":"set_properties","params":[{"did":"332951724","siid":18,"piid":20,"value":3}]}
2021-03-19 21:43:18 <- {"code":0,"message":"ok","result":[{"siid":18,"did":"332951724","piid":20,"code":0}],"id":1433}
2021-03-19 21:43:18 -> {"id":1434,"method":"get_properties","params":[{"did":"332951724","siid":18,"piid":6},{"did":"332951724","siid":18,"piid":20}]}
2021-03-19 21:43:18 <- {"code":0,"message":"ok","result":[{"siid":18,"did":"332951724","piid":6,"value":1,"code":0},{"siid":18,"did":"332951724","piid":20,"value":3,"code":0}],"id":1434}

zone cleaning error

2021-06-17 09:20:45 INFO (MainThread) [homeassistant.components.script.clean_bathroom_room] Vacuum Bathroom room: Running script sequence 2021-06-17 09:20:45 INFO (MainThread) [homeassistant.components.script.clean_bathroom_room] Vacuum Bathroom room: Executing step call service 2021-06-17 09:20:45 ERROR (MainThread) [homeassistant.components.script.clean_bathroom_room] Vacuum Bathroom room: Error executing script. Unexpected error for call_service at pos 1: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 368, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 568, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 760, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py", line 252, in async_send_command await self.hass.async_add_executor_job( File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py", line 245, in send_command raise NotImplementedError() NotImplementedError

i use

sequence: - service: vacuum.send_command data_template: entity_id: vacuum.robot command: app_zoned_clean params: [[-4101,2816,-1483,4721,1]]

Status of error message

Is it possible to get the error message when the vacuum get stuck or stops?

I can see that it is in the dreamevacuum.py but is there any way it can be added to the status error?

Thanks

class Error(Enum):
    NoError = 0
    Drop = 1
    Cliff = 2
    Bumper = 3
    Gesture = 4
    Bumper_repeat = 5
    Drop_repeat = 6
    Optical_flow = 7
    No_box = 8
    No_tankbox = 9
    Waterbox_empty = 10
    ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.