Husqvarna Automower monitoring

How can i ignored the automatic stop time of 3 hours? When i start the mower with vacuum.start_pause, the mobile app said that he turns off within 3 hours. I want to let him do his job for 6 hours.

I found this on: https://developer.1689.cloud/apis/Automower+Connect+API#/readme

Start mower and cut for a duration of time, overriding schedule

const requestOptions = {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'X-Api-Key': appKey,
    'Authorization-Provider': 'husqvarna',
    'Content-Type': 'application/vnd.api+json'
  },
  body: JSON.stringify({
    data: {
      type: 'Start',
      attributes: {
        duration: 24
      }
    }
  })
};

const commandResponse = await fetch(`https://api.amc.husqvarna.dev/v1/mowers/${mowerId}/actions`, requestOptions);
if (commandResponse.ok) {
    // Your code...
}

@walt can you add the option to give a number of minutes that he has do to his job?
I have fix it with the api way but i have to generate each hour a new key.

This component is using the original Husqvarna API – On start, a simple START is sent with no duration:

I’m not terribly interested in porting over to the new API as it doesn’t include GPS coordinates, which I find very useful.

Do you perhaps have a schedule set on the mower? Can you just set it to mow 24x7 and then manage the mower schedule through Home Assistant?

Just a note, the Lovelace Map Card in 108 or later makes an amazing heat map now:

4 Likes

wow that looks great… could you quickly describe how to get that heatmap card?

It’s just builtin to the lovelace map card in HA 108 and later!

1 Like

Do I have to setup anything with the device tracker for the bot first? I can see the current position on the map card, but no history…

No, you just need to have recorder setup (it is by default, usually) to track the history of your entities:

Yeah, I’ve got the recorder setup… When I click on the mower entity I have the history of when it cuts and charges etc… But when I click on the mower icon in the map all it says is “No state history found”, and accordingly no tracks on the map

EDIT: nevermind, I had device_trackers excluded from the recorder from way early, forgot about that. Now it shows “Home” as history. Just have to wait until tomorrow for some mower movement now.

Thanks for the help!

1 Like

Anyone knows why https://developer.1689.cloud/ is down?

A few days ago I retrieved API key etc… but now I cannot access the https://developer.1689.cloud/
site to get the documentation I need on how to use the API.

Does anyone have a copy of the documentation?

tge@otrobanda,.se

Thanks for the help!!

Hey - solved !
It’s up and running again…

Hi, I have tried fro weeks now to get the Gogle maps tracking to work with my HACS Automower integration. I have followed = copied the instructions to the letter, using the correct key a.s.o.
Still, I get this error in the log - and an empty map as picture:
ERROR (MainThread) [homeassistant.components.generic.camera] Error parsing template Template(“https://maps.googleapis.com/maps/api/staticmap?center={{ states.device_tracker.automower.attributes.latitude }},{{ states.device_tracker.automower.attributes.longitude }}&zoom=19&size=500x500&maptype=satellite&markers=color:blue%7Clabel:P%7C{{ states.device_tracker.automower.attributes.latitude }},{{ states.device_tracker.automower.attributes.longitude }}&key=##############################”): UndefinedError: ‘None’ has no attribute ‘attributes’

Please help…

A better and easier option is to now just use the lovelace map history card:

The map history card is dead easy but without a satellite map option (which I can’t even find any hacks for) it’s not much good for telling where in your yard the mower is.

I would like to use my own schedule and thus not use the one from Husqvarna itself. Is there a way to do this?

  • It’s impossible to remove any schedule from the Husqvarna app.
  • If there is nothing scheduled, and I use vacuum.start, it doesn’t start and thus doesn’t override the schedule from the app
  • If I add a schedule in the Husqvarna app, it will use that schedule, and not the one I’ve set in HA

Any idea on how to use only the schedule I’ve configured in HA?

Thanks
Cadish

Set the Husqvarna schedule to run 24/7

Of course! Will try.

Thanks a lot!

I wanted to make the same sensor but for the battery indication. But can´t seem to get the attribute wright. Have you an idea?

@JoeAstor
You have to made in your configuration

sensor:
  - platform: template
    sensors:
        batterij:
          friendly_name: 'Accu'
          unit_of_measurement: '%'
          value_template: "{{ states.vacuum.automower.attributes.battery_level }}"
          device_class: battery
2 Likes

I tried everything… but battery_level i never found it in all documentation. Thank you a lot :smile: