Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard
viomi v8
Checklist
- [X] I have updated the integration to the latest version available
- [X] I have checked if the problem is already reported
The problem
Hi! I have two identical viomi.vacuum.v8. First of them works fine, but second don't give any data from map cart extractor. How I can resolve the isue?
What version of am integration has described problem?
v2.2.0
What was the last working version of an integration?
No response
What vacuum model do you have problems with?
viomi.vacuum.v8
What version of Home Assistant do you use?
2022.5.5
What type of installation are you running?
Home Assistant OS
Camera's configuration
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.209.108
name: camera_in
token: !secret in_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
force_api: viomi
store_map_raw: false
store_map_image: true
store_map_path: "/config"
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
- obstacles_with_photo
- ignored_obstacles_with_photo
- path
- room_numbers
- rooms
- vacuum_position
- vacuum_room
- vacuum_room_name
- walls
- zones
scan_interval:
seconds: 10
auto_update: true
- platform: xiaomi_cloud_map_extractor
host: 192.168.209.110
name: camera_ian
token: !secret yan_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
force_api: viomi
store_map_raw: false
store_map_image: true
store_map_path: "/config"
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
- obstacles_with_photo
- ignored_obstacles_with_photo
- path
- room_numbers
- rooms
- vacuum_position
- vacuum_room
- vacuum_room_name
- walls
- zones
scan_interval:
seconds: 10
auto_update: true
Errors shown in the HA logs (if applicable)
Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/viomi/map_data_parser.py:204
Integration: xiaomi_cloud_map_extractor (documentation, issues)
First occurred: 09:00:11 (239 occurrences)
Last logged: 09:20:39
Update for camera.camera_ian fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 743, in async_device_update
raise exc
File "/usr/local/lib/python3.9/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 36, in get_map
map_data = self.decode_map(response, colors, drawables, texts, sizes, image_config)
File "/config/custom_components/xiaomi_cloud_map_extractor/viomi/vacuum.py", line 23, in decode_map
return MapDataParserViomi.parse(unzipped, colors, drawables, texts, sizes, image_config)
File "/config/custom_components/xiaomi_cloud_map_extractor/viomi/map_data_parser.py", line 62, in parse
map_data.zones = MapDataParserViomi.parse_cleaning_areas(buf)
File "/config/custom_components/xiaomi_cloud_map_extractor/viomi/map_data_parser.py", line 204, in parse_cleaning_areas
zones.append(Zone(p1.x, p1.y, p3.x, p3.y))
AttributeError: 'NoneType' object has no attribute 'x'
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:746
First occurred: 09:07:23 (2 occurrences)
Last logged: 09:08:38
Update of camera.camera_ian is taking over 10 seconds
Additional information
No response
It seems that this vacuum has a problematic data from a last cleaning. Full cleaning should fix this issue.
One more thing: your config puts unnecessary stress on your HA instance, I recommend to use following one:
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.209.108
name: camera_in
token: !secret in_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
force_api: viomi
attributes:
- calibration_points
scan_interval:
seconds: 10
- platform: xiaomi_cloud_map_extractor
host: 192.168.209.110
name: camera_ian
token: !secret yan_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
force_api: viomi
draw: ['all']
attributes:
- calibration_points
scan_interval:
seconds: 10
thanks, I will try.
thank you very much. Everything is ok.
Let's keep this open as this error should have been handled by the integration. I will close this issue when a proper solution will be merged in code