Page 1 of 1

Husqvarna Automower API

Posted: Monday 14 October 2019 0:04
by mrhedstrom
Husqvarna has a REST API for integrations to their lawnmower. It would be really nice to have the lawnmover in Domoticz. Mainly to prevent the sprinkler system from popping up if the lawnmover isn't in the charging station. And also forcefully docking the lawnmover before irrigation.
https://developer.1689.cloud

Found one python implementation on github
https://github.com/chrisz/pyhusmow

Re: Husqvarna Automower API

Posted: Sunday 30 May 2021 22:38
by mrhedstrom
Bump

Re: Husqvarna Automower API

Posted: Tuesday 01 June 2021 19:49
by FireWizard
Hi, @mrhedstrom,

As you might have seen, the repo of the Python plugin is no longer maintained.
This repository is no longer maintained. Husqvarna provides an official api now, you can easily use it: https://developer.1689.cloud/apis/Automower+Connect+API
So, it is not recommended to use that plugin. Much easier is to use the official API.

If you look to this API you will see some examples, using NodeJS.

So I recommend to use Node Red and push it to Domoticz with MQTT,
There are plenty examples on this forum and on the Internet to install these two packages

However if you need support for these, do not hesitate to ask.

Regards

Re: Husqvarna Automower API

Posted: Tuesday 01 June 2021 23:22
by waltervl
If the NodeJS/MQTT is too much work you could check the Python library created for the official API:
https://pypi.org/project/aioautomower/
So also with examples. You should be able to run the python script that is on that page. It should put your Automower in " Resume Schedule" state.

Code: Select all

payload = '{"data": {"type": "ResumeSchedule"}}'  
## For more commands see: https://developer.husqvarnagroup.cloud/apis/Automower+Connect+API#/swagger
SendingCommand(api_key, access_token, provider, token_type, mower_id, payload)
For getting the API code follow the instruction in the HA integration with the official API: https://github.com/Thomas55555/husqvarna_automower

Please let us now if you are able to get your Automower running.