Husqvarna Automower API

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
User avatar
mrhedstrom
Posts: 9
Joined: Tuesday 11 February 2014 10:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Åkersberga, Sweden
Contact:

Husqvarna Automower API

Post 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
User avatar
mrhedstrom
Posts: 9
Joined: Tuesday 11 February 2014 10:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Åkersberga, Sweden
Contact:

Re: Husqvarna Automower API

Post by mrhedstrom »

Bump
User avatar
FireWizard
Posts: 1888
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Husqvarna Automower API

Post 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
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Husqvarna Automower API

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest