DeebotUniverse / Deebot-4-Home-Assistant

Home Assistant integration for deebot vacuums
https://deebot.readthedocs.io/integrations/home-assistant/
GNU General Public License v3.0
180 stars 40 forks source link

[device_name]_map returns the map but no cleaning trace #522

Closed bogorad closed 9 months ago

bogorad commented 9 months ago

My device's name is 'bobik', so I used to get image.bobik_map and there was a URL ponting to a JPG. Now it returns this:

image

I understand it's an XML file with BASE64-encoded PNG file. I successfully decode the BASE64 string, but the resulting image contains just the map, but no trace of the last cleaning route.

Image returned:

image

Image from HA:

image

What changed and what do I need to call to get the proper map, just like HA itself displays?

edenhaus commented 9 months ago

Sorry, I can't follow you. HA is showing the correct image so everything is fine. I don't get it where the first image comes from and which usecase that is. The integration provides only one image entity to HA.

bogorad commented 9 months ago

When my deebot returns (state: docked after returning) I request image.bobik_map from HA. Here's what I get:

image

Now I do curl -i and get this:

image

Which is clearly not an image, but an XML. There's an image encoded in it. But it has no deebot's last route.

Previously the URL returned a JPG with the routes from the last cleaning. Do I need to decode xml/svg now?

edenhaus commented 9 months ago

We have switched to a scalable vetor graphics (SVG) in 3.1.0. The PNG you are extracting from the XML is the background image. The bot's route is specified directly in the SVG.

Please learn how to use an SVG instead of a PNG or convert the SVG into a PNG if you need a PNG. But both are outside this integration's scope, and you can find all the required information on the internet.

bogorad commented 9 months ago

I see. thank you for the clarification.

bogorad commented 9 months ago

Now I have to render via an external service. Great :(

You may close the issue.