rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
671 stars 74 forks source link

Solved: Add current coordinates to MQTT or show on map #127

Closed snowwiddow closed 4 years ago

snowwiddow commented 4 years ago

The Roborock and Valetudo knows always the coordinates where the vacuum currently is, for example drawing the robot on the map. It would be great when the current coordinates are also send via MQTT. An alternative would be to show the coordinates on the map when I send the vacuum to a goto-spot. Background: In my house it's very ineffective to draw zones or no-go-areas. I draw a no-go-zone (i.e. around a carpet), the robot ignores that zone how it should do, but there is a small range between cleaning area and no-go-zone, where it is not cleaned. So I have to correct the zone and try it again. The not cleaned range get smaller but is still there. Correcting zone again and so on. When the carpet is moved a little bit all efforts for setting a good zone are gone.... So if would get the actual coordinates where the vacuum is I can set the zone exactly.

rand256 commented 4 years ago

Valetudo can get coordinates of the robot from the map generated by roborock, and this map data is already available on the mqtt. All you need is parsing it, and this can be done by valetudo-mapper, which moreover can provide parsed data including robot position to mqtt as well.

If we're talking specifically about valetudo, it doesn't "know" that data "always", as it parses the map itself only when asked to draw a simple map for using in i.e. telegrambot. All other time it just doesn't care of the map. And the map you see on web interface is created with map parser running in your web browser, not in valetudo.

snowwiddow commented 4 years ago

Ah, ok. Now I understand the communication between valetudo and the firmware a very little bit better, and also map creation. Thanks for this exploration. Now I will give the valetudo-mapper a trial. By the way: Your fork of valetudo is great, thanks for this work! So when I solve my last problem of getting the map of your fork into the Roborock Control Center my luck will be perfect (currently it only shows nothing) :-)

snowwiddow commented 4 years ago

Map format of valetudo-re has changed, so roborock control center can't use it. Doesn't matter for me.