-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please support a image besides camera view #754
Comments
You can use image entity instead of camera entity by editing yaml configuration |
Can you show us how? |
i simply tried to change camera into image in the yaml of the lovelace card, but now it says its missing calibration source. |
Unfortunately at this moment official Roborock integration doesn't support calibration required for the map card |
Why so? If a still image works I would imagine that one generated automatically would as well 🤔 I would love to do something like that but it does not seem to work: map_source:
image: image.roborock_s8_pro_ultra_ground_floor |
You can try to manually calibrate the map from Roborock integration the same way you can calibrate the static image. It is not trivial though, so I prefer to not include it in the documentation. The config would be: map_source:
camera: image.roborock_s8_pro_ultra_ground_floor |
Maybe we can ask the Roborock integration guys to make an easily calibrated image. What would it take to make it easier? |
That's not so easy. Also he is aware of this problem and we have already discussed potential solutions: |
Is there a way to get the coordinates via the roborock custom integration, then switch back to the core integration and put the coordinates back into the card? |
@Legromorph potentially you can install the custom integration, copy "calibration points" from the map entity and use them to calibrate the map. Buuuut I don't know if this will work correctly - these maps might be a little bit different |
Surprisingly it worked. I just had to change them a bit but it was the same ratio for all points(both x and y coordinates were shifted with the same ratio). So this is a valid strategy. Now I can enjoy the best from both the integration and the fantastic card :D |
@Legromorph can you elaborate on how you achieved this? Some bullets and potentially a screenshot. I would be intersted in replicating the setup. |
I am afraid, that I cannot do it with screenshots for 2 weeks because I am on vacation.
calibration_coordinates:
- vacuum:
x: 25500
"y": 25500
map:
x: 180
"y": 84
- vacuum:
x: 35500
"y": 25500
map:
x: 380
"y": 84
- vacuum:
x: 25500
"y": 35500
map:
x: 180
"y": -116
Please tell me if something is not understandable. I am not that good in english, but I tried my best. |
@Legromorph waiting for some full yaml and maybe screenshot. Did it all, all contours and icons are in place, yet when I do specific room, Consuela starts to wander to another... 😂 |
thank you @Legromorph for clear manual, I managed to get right room coordinators to image instead of camera entity. Worse part is that I cant use homeassistant-roborock custom integration platform for room and zone cleaning because it says "command not found", original Roborock integration uses slightly different command according this page . I have to use |
I am sorry to answer that late. @drupry Yes, you have to change the vacuum_platform to "send_command" I wrote this in point 12 maybe not as clear as I should have. here my complete yaml: type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_qrevo_curv
vacuum_platform: send_command
title: ""
map_source:
camera: image.roborock_qrevo_curv_map
calibration_source:
calibration_points:
- vacuum:
x: 25500
"y": 25500
map:
x: 180
"y": 84
- vacuum:
x: 35500
"y": 25500
map:
x: 380
"y": 84
- vacuum:
x: 25500
"y": 35500
map:
x: 180
"y": -116
map_modes:
- template: vacuum_clean_segment
predefined_selections:
- id: "1"
icon:
name: mdi:sofa
x: 21725
"y": 21675
label:
text: Wohnzimmer
x: 21725
"y": 21675
offset_y: 35
outline:
- - 19050
- 19700
- - 24400
- 19700
- - 24400
- 23650
- - 19050
- 23650
- id: "2"
icon:
name: mdi:shoe-sneaker
x: 25475
"y": 24475
label:
text: Flur
x: 25475
"y": 24475
offset_y: 35
outline:
- - 24850
- 22100
- - 26100
- 22100
- - 26100
- 26850
- - 24850
- 26850
- id: "3"
icon:
name: mdi:toaster-oven
x: 28325
"y": 23600
label:
text: Küche
x: 28325
"y": 23600
offset_y: 35
outline:
- - 26100
- 22500
- - 30550
- 22500
- - 30550
- 24700
- - 26100
- 24700
- id: "4"
icon:
name: mdi:bed
x: 21975
"y": 25775
label:
text: Schlafzimmer
x: 21975
"y": 25775
offset_y: 35
outline:
- - 19450
- 23900
- - 24500
- 23900
- - 24500
- 27650
- - 19450
- 27650
- id: "9"
icon:
name: mdi:bathtub
x: 28400
"y": 25900
label:
text: Badezimmer
x: 28400
"y": 25900
offset_y: 35
outline:
- - 26250
- 24950
- - 30550
- 24950
- - 30550
- 26850
- - 26250
- 26850
- template: vacuum_clean_zone
- template: vacuum_goto
map_locked: true
two_finger_pan: false
tiles:
- tile_id: status
entity: vacuum.roborock_qrevo_curv
label: Status
icon: mdi:robot-vacuum
translations:
starting: Starting
charger disconnected: Charger disconnected
idle: Idle
remote control active: Remote control active
cleaning: Cleaning
returning home: Returning home
manual mode: Manual mode
charging: Charging
charging problem: Charging problem
paused: Paused
spot cleaning: Spot cleaning
error: Error
shutting down: Shutting down
updating: Updating
docking: Docking
going to target: Going to target
zoned cleaning: Zoned cleaning
segment cleaning: Segment cleaning
emptying the bin: Emptying the bin
charging complete: Charging complete
device offline: Device offline
- tile_id: battery_level
entity: vacuum.roborock_qrevo_curv
label: Battery
attribute: battery_level
icon_source: vacuum.roborock_qrevo_curv.attributes.battery_icon
unit: "%"
conditions:
- entity: sensor.is_staubi_battery_under_25
value: "true"
- tile_id: sensor_dirty_left
label: Sensors left
unit: h
multiplier: 0.0002777777777777778
hold_action:
action: call-service
service: vacuum.send_command
confirmation: {}
service_data:
command: reset_consumable
params: sensor_dirty_time
entity_id: vacuum.roborock_qrevo_curv
entity: sensor.roborock_qrevo_curv_verbleibende_sensorzeit
icon: mdi:eye-outline
precision: 0
translations: {}
conditions:
- entity: sensor.is_staubi_sensor_left_under_1h
value: "true"
- tile_id: filter_left
label: Filter left
unit: h
multiplier: 0.0002777777777777778
hold_action:
action: call-service
service: vacuum.send_command
confirmation: {}
service_data:
command: reset_consumable
params: filter_work_time
entity_id: vacuum.roborock_qrevo_curv
entity: sensor.roborock_qrevo_curv_verbleibende_filterzeit
icon: mdi:air-filter
precision: 0
translations: {}
conditions:
- entity: sensor.is_staubi_filter_under_15h
value: "true"
- tile_id: main_brush_left
label: Main brush left
unit: h
multiplier: 0.0002777777777777778
hold_action:
action: call-service
service: vacuum.send_command
confirmation: {}
service_data:
command: reset_consumable
params: main_brush_work_time
entity_id: vacuum.roborock_qrevo_curv
entity: sensor.roborock_qrevo_curv_verbleibende_zeit_der_hauptburste
icon: mdi:brush
precision: 0
translations: {}
conditions:
- entity: sensor.is_staubi_hauptburste_under_15h
value: "true"
- tile_id: side_brush_left
label: Side brush left
unit: h
multiplier: 0.0002777777777777778
hold_action:
action: call-service
service: vacuum.send_command
confirmation: {}
service_data:
command: reset_consumable
params: side_brush_work_time
entity_id: vacuum.roborock_qrevo_curv
entity: sensor.roborock_qrevo_curv_verbleibende_zeit_der_seitenburste
icon: mdi:brush
precision: 0
translations: {}
conditions:
- entity: sensor.is_staubi_seitenburste_under_15h
value: "true"
- tile_id: cleaned_area
label: Cleaned area
unit: m²
precision: 2
entity: sensor.roborock_qrevo_curv_reinigungsbereich
icon: mdi:texture-box
translations: {}
- tile_id: cleaning_time
label: Cleaning time
unit: min
multiplier: 0.016667
entity: sensor.roborock_qrevo_curv_reinigungszeit
icon: mdi:timer-sand
precision: 0
translations: {}
icons:
- icon: mdi:play
conditions:
- entity: vacuum.roborock_qrevo_curv
value_not: cleaning
- entity: vacuum.roborock_qrevo_curv
value_not: error
- entity: vacuum.roborock_qrevo_curv
value_not: returning
tooltip: Start
tap_action:
action: call-service
service: vacuum.start
service_data:
entity_id: vacuum.roborock_qrevo_curv
- icon: mdi:pause
conditions:
- entity: vacuum.roborock_qrevo_curv
value_not: docked
- entity: vacuum.roborock_qrevo_curv
value_not: idle
- entity: vacuum.roborock_qrevo_curv
value_not: error
- entity: vacuum.roborock_qrevo_curv
value_not: paused
tooltip: Pause
tap_action:
action: call-service
service: vacuum.pause
service_data:
entity_id: vacuum.roborock_qrevo_curv
- icon: mdi:stop
conditions:
- entity: vacuum.roborock_qrevo_curv
value_not: docked
- entity: vacuum.roborock_qrevo_curv
value_not: idle
- entity: vacuum.roborock_qrevo_curv
value_not: error
- entity: vacuum.roborock_qrevo_curv
value_not: paused
tooltip: Stop
tap_action:
action: call-service
service: vacuum.stop
service_data:
entity_id: vacuum.roborock_qrevo_curv
- icon: mdi:home-map-marker
conditions:
- entity: vacuum.roborock_qrevo_curv
value_not: docked
- entity: vacuum.roborock_qrevo_curv
value_not: returning
tooltip: Return to base
tap_action:
action: call-service
service: vacuum.return_to_base
service_data:
entity_id: vacuum.roborock_qrevo_curv
- icon: mdi:target-variant
conditions:
- entity: vacuum.roborock_qrevo_curv
value_not: docked
- entity: vacuum.roborock_qrevo_curv
value_not: error
- entity: vacuum.roborock_qrevo_curv
value_not: cleaning
- entity: vacuum.roborock_qrevo_curv
value_not: returning
tooltip: Clean spot
tap_action:
action: call-service
service: vacuum.clean_spot
service_data:
entity_id: vacuum.roborock_qrevo_curv
- icon: mdi:map-marker
tooltip: Locate
tap_action:
action: call-service
service: vacuum.locate
service_data:
entity_id: vacuum.roborock_qrevo_curv
- menu_id: fan_speed
icon: mdi:fan-alert
label: "off"
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value: "off"
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: "off"
- menu_id: fan_speed
icon: mdi:fan-alert
label: quiet
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value: quiet
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: quiet
- menu_id: fan_speed
icon: mdi:fan-alert
label: balanced
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value: balanced
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: balanced
- menu_id: fan_speed
icon: mdi:fan-alert
label: Turbo
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value: turbo
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: turbo
- menu_id: fan_speed
icon: mdi:fan-alert
label: max
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value: max
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: max
- menu_id: fan_speed
icon: mdi:fan-alert
label: max_plus
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value: max_plus
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: max_plus
- icon: mdi:fan-alert
conditions:
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: "off"
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: quiet
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: balanced
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: turbo
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: max
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: custom
- entity: vacuum.roborock_qrevo_curv
attribute: fan_speed
value_not: max_plus
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_qrevo_curv
fan_speed: "off"
- type: menu
menu_id: water_box_mode
icon_id: water_box_mode
available_values_attribute: options
icon: mdi:water
icon_mapping:
"off": mdi:water-remove
mild: mdi:water-minus
moderate: mdi:water
intense: mdi:water-plus
custom: mdi:water-sync
tap_action:
action: call-service
service: select.select_option
service_data:
option: "[[value]]"
entity_id: "[[entity_id]]"
entity: select.roborock_qrevo_curv_wisch_intensitat
- type: menu
menu_id: mop_mode
icon_id: mop_mode
available_values_attribute: options
icon: mdi:water
icon_mapping:
standard: mdi:standard-definition
deep: mdi:high-definition
deep_plus: mdi:ultra-high-definition
custom: mdi:fit-to-screen-outline
tap_action:
action: call-service
service: select.select_option
service_data:
option: "[[value]]"
entity_id: "[[entity_id]]"
entity: select.roborock_qrevo_curv_mop_modus |
One more thing that makes life even easiser, to get the right calibration_points you can just go to the developer menu and select "States" http://homeassistant.local/developer-tools/state (this only works while you have the custom integration installed!)
Full working config (adapted "ids" to numbers and fixed some props)Vacuum Card Config
For clarification, sending a raw command like this:
does work as expected. debuged what the websocket is sending, seems also correct to me. strange? {"type":"call_service","domain":"vacuum","service":"send_command","return_response":false,"service_data":{"command":"app_segment_clean","params":["27"],"entity_id":"vacuum.roborock_s8_pro_ultra"},"id":96} I'm stuck, I tried sending the call_service via developer tools: but still doesn't do anything. If I call the action instead: it works as expected. who is processing the "call_service"? Isn't this HA core? |
Okay I debugged it even further, it seems that "params" is passed in a wrong format,.. what then happens is that the whole integration goes offline for a second, and comes back. but the robot is not doing anything. e.g.
breaks it
works. Puh, I finally found the issue and the SOLUTION, the "id" in the predefined_selections: |
@simllll You can force ids to be treated as numbers with following config (even when they are provided with quotes): map_modes:
- template: vacuum_clean_segment
id_type: number
predefined_selections:
- id: 16
comment: Flur
... |
Description
The official roborock integration makes constant updating images, does not have a camera view anymore. It would be great if instead of a camera, a image can be used for this card.
Solution
Supporting image view for the map.
Alternatives
No response
Context
No response
The text was updated successfully, but these errors were encountered: