Closed PiotrMachowski closed 2 years ago
Following. Same issue here with map rotated 180 degrees
I have same issue but with my camera map - images generated from ValetudoRE
E
I already have a solution, it will be included in the next release.
@jacekpaszkowski what is your setup to make card work with valetudo?
My vacuum is connected via standard HA integration and also via Valetudo RE MQTT. I'm also able to read predefined zones from sensor using custom:config-template-card
Have to use both because of problems eg. with fan speed :(
Still work in progress, but most of all works okey
type: custom:config-template-card
variables:
zones: >-
states['sensor.rockrobo_valetudo_zones_processed'].attributes['predefined_selections']
entities:
- sensor.rockrobo_valetudo_zones_processed
- vacuum.xiaomi_vacuum_cleaner
- camera.rockrobo_map
- vacuum.rockrobo
card:
type: custom:xiaomi-vacuum-map-card
entity: vacuum.xiaomi_vacuum_cleaner
map_source:
camera: camera.rockrobo_map
language: pl
vacuum_platform: send_command
calibration_source:
calibration_points:
- vacuum:
x: 25210
'y': 19057
map:
x: 35
'y': 20
- vacuum:
x: 25210
'y': 27625
map:
x: 35
'y': 1035
- vacuum:
x: 35388
'y': 27625
map:
x: 1255
'y': 1035
map_modes:
- name: Pokoje
icon: mdi:floor-plan
selection_type: PREDEFINED_RECTANGLE
max_selections: 5
coordinates_rounding: true
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: pyscript.rockrobo_start_predefined_zone_cleaning
service_data:
coordinates: '[[selection]]'
repeats: '[[repeats]]'
vacuum: vacuum.rockrobo
predefined_selections: ${zones}
- name: Idź do punktu
icon: mdi:crosshairs-gps
selection_type: MANUAL_POINT
coordinates_rounding: true
service_call_schema:
service: pyscript.rockrobo_goto
service_data:
coordinates: '[[selection]]'
vacuum: '[[entity_id]]'
- template: vacuum_clean_zone
append_icons: true
icons:
- icon: mdi:home
tooltip: Sprzątanie całego mieszkania
tap_action:
service: input_select.select_option
service_data:
entity_id: input_select.vacuum_room
option: Wszystkie
- icon: mdi:delete-empty
tooltip: Podjedź do kosza
service: script.roborock_go_to_empty_bin
append_tiles: true
tiles:
- entity: vacuum.rockrobo
label: Filtr
attribute: filter
icon: mdi:air-filter
unit: h
- entity: vacuum.rockrobo
label: Sensor
attribute: sensor
icon: mdi:eye
unit: h
- entity: vacuum.rockrobo
label: Główna
attribute: mainBrush
icon: mdi:brush-variant
unit: h
- entity: vacuum.rockrobo
label: Boczna
attribute: mainBrush
icon: mdi:brush
unit: h
- entity: sensor.vacuum_hours_from_last_bin_out_time
label: Opróżnianie
icon: mdi:delete-empty
unit: h
- entity: sensor.vacuum_cleaned_area
label: Powierzchnia
unit: m²
- entity: sensor.vacuum_cleaning_time
label: Trwało
unit: m
- entity: sensor.vacuum_time_from_last_cleanup
label: Minęło
- entity: sensor.vacuum_time_to_next_automatic_cleanup
label: Następne
- entity: sensor.vacuum_area_cleaned_since_last_bin_emptying
label: Opróżniano
unit: m²
- entity: vacuum.rockrobo
label: Liczba sprzątań
attribute: cleanCount
icon: mdi:counter
@jacekpaszkowski I want to add Valetudo to supported platforms, can you show me what services does it use?
This issue should be fixed in v2.0.3 @geezer54 @Heisenberg2980 @jacekpaszkowski can you confirm it's working?
It works good for me now. Thank You!
I use ValetudoRE not original Valetudo. In HA it works as Mqtt Vacuum, here (https://github.com/rand256/valetudo/blob/testing/lib/MqttClient.js) you can find list of services, and custom send_comand
commands.
Unfortuantelly Mqtt it doesn't support "goto" and "zoned_cleanup" to given coordintes, only to named zones and spots defined in Valetudo settings.
So for "goto" and "zoned_cleanup" with coordinates from your map i have to use xiaomi_miio entity with "translated" coordinates
These are attributes of my mqtt vacuum:
fan_speed_list: min, medium, high, max, mop
battery_level: 94
battery_icon: mdi:battery-90
fan_speed: high
mainBrush: 102.0
sideBrush: 73.7
filter: 94.0
sensor: 0.7
currentCleanTime: 5.5
currentCleanArea: 4.0
cleanTime: 198.0
cleanArea: 10696.2
cleanCount: 384
last_run_stats:
startTime: 1637578888000
endTime: 1637579010000
duration: 121
area: '0.3'
errorCode: 0
errorDescription: No error
finishedFlag: true
bin_in_time: 124
last_bin_out: 1637247060620
last_bin_full: -1
last_loaded_map: null
valetudo_state:
id: 17
name: Zoned cleaning
friendly_name: Rosie
supported_features: 10236
Hello! Is it the same problem? My map rotated by 180 degrees and i can't select zone.
This issue should be fixed in v2.0.3 @geezer54 @Heisenberg2980 @jacekpaszkowski can you confirm it's working?
Updated to v2.0.3 and it is working now, thanks!!
@wowgamr I am pretty sure you have an old version of the card, update to v2.0.3 should fix it
Same issue on v2.0.3 :( There is an error in console:
I have no calibration points
camera:
- platform: xiaomi_cloud_map_extractor
host: host
token: token
username: username
password: password
country: "ru"
draw: ['all']
attributes:
- calibration_points
map_transformation:
rotate: 180
trim:
top: 25
bottom: 20
left: 15
right: 20
colors:
color_map_inside: [28, 28, 28, 0]
color_map_outside: [28, 28, 28, 0]
color_path: [28, 28, 28]
color_robo: [28, 28, 28]
- type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_s6_maxv
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- template: vacuum_clean_zone
- template: vacuum_clean_zone_predefined
tiles: []
@NikiHard oh, you seem to have a problem with your resources (xiaomi-vacuum-map-card
is added twice) + it says that you still use v2.0.2
@NikiHard ой, похоже, у вас проблема с вашими ресурсами (
xiaomi-vacuum-map-card
добавляется дважды) + там написано, что вы все еще используете v2.0.2
OK, thanks! How to define the boundaries of rooms?
@NikiHard Like that: documentation
Map rotate issues fixed for me!!! Thankyou!
I had the same version issue as NikiHard. After updating the cards in HACS, in configuration.yaml, I had to replace "- url: /local/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js" to "- url: /hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js"
@NikiHard does everything work now?
@NikiHard does everything work now?
Yes, thanks a lot
Discussed in https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/172