Closed PalmTamino closed 2 years ago
Does it support to cleaning by coordinates? Can you provide attributes of vacuum entity?
Do you mean this?
yup 👍
Are these entities created by mqtt autodiscovery?
Are these entities created by mqtt autodiscovery?
Yeah, i think so
I second this! I initially rooted my vacuum with Valetudo RE so it wont be able to reach china, but a couple of days ago I reset it so I can make use of this awesome card you created!
If you need some information, I have two Xiaomi V1 vacuum robots which I can easily root with Valetudo RE again.
@davidrustingha it's already possible to use it with Valetudo RE by manual configuration: #342
Original Valetudo should be doable as well
Well, direct support for the original Valetudo firmware would be great. Simply as Valetudo RE doesn't seem to get actively mainained.
@wwebers it would really help me if you could send me examples of service calls for Valetudo ;)
@PiotrMachowski I'll look into it. For some reason the communication with the "camera" topic doesn't work, which works perfectly fine with the orginal Valetudo card.
@wwebers any progress here? I would like to release v2.10.0 soon
@PiotrMachowski Sorry for late response. I updated HA today and my issue is that it complains about the "camera" source. I already installed "Lovelace Valetudo Map Card" via HACS. Still, it complains with a "Invalid calibration" error message. Am using the Valetudo RE platform. Have not checked if the MQTT servcie API is different for "Valetudo" and "Valetudo RE". But I can however send commands.
Camera source provided by Valetudo is practically useless for this card as it is not a real camera, but just a facade that is designed to work with "Lovelace Valetudo Map Card" - image is just a placeholder and map is rendered by the card from raw data. You have to install I can't believe it's not Valetudo to make it work with my card (calibration part will still be missing though).
Have not checked if the MQTT servcie API is different for "Valetudo" and "Valetudo RE". But I can however send commands.
Which commands?
@PiotrMachowski Ah! That explains things! My mistake. Thank you. I mean those MQTT publish commands used by the "Valetudo RE" template: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/master/src/model/generators/platform_templates/rand256_valetudo_re.json
Have you tried them from my card or directly?
Can you try if version from the latest dev build works for you? To install it you have to manually copy js file downloaded from the artifact.
Am looking directly into the source code of "Valetudo": https://github.com/Hypfer/Valetudo/tree/master/backend/lib/mqtt
Doesn't look like the original "Valetudo" has support for the "custom_command" used by the "Valetude RE" template:
@PiotrMachowski What I meant was that the API is different in the original "Valetudo". "Valetudo RE" uses a specific "custom_command", while the original doesn't. The functionality as such exists. So, what's needed is a different template with support for the original "Valetudo" API. Will see if I find some time to create one and send you a PR.
You don't have to create a whole template, just example service calls would be enough
:ok_hand:
Just one more question: do you have the same entities as @PalmTamino here, created by MQTT autodiscovery?
Pretty much. Have some more as I'm using a Roborock S5 max with a watertank. So, some different capabilities...
@wwebers One more thing that would massively help me in development. Could you provide me data about entities created by Valetudo? Steps to follow:
F12
button)getDeviceData = async (entity) => {
const hass = document.querySelector("home-assistant").hass;
const vacuumDeviceId = (
await hass.callWS({
type: "config/entity_registry/get",
entity_id: entity,
})
)["device_id"];
const vacuumSensors = (
await hass.callWS({
type: "config/entity_registry/list",
})
).filter(e => e.device_id === vacuumDeviceId);
Promise.all(
vacuumSensors.map(vs =>
hass.callWS({
type: "config/entity_registry/get",
entity_id: vs.entity_id,
}),
),
).then(v => console.log(v));
}
getDeviceData("vacuum.example_valetudo_vacuum");
piotr.machowski.dev [at] gmail.com
@wwebers Can you check if version from this build works with your vacuum?
@PiotrMachowski I tried, but I cannot configure "Hypfer/Valetudo" as the new vacuum platform. Get an "Invalid vacuum platform" error.
@wwebers you probably have caching problem. I assume you have installed it using HACS. In this case you have to remove gzip file and add ?v=2.10.0-beta
to URL in resources.
@PiotrMachowski Thanks, that did the job. Will test it today.
@PiotrMachowski Tried to test your latest dev-build, but am struggling with ICantBelieveItsNotValetudo to make it working within my docker-compose env running on my RPi4.
Problem is that ICBINV is not up to date when it comes to its dependencies (mainly the switch to napi-rs/canvas 0.1.21
and its dependency to ld-linux-armhf.so.3
). Not to mentioned its use of NPM 8 exposing several security holes....
Will have to find a way to update this thing first (or even get rid of it...).
@wwebers you can check if it works without actual image from ICantBelieveItsNotValetudo, as it doesn't change anything in card's functionality :)
@wwebers any progress on this topic?
@PiotrMachowski The basic functionality seems to work with the "dev" version of the card and selecting the platform Hypfer/Valetudo. For more functionality we'd need to find a way to collect calibration data from the map. Getting the map coordinates is very easy since Valetudo 2022.05.1, but I couldn't find a way to get the vacuum coordinates. Thank you for your great work.
Same here. Tested without ICBINV and the basic function seem to work. But as far as I understand so have you opened only one service in your template? But maybe I misunderstood something.
@mihsu81
For more functionality we'd need to find a way to collect calibration data from the map.
If you want to use just room cleaning you might be able to get away with "fake" calibration:
calibration_source:
identity: true
@wwebers yes, I have added just room cleaning. Are there any other services that I can add?
@PiotrMachowski Based on https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/dev/docs/templates/hypferValetudo.md I added a predefined selection (for the yellow room marked with a red ouline where the charger is located in the below screenshot) but it doesn't seem to work. The coordinates are taken from Valetudo itself by making a selection and long-pressing on the Clean button (second screenshot).
I was expecting to see an outline of the map which I could select and start cleaning.
I've also attached the json file with the map definition from Valetudo's Swagger UI. response_1661532827644.zip
type: custom:xiaomi-vacuum-map-card
entity: vacuum.valetudo_roborock_vacuum
vacuum_platform: Hypfer/Valetudo
map_source:
camera: camera.roborock_vacuum_rendered_map
two_finger_pan: true
calibration_source:
identity: true
map_modes:
- template: vacuum_clean_segment
variables:
topic: valetudo/ROBOROCK-VACUUM
predefined_selections:
- id: '17'
outline:
- - 2515
- 2529
- - 3005
- 2529
- - 3005
- 2909
- - 2515
- 2909
label:
text: Living Room
x: 2745
'y': 2663
offset_y: 0
icon:
name: mdi:sofa-outline
x: 2745
'y': 2663
@mihsu81 vacuum_clean_segment
sends only a service call with id
. You can check out service call using button in UI editor.
When you use identity
calibration you have to use coordinates from the image, not vacuum. Here you have a guide to retrieve them:
https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/dev/docs/templates/setup.md
Just for info, Valetudo RE have new version with some useable features for us I think. https://github.com/rand256/valetudo/releases/tag/0.10.8
@dimmuboy thanks for info, I will definitely add it. Related issue: #434
Update: I have added support for cleaning free-drawn zones and going to point.
Awesome. Thanks for your work. Will test it as soon as I can.
From: Piotr Machowski @.> Sent: Sunday, August 28, 2022 2:47:40 AM To: PiotrMachowski/lovelace-xiaomi-vacuum-map-card @.> Cc: wwebers @.>; Mention @.> Subject: Re: [PiotrMachowski/lovelace-xiaomi-vacuum-map-card] I would love seeing Valetudo support in a Future release (Issue #375)
Update: I have added support for cleaning free-drawn zones and going to point.
— Reply to this email directly, view it on GitHubhttps://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/issues/375#issuecomment-1229348290, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABO2BHA7JUDNRCHXO2MGCF3V3KZKZANCNFSM5RZDEDKA. You are receiving this because you were mentioned.Message ID: @.***>
@wwebers do you think you will be able to test it today? I'd like to finally release a new version 😃
Keep in mind that you will have to calibrate the card manually to make it work. Does Valetudo map change during cleaning?
I have created a feature request in I can't believe it's not Valetudo to include calibration points in its MQTT API.
I think I will create a release today/tomorrow and fix possible problems in the future.
Feature added in v2.1.0
Unfortunately I can't believe it's not Valetudo seems to be a deprecated solution, so calibration points won't be added. More info here
Unfortunately I can't believe it's not Valetudo seems to be a deprecated solution, so calibration points won't be added. More info here
Yes, I saw this as well. It because of that didn't test so deeply. We need a better solution than ICBINV. More integrated in the Valetudo firmware.
At this moment Valetudo RE with Valetudo mapper should work better with my card, maybe something will change in the future.
I'd like to once again note that this card and Valetudo - while both dealing with vacuum robots - fill very different niches. While not being completely incompatible, they aren't and also won't be 100% compatible either.
You can use one with the other the same way you can use a flat-head screwdriver to drive triangular screws. It sorta works but it's definitely not the way the manufacturer intended nor won't there be any unexpected obstacles, side-effects etc.
We need a better solution than ICBINV. More integrated in the Valetudo firmware.
The better solution than ICBINV that is more integrated into Valetudo (which is NOT a firmware) is to use the official Valetudo lovelace card that is specifically made for Valetudo.
@Hypfer No offense. Even though Valetudo is not part of the manufacturer's firmware. It's still part of the software we flash onto the robots controller board. From the consumers perspektiv this would make it a part of the firmware.
To the outside world Valetudo abstracts from the OEM specific parts, which is cool. However, I would love better support in HA for it as well. I'm using the official card and miss several features there. Maybe one should spent some effort in that instead?
I'm using the official card and miss several features there.
Yeah it's not feature-complete yet that is true and I'm aware of that.
@Hypfer I don't want to argue, but actually I don't see any reason why my card would not be compatible with Valetudo (leaving aside retrieving map image), as it just utilizes a part of exposed MQTT API. Isn't this the whole point of having an API?
Description
Valetudo is a standalone binary, which runs on rooted Vacuums of the Xiaomi ecosystem and aims to enable the user to operate the robot vacuum without any Cloud Connection whatsoever.
https://valetudo.cloud/
Solution
https://valetudo.cloud/
Alternatives
No response
Context
No response