Closed Maudfer closed 4 months ago
Btw, for those interested, here's how it looks without the vacuum map overlayed, for reference
There is the transparent option in the color scheme configuration options but the problem with that is it will make all of your maps transparent not just the one you put into your floorplan.
Custom card that I am making will support transparent map rendering with only selected objects but it is still work in progress. https://github.com/Tasshack/dreame-vacuum/issues/466
By the way, camera entity already has all of the object coordinates but those are in map coordinates not px values. To convert the coordinates to pixel values you also need to use three point calibration data that is also present in the entity attributes.
Ohh, thank you @Tasshack! Those are both useful bits of information, I didn't know about the camera attributes. I think I can work on those. All I need is a percentage value relative to the full map size.
All I need is a percentage value relative to the full map size.
Its not that simple.
@Maudfer I've done this by customising the integration to create a couple of additional cameras so I can have an overlay camera map (for room names) and a camera map that just shows the robot and path: He's a screenshot from before I created the second additional cameras for the room overlays: I can share my modified version with you if you'd like.
Whoa, this looks AMAZING. I love what you did with the 3D there as well! Would you share the customized version of the integration, indeed, please?
In the last few days I was experimenting with creating a custom integration that loads the camera entity from @Tasshack 's integration as an input, grabs the vacuum position and calibration data, and then outputs another entity with the calculated position values. But I've yet to get it to work.
But now I'm thinking I like your approach better! @tungmeister
@Maudfer dreame_vacuum.zip Just extract and paste over your existing integration folder. you'll then get additional config options in the integration settings where you can pick the objects you want visible on the additional maps, set the color scheme to transparent for the additional maps:
Thank you so much @tungmeister ! I'm gonna try it as soon as I finish work for the day
Don't you wanna put this into a proper fork? Then it would be possible for people to download it from HACS
But thanks anyway, this solves my problem completely.
I was trying to apply an affine transform on the coordinates vacuum coordinates using python and the calibration data, but could never get it to align correctly, since I have the camera entity scaled on my floorplan.
@tungmeister Thank you so much dude! This is freaking amazing!
A tip if anyone sees this and wanna try it, first download the beta version of Dreame Vacuum (v2.0.0b15) from HACS, then extract @tungmeister's files on top of it.
@Maudfer I have a fork, it's just not up to date and I didn't have time yesterday to sort it so uploaded my files directly for you. Glad it's working!
@Maudfer I have a fork, it's just not up to date and I didn't have time yesterday to sort it so uploaded my files directly for you. Glad it's working!
So assume i'm an idiot. if i just copy the files in to the integration does it create a map as above but to my rooms layout? i havent created a floorplan map or anything.
@IdiotTryingToFindWay No, what this modified version of the integration does is just expose a separate version of the vacuum map as a new Home Assistant entity, that you can configure to be just the floating robot on a transparent background, for example.
Then if you want to do what I did, you have to create a floorplan of your house (in photoshop, for example), and superimpose the map image on top of the floorplan image. The very first picture I posted on this thread shows how it looks if I put the original vacuum map on top of the floorplan I created, while the last image shows how it looks using @tungmeister's modified version.
Hi! This integration is amazing, very well done. I've been playing around with it and my Floorplan in the Picture-elements card recently, to some very interesting results:
It would be great to have either a way to render only the robot, without the rooms (maybe only the robot and its path). Or maybe having some exposed attributes from where I can get the robot coordinates relative to the map.
I've tried some experiments to make do with what the integration currently exposes, I was trying to subtract pixels between the Saved Map and Current Map entities using CSS, to achieve a similar effect, but wasn't able to.
Anyway, this is not high priority, just something fun I've been playing with, and want to give you the idea, if it's easy to do. Great work on this and thanks!