# Automower Binding (G2)

**URL:** <https://community.openhab.org/t/automower-binding-g2/2854>\
**Category:** Bindings\
**Created:** [September 28, 2015, 6:23am UTC](https://community.openhab.org/t/automower-binding-g2/2854 "2015-09-28T06:23:57Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mike85](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@Mike85](https://community.openhab.org/u/Mike85)\
**Post date:** [November 4, 2018, 5:56pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/21 "2018-11-04T17:56:58Z")

</div>

Hallo,

ich brauche Hilfe beim Binding mit OpenHab2 und meinem Husqvarna ACX260.

Können sie mir helfen?

Freundliche Grüsse  
Mike

---

<div class="post-metadata">

**Author:** ![Dries](https://community.openhab.org/user_avatar/community.openhab.org/dries/32/8797_2.png) [@Dries](https://community.openhab.org/u/Dries)\
**Post date:** [September 13, 2019, 9:05am UTC](https://community.openhab.org/t/automower-binding-g2/2854/22 "2019-09-13T09:05:20Z")

</div>

> [@michael\_sutter](#):
>
> Your integration with automower connect looks great. I have an 430x since a few days and Im also interessted to integrate it in OH.

I’m about to purchase the same Husqvarna Automower 430X.

I noticed that these recent models have an API, and are able to connect to Alexa, Google Home, IFTTT ([see this link](https://www.husqvarna.com/uk/lawn-garden/smart-home-integration/)). This makes the [Robonect module](https://www.robonect-shop.de/) or any other other hardware unnecessary (at least for the models that have Automower Connect).

Specific API documentation can be found here:

> **[Husqvarna Developer Portal](https://developer.husqvarnagroup.cloud/apis/Automower+Connect+API)**
>
> Husqvarna Group - Developer Portal

Does anyone have experience with this API?

---

<div class="post-metadata">

**Author:** ![HaKuNa](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/c77e96/32.png) [@HaKuNa](https://community.openhab.org/u/HaKuNa)\
**Post date:** [October 6, 2019, 6:33pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/23 "2019-10-06T18:33:57Z")

</div>

Im think about start developing a binding for husqvarna mowers. Currently I use the previously mentioned pyhusmow solution. But would like to have more flexibility, eg. set weekly timer. I started testing the Husqvarna Group API and the auth process is quite clear. I still have to test setting new timers. But I‘m optimistic to be successful there. Everything works fine manually with Postman. If someone has already started some work, it would be nice if the source can be shared somewhere.

---

<div class="post-metadata">

**Author:** ![Rado1](https://community.openhab.org/user_avatar/community.openhab.org/rado1/32/32585_2.png) [@Rado1](https://community.openhab.org/u/Rado1)\
**Post date:** [November 3, 2019, 9:32am UTC](https://community.openhab.org/t/automower-binding-g2/2854/24 "2019-11-03T09:32:58Z")

</div>

Hello how far are you with the binding?  
I would be happy to test it.

---

<div class="post-metadata">

**Author:** ![HaKuNa](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/c77e96/32.png) [@HaKuNa](https://community.openhab.org/u/HaKuNa)\
**Post date:** [November 4, 2019, 11:49am UTC](https://community.openhab.org/t/automower-binding-g2/2854/25 "2019-11-04T11:49:15Z")

</div>

I not really started, except setting up the development environment (which is up-and-running)  
My spare time is limited atm. But I hope to free more time from mid december. Anyway, my mower currently hangs around as the season is over 😉 I will post a new thread as soon something is ready to test.

---

<div class="post-metadata">

**Author:** ![tnemrap](https://community.openhab.org/user_avatar/community.openhab.org/tnemrap/32/61523_2.png) [@tnemrap](https://community.openhab.org/u/tnemrap)\
**Post date:** [November 4, 2019, 9:25pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/26 "2019-11-04T21:25:14Z")

</div>

If you have the source public on github I can help you with the development.

I am not a Java Guru but I have done some bindings.

/mike

---

<div class="post-metadata">

**Author:** ![tnemrap](https://community.openhab.org/user_avatar/community.openhab.org/tnemrap/32/61523_2.png) [@tnemrap](https://community.openhab.org/u/tnemrap)\
**Post date:** [February 5, 2020, 10:58am UTC](https://community.openhab.org/t/automower-binding-g2/2854/27 "2020-02-05T10:58:51Z")

</div>

Any updates on this?

---

<div class="post-metadata">

**Author:** ![tnemrap](https://community.openhab.org/user_avatar/community.openhab.org/tnemrap/32/61523_2.png) [@tnemrap](https://community.openhab.org/u/tnemrap)\
**Post date:** [March 17, 2020, 8:02am UTC](https://community.openhab.org/t/automower-binding-g2/2854/28 "2020-03-17T08:02:49Z")

</div>

Any updates on this?

---

<div class="post-metadata">

**Author:** ![hueso](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/7feea3/32.png) [@hueso](https://community.openhab.org/u/hueso)\
**Post date:** [March 17, 2020, 11:35am UTC](https://community.openhab.org/t/automower-binding-g2/2854/29 "2020-03-17T11:35:14Z")

</div>

Hello,

I am working on a Rest Web-Service Interface based on an esp 8266. So needed Hardware would be about 4€. The first tests seems to work fine. I will hold you updated.

---

<div class="post-metadata">

**Author:** ![petxya](https://community.openhab.org/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@petxya](https://community.openhab.org/u/petxya)\
**Post date:** [May 11, 2020, 5:08pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/30 "2020-05-11T17:08:16Z")

</div>

Here’s how to control your Husqvarna Automower:

Create an Application at [Husqvarna Developer Portal](https://developer.1689.cloud/apps)  
You can log in with your Husqvarna Automower Connect app credentials (\<YOUR\_EMAIL\> & \<YOUR\_PASSWORD\>).

Add Authentication API and Automower Connect API to your application.

Take note of your Application key \<YOUR\_APPLICATION\_ID\> as you’ll need it later.

1. Get your ACCESS TOKEN:  
curl -X POST -d “grant\_type=password&client\_id=\<YOUR\_APPLICATION\_ID\>&username=\<YOUR\_EMAIL\>&password=\<YOUR\_PASSWORD\>” [https://api.authentication.husqvarnagroup.dev/v1/oauth2/token](https://api.authentication.husqvarnagroup.dev/v1/oauth2/token)

2. Get your MOWER ID (in case you don’t know):  
curl -X GET “[https://api.amc.husqvarna.dev/v1/mowers](https://api.amc.husqvarna.dev/v1/mowers)”  
-H “accept: application/vnd.api+json”  
-H “X-Api-Key: \<YOUR\_APPLICATION\_ID\>”  
-H “Authorization: Bearer \<ACCESS\_TOKEN\>”  
-H “Authorization-Provider: husqvarna”

Here’s your mower ID:  
{  
“data”: [  
{  
“type”: “mower”,  
“id”: “\<MOWER\_ID\>”,

1. Get info on your mower:  
curl -X GET “[https://api.amc.husqvarna.dev/v1/mowers/](https://api.amc.husqvarna.dev/v1/mowers/)\<MOWER\_ID\>”  
-H “accept: application/vnd.api+json”  
-H “X-Api-Key: \<YOUR\_APPLICATION\_ID\>”  
-H “Authorization: Bearer \<ACCESS\_TOKEN\>”  
-H “Authorization-Provider: husqvarna”

2. Command your mower, some examples:  
Start mower, duration 10 minutes:  
curl -X POST “[https://api.amc.husqvarna.dev/v1/mowers/](https://api.amc.husqvarna.dev/v1/mowers/)\<MOWER\_ID\>/actions”  
-H “accept: _/_”  
-H “X-Api-Key: \<YOUR\_APPLICATION\_ID\>”  
-H “Authorization: Bearer \<ACCESS\_TOKEN\>”  
-H “Authorization-Provider: husqvarna”  
-H “Content-Type: application/vnd.api+json”  
-d “{"data":{"type":"Start","attributes":{"duration":10}}}”

Park duration 30 minutes:  
curl -X POST “[https://api.amc.husqvarna.dev/v1/mowers/](https://api.amc.husqvarna.dev/v1/mowers/)\<MOWER\_ID\>/actions”  
-H “accept: _/_”  
-H “X-Api-Key: \<YOUR\_APPLICATION\_ID\>”  
-H “Authorization: Bearer \<ACCESS\_TOKEN\>”  
-H “Authorization-Provider: husqvarna”  
-H “Content-Type: application/vnd.api+json”  
-d “{"data":{"type":"Park","attributes":{"duration":30}}}”

ParkUntilNextSchedule:  
curl -X POST “[https://api.amc.husqvarna.dev/v1/mowers/](https://api.amc.husqvarna.dev/v1/mowers/)\<MOWER\_ID\>/actions”  
-H “accept: _/_”  
-H “X-Api-Key: \<YOUR\_APPLICATION\_ID\>”  
-H “Authorization: Bearer \<ACCESS\_TOKEN\>”  
-H “Authorization-Provider: husqvarna”  
-H “Content-Type: application/vnd.api+json”  
-d “{"data":{"type":"ParkUntilNextSchedule"}}”

ResumeSchedule:  
curl -X POST “[https://api.amc.husqvarna.dev/v1/mowers/](https://api.amc.husqvarna.dev/v1/mowers/)\<MOWER\_ID\>/actions”  
-H “accept: _/_”  
-H “X-Api-Key: \<YOUR\_APPLICATION\_ID\>”  
-H “Authorization: Bearer \<ACCESS\_TOKEN\>”  
-H “Authorization-Provider: husqvarna”  
-H “Content-Type: application/vnd.api+json”  
-d “{"data":{"type":"ResumeSchedule"}}”

Further commands here:

> **[Husqvarna Developer Portal](https://developer.husqvarnagroup.cloud/apis/Automower+Connect+API)**
>
> Husqvarna Group - Developer Portal

It all works for me nicely and smoothly. But pretty please can someone of you guys make a rule or phtyon script out of it?

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![ulfc](https://community.openhab.org/letter_avatar_proxy/v4/letter/u/ce7236/32.png) [@ulfc](https://community.openhab.org/u/ulfc)\
**Post date:** [May 24, 2020, 10:24am UTC](https://community.openhab.org/t/automower-binding-g2/2854/31 "2020-05-24T10:24:25Z")

</div>

I tried the API, using the HTTP Binding. First I got an access token using the command line

```auto
curl -X POST -d \ 
"grant_type=password&client_id=<APP KEY>&username=<USERNAME>&password<PASSWORD>" \ 
https://api.authentication.husqvarnagroup.dev/v1/oauth2/token

```

Then using that access token in an item like this:

```auto
Number AutomowerBattery "AutomowerBattery [%d]" <battery> { http="<[https://api.amc.husqvarna.dev/v1/mowers{Authorization=Bearer <ACCESS_TOKEN>&Authorization-Provider=husqvarna&X-Api-Key=<YOUR_APPLICATION_ID>}:60000:JSONPATH($..battery.batteryPercent)]" }

```

It works fine until the token expires, of course. I haven’t done more than this. I guess the next step could be to manage tokens as described here:  
https://community.openhab.org/t/oauth2-using-just-oh-rules-and-myopenhab-org/46680

---

<div class="post-metadata">

**Author:** ![markus\_pfleger](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@markus\_pfleger](https://community.openhab.org/u/markus_pfleger)\
**Post date:** [June 9, 2020, 6:53pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/32 "2020-06-09T18:53:02Z")

</div>

I am currently working on an Automower Binding and want to contribute it once it is working. Not that far yet, just the login working 🙂  
I will post an update here once I have something useful

---

<div class="post-metadata">

**Author:** ![markus\_pfleger](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@markus\_pfleger](https://community.openhab.org/u/markus_pfleger)\
**Post date:** [July 3, 2020, 7:18pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/33 "2020-07-03T19:18:03Z")

</div>

This would be the binding I was talking about: [https://github.com/openhab/openhab-addons/pull/8050](https://github.com/openhab/openhab-addons/pull/8050)

It is not yet merged but still a pull request. If someone is interested you can take it from my fork at: [GitHub - maxpg/openhab-addons: Add-ons for openHAB](https://github.com/maxpg/openhab-addons)

---

<div class="post-metadata">

**Author:** ![g\_g\_rich](https://community.openhab.org/letter_avatar_proxy/v4/letter/g/e95f7d/32.png) [@g\_g\_rich](https://community.openhab.org/u/g_g_rich)\
**Post date:** [July 3, 2020, 8:53pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/34 "2020-07-03T20:53:16Z")

</div>

Hi @markus_pfleger .  
Thanks for working on this. I’d be happy to test this. You have a .jar you can upload here?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Rado1](https://community.openhab.org/user_avatar/community.openhab.org/rado1/32/32585_2.png) [@Rado1](https://community.openhab.org/u/Rado1)\
**Post date:** [July 4, 2020, 4:19pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/35 "2020-07-04T16:19:01Z")

</div>

> **[Dropbox](https://www.dropbox.com/sh/5fzi862xju2gqa4/AACWdIJ4BmPUCUsuaEcnX1fla?dl=0)**

---

<div class="post-metadata">

**Author:** ![Dibbler42](https://community.openhab.org/user_avatar/community.openhab.org/dibbler42/32/56084_2.png) [@Dibbler42](https://community.openhab.org/u/Dibbler42)\
**Post date:** [July 4, 2020, 5:11pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/37 "2020-07-04T17:11:57Z")

</div>

Great, Created Bridge, automower is found, next i have to learn about the commands.

Thanks for your Work

---

<div class="post-metadata">

**Author:** ![g\_g\_rich](https://community.openhab.org/letter_avatar_proxy/v4/letter/g/e95f7d/32.png) [@g\_g\_rich](https://community.openhab.org/u/g_g_rich)\
**Post date:** [July 4, 2020, 5:48pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/38 "2020-07-04T17:48:23Z")

</div>

Binding info can be found on his github.

> **[openhab-addons/bundles/org.openhab.binding.automower at automower ·...](https://github.com/maxpg/openhab-addons/tree/automower/bundles/org.openhab.binding.automower)**
>
> Add-ons for openHAB. Contribute to maxpg/openhab-addons development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![markus\_pfleger](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@markus\_pfleger](https://community.openhab.org/u/markus_pfleger)\
**Post date:** [July 5, 2020, 7:32am UTC](https://community.openhab.org/t/automower-binding-g2/2854/39 "2020-07-05T07:32:35Z")

</div>

I tried to upload the jar file directly to allow testing without building it locally. Unfortunately I am not sure how to do it without affecting my pull request…

For a documentation regarding commands make sure to have a look at “openhab-addons/bundles/org.openhab.binding.automower/README.md”

---

<div class="post-metadata">

**Author:** ![g\_g\_rich](https://community.openhab.org/letter_avatar_proxy/v4/letter/g/e95f7d/32.png) [@g\_g\_rich](https://community.openhab.org/u/g_g_rich)\
**Post date:** [July 5, 2020, 8:52pm UTC](https://community.openhab.org/t/automower-binding-g2/2854/40 "2020-07-05T20:52:12Z")

</div>

@markus_pfleger, installed the build that @Rado1 uploaded, working great so far.  
Wondering if you can add a channel for next start time?

---

<div class="post-metadata">

**Author:** ![markus\_pfleger](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@markus\_pfleger](https://community.openhab.org/u/markus_pfleger)\
**Post date:** [July 6, 2020, 5:53am UTC](https://community.openhab.org/t/automower-binding-g2/2854/41 "2020-07-06T05:53:43Z")

</div>

Hi @g_g_rich,

sure, I can add such a channel. Don’t needed it for my use cases, but should be easy to add.  
Not sure when I have time, but most likely it should be possible sometime later this week or during the next weekend.

Markus

[Previous page](https://community.openhab.org/t/automower-binding-g2/2854.md?page=1)

[Next page](https://community.openhab.org/t/automower-binding-g2/2854.md?page=3)
