Open erkexzcx opened 1 year ago
Yup, you are correct. It seems that I have not fully finished this section of configuration.
Check if this config works:
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.rockrobo_rendered_map
calibration_source:
entity: sensor.rockrobo_calibration_data
entity: vacuum.valetudo_rockrobo
vacuum_platform: Hypfer/Valetudo
internal_variables:
topic: valetudo/rockrobo
map_modes:
- template: vacuum_clean_zone_predefined
selection_type: PREDEFINED_RECTANGLE
coordinates_rounding: true
coordinates_to_meters_divider: 100
max_selections: 5
predefined_selections:
- zones: [[2185,2975,2310,3090]]
label:
text: Entrance
x: 2247.5
y: 3032.5
offset_y: 28
icon:
name: mdi:door
x: 2247.5
y: 3032.5
- template: vacuum_goto
- template: vacuum_clean_zone
map_locked: true
two_finger_pan: false
Yes, this one does work:
map_modes:
- template: vacuum_clean_zone_predefined
selection_type: PREDEFINED_RECTANGLE
predefined_selections:
- zones:
- - 2185
- 2975
- 2310
- 3090
label:
text: Entrance
x: 2247.5
'y': 3032.5
offset_y: 28
icon:
name: mdi:door
x: 2247.5
'y': 3032.5
Thanks a lot!
Great :+1: I'll adjust it
Thanks! Also note this: https://community.home-assistant.io/t/ive-build-a-better-alternative-to-icantbelieveitsnotvaletudo-map-renderer/620185/7?u=erkexzcx
Basically my project archived (or superseded) https://github.com/Hypfer/Icantbelieveitsnotvaletudo and instructions should be updated accordingly: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/master/docs/templates/hypferValetudo.md
Currently there are 2 projects now that can render a map in HomeAssistant as of today:
I've seen this thread, good job 👍 I'll adjust docs - Valetudo Map Camera has already been added there, I'll add your project as well and remove ICBINV.
By the way, you might consider creating HA addon as well
Checklist
The problem
Basically this is what example says (source):
Here is what I am getting:
Okey, ID is missing, let's add it:
Now it looks OK. Let's run it - nothing happens. Let's look at MQTT logs in Valetudo:
hmmm,
h
...e
.. these are not coordinates! Let's see if we can convert template to manual configuration:But wait! Let's look into
{%for s in ('[[selection]]')|from_json %}
part. It uses'[[selection]]'
and generates coordinates accordingly. Let's simply updatepayload
to this:Let's run again and this time it's quite interesting result in MQTT logs in Valetudo :smile:
How is this even supposed to work? Looks like this card is iterating ID string rather than coordinates.
I am not certainly sure, but it worked a week ago or something. I did not update this card, no idea how it ended up working like this.
What version of a card has described problem?
v2.2.2
What was the last working version card?
No response
What vacuum model do you have problems with?
roborock.vacuum.s5
Which integration do you use to control your vacuum (link)?
hypferValetudo over MQTT (standard configuration)
What browser (browsers/apps) does have this problem?
Firefox
What version of Home Assistant do you use?
Home Assistant 2023.9.3; Frontend 20230911.0 - latest
What type of installation are you running?
Home Assistant Container
Card's configuration
Javascript errors shown in the browser's console (if applicable)
Additional information
I've developed a new mapper application for Valetudo: https://github.com/erkexzcx/valetudopng
I am currently using it. Considering that
Ping & Go
works like a charm, I believe my application has no impact on this and issue lies somewhere else...