- The easiest way to acquire an image and the corresponding coordinates is via Google MyMaps.
- From Google MyMaps, choose
Create a new map
. - Center your location in the screen, adjust the zoom for the maximum size.
- Choose draw a line, then draw a line or shape.
- Create an L shape around the future edge of your image, taking care to make the lines as close to a right angle as possible.
- Choose the three dot menu next to the layer you created, then export as csv.
- Open the csv file, in column WKT, row one, you will find a row like this.
LINESTRING (-82.5527258 35.5410981, -82.5500865 35.5404848, -82.5504486 35.539459)
- From this, extract the top left and top right coordinates, this is the first and last coordinates. In this case our top left coordinate is -82.5527258 35.5410981 and our bottom right is -82.5504486 35.539459
- Next, change the coordinates from long, latitude format, to latitude, longitude format. So the result is
- Top Left: 35.5410981,-82.5527258
- Bottom Right: 35.539459,-82.5504486
- Now, take a screen shot of the image, and load the new image into your preferred image editing program, in this case I'm using GIMP.
- Rotate your image until the top of the image is parallel to the line you have created.
- Make sure you note the amount of rotation, and which direction, positive or negative, you applied. In this case,
-16
degrees. - Next, crop the image to the line you drew in step 5. This is the image you will use for your background image, export it and upload to your home assistant. Be sure to place it in a location that is accessible to your instance. I recommend your config folder, so
config/www/images/map.png
would be typical. - Now, find the Husqvarna Integration in Settings, Integrations, choose the gear icon.
- Choose configure.
- Choose Configure Map Image.
- Choose the mower you to configure the image for.
- Paste the Top Left and Bottom Right coordinates from step 9, set the rotation from step 12, and the folder you placed the image in during step 13.
- [Optional] add the home location of your mower, this will ensure the mower is always shown at home on the image if it's docked. This prevents GPS errors, especially noticeable if you have a garage causing the mower to appear to wander.
- [Optional] If you have more than one mower, the last option is to choose additional mowers to display on this mowers map image, choose those now.
- Choose Submit, then finish.
- Verify your mower is shown on the map image properly.
- Using Google MyMaps again, select the map you created in step 2.
- Choose draw a line, then draw a line or shape around the zone you want to track, go ahead an name it.
- Create additional zones and name them, using the same process.
- Choose the three dot menu next to the zones you created, then export as csv.
- Open the csv file and find the polygon you created in column WKT, in this case our
Front Garden
zone isPOLYGON ((-82.552459 35.5408395, -82.5526468 35.5403331, -82.5506861 35.5398879, -82.5505225 35.5403811, -82.552459 35.5408395))
- Once again, we need to format it in the correct format. So our zone becomes.
35.5408395,-82.552459; 35.5403331,-82.5526468; 35.5398879,-82.5506861; 35.5403811,-82.5505225;
- Note: We have to remove the last coordinate, since when you join the shape, the last coordinate is the same as the first.
- Now, open the configure menu again.
- Select Configure Zones.
- Choose Create Zone.
- Choose a name for your zone, in this case Front Garden, paste the zone coordinates from step 6, choose if this zone should be drawn on the map, the color for the zone, and which mowers should show the zone.
- Choose Submit.
- Now you will see your new zone, plus Create Zone and Save Zone.
- You must select Save Zone, then click Submit to save the zones to the config.
- Verify the zones are shown on the map image.
- Note: The Zone sensor won't update until you either reload the integration or the next update happens.