-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
I would love seeing Valetudo support in a Future release #375
Comments
Does it support to cleaning by coordinates? Can you provide attributes of vacuum entity? |
yup 👍 |
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 |
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).
Which commands? |
@PiotrMachowski |
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": Doesn't look like the original "Valetudo" has support for the "custom_command" used by the "Valetude RE" template: |
@PiotrMachowski |
You don't have to create a whole template, just example service calls would be enough |
👌 |
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.
|
@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. |
@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? |
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? |
Isn't map data retrieval the main issue here? |
Anway, if you want to support Valetudo, you'll need to take the map data image, extract the ValetudoMap JSON, render that to an image and then use that image. In that case, you also won't need any calibration points as the ValetudoMap JSON already contains all the information you need. See for example this test case JSON Just take the map pixel coordinates and multiply it with the To uncompress that compressedPixels format, take a look at this Also, consider looking at this comment describing the data format and this code extracting the data |
It works with it like with any vacuum entity, the problem is that camera is not a regular camera - it doesn't contain an actual image. My card (unlike Valetudo card) doesn't render map from data, but it displays an already rendered image. Because of that it needs calibration points to translate coordinates on the image to vacuum coordinates system. The rest of communication and presentation uses standard HA entities and service calls ( I didn't want to incorporate rendering the map from ValetudoMap JSON, because it would be a completely different approach to displaying the map - that's why I wanted to use ICBINV (and add calibration points there). |
The reason why it is like that with Valetudo is that it allows us to
It is indeed a completely different approach to how the cloud-based robots operate. That is why I was saying that this card and Valetudo like won't be very much compatible with each other, as they operate in very different niches even though they both have something to do with vacuum robots. What I'm saying is that you can't support Valetudo without actually supporting Valetudo. |
And that's something I do not really get. How does the camera come into the game? Sure, there are vacuum cleaners out there with real cameras. But not all of them have. But all of them store a map. But a map is not a camera 🤔 |
Okay so you see, the map data provided by the robots firmware actually isn't an image (like a png) but something else entirely. To have an actual image (like a png), you then have to take that JSON and render it to an image. The fact that you're not seeing the ValetudoMap JSON but that camera entity with the picture telling you to install the map card is a clever hack around the following problem: MQTT autodiscovery also means that any entity configured that way will also be recorded by the HA recorder component. The trick here is that So it's actually just a JSON string however for UX purposes, this string is wrapped into a png image file. Also, context: PNGs can contain arbitrary strings. See zTxT |
I completely understand this, I don't expect Valetudo to render the image - I just wanted to use ICBINV istead.
It is just map rendering, I don't think that it would have such big impact on functionalities.
Like I mentioned above, my card since v2.x.x is not actually tied to any specific vendor. It provides a set of universal features to work with vacuums that operate using a map. It can be adjusted from supporting Roomba vacuums to Neato with just yaml a configuration change.
Camera in HA doesn't have to be an actual real-world camera - it is just an entity with an image. In my case the image is a vacuum map. |
@Hypfer |
Yes but it is tied to how all these vendors operate. Valetudo on the other hand doesn't provide an image as png and also does not need calibration points as the cm coordinates can be directly deduced from the JSON. I know it would be easier to treat Valetudo like any other supported vendor, but it simply is different. To support Valetudo, you need to support Valetudo. |
No, because Valetudo is entirely different as it has a completely different access level to the map data than all other vendors. |
Ok. Get that. That will only leave the option that @PiotrMachowski will code something more Valetudo specific into its card component. |
Exactly, however I suspect that that wouldn't make all too much sense as it would be very different for just one Vendor. |
Actually e.g. Xiaomi doesn't provide map as an image as well - I have created Map Extractor that downloads binary map data from Xiaomi Cloud (rrmap) and creates an image. Thanks to that approach calibration points provided by Map Extractor are not an estimation, but are just as accurate as map generated by Valetudo. Generally speaking when using ME I have pretty similar access to map data compared to Valetudo.
The only benefit of a binary map vs image map + calibration points is that you can treat binary map as a vector image, so e.g. zooming won't affect image quality. Is there something different that I'm missing?
Yeah, adding Valetudo map parsing to the card doesn't really make sense. I think that I might create a custom integration (similar to Map Extractor) that will read ValetudoMAP JSON and create another camera with actual map displayed as an image, but this will definitely take some time for me to implement. It will bring other benefits to users that use HA and Valetudo, e.g. possibility to send map image with notification. |
Oh okay. I've never looked into that due to the whole cloud thing but in that case
You can selectively filter out entities or layers that you don't want. Maybe you just want to see the walls and the robot or maybe the path should not be part of the image or maybe it should be half-transparent or twice as wide.
That would be awesome! |
Right, I have forgot about this. This would be nice - e.g. when drawing a free-hand zone to clean, but I think I can live without it.
The downside of this solution compared to ICBINV is that it won't be available for people that doesn't use HA. Using Config Flow is perfectly doable, but in this case configurability would probably need to be limited. Full functionality (incl. changing colors and visibility of elements) is much easier to achieve in yaml.
Sure, this isn't a problem at all. One thing that has to be taken to account though is that image rendering might use some resources. |
Is it really? I mean those using Valetudo but not HA would probably use Valetudo directly, wouldn't they?🤔 Have no clue though how the Valetudo integration looks like for others like OpenHAB. |
I was mostly thinking about "zone cleaning", "segment cleaning" and "go-to location". So that one could select a zone or segment on the map and start cleaning just that area. Or point to an arbitrary location on the map, send the robot to that location and clean a defined area of size around that point.
…________________________________
From: Piotr Machowski ***@***.***>
Sent: Friday, August 26, 2022 10:14:26 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)
@wwebers<https://github.com/wwebers> yes, I have added just room cleaning. Are there any other services that I can add?
documentation of Valetudo platform on dev branch<https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/dev/docs/templates/hypferValetudo.md>
—
Reply to this email directly, view it on GitHub<#375 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABO2BHEJSXXWMRZCONN3BP3V3B4GFANCNFSM5RZDEDKA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@wwebers All of these are supported right now ;) |
Hi folks. I'm trying to follow this thread and use this card with Valetudo, but I don't have a "camera" entity other than |
Thanks for the reply. I see this link says to use "ICBINV", which is perhaps still working but deprecated. I was hoping for an up-to-date supported solution. I may give it a go, as I only really need to get the coordinates once anyway. |
Not only you hope for that. The map image of the map has to be rendered somewhere, but not by the CPU of the vacuum cleaning robot. Resources are too limited @Hypfer said once. Anyway, Valetudo has the capability to render such a map. Sounds somewhat contradictory. |
Unfortunately that's all I have at this moment, but I plan to make some improvements |
Thanks for the responses! I've tried lots of "go to location" commands with various points and the robot goes for a trip and says it can't get there. I can't figure it out. It will go to the North East part of my house for say, 150, 300... then I try to move it a tiny bit, like 120, 300 and it will go to a totally different spot on the West side. I understand it might not be able to get to actual locations that aren't inside the house, but I've yet to figure it out. |
@lindsaymarkward well, I don't use Valetudo so I can't help you using my own experience, but I've managed to find this discussion that should help you in resolving your issues: Hypfer/Valetudo#1688 |
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
The text was updated successfully, but these errors were encountered: