Automower Binding (G2)

Would it be possible to implement the REFRESH command? I would like to force an update as soon as the tablet display switches on (… or to force updates in a 1 minute cycle as long as the display is on). For an interval of 10 minutes the mower could already be outside mowing but the status still parking …

thx!

When I set the polling interval to 10 seconds the update cycle stays at 5 minutes. Looks like there is a hard-coded lower limit in the bridge? Bad … because I do not want to wait that long if something changes …

Thanks for your answer, @markus_pfleger
It happens not after upgrade - it is not related to an update.

  • On Raspi the binding is working on 2.5.9 and 2.5.10 (and can connect).
  • Backup and restore to another Raspi: binding is working (and can connect)
  • Backup and restore into Synology-Docker: binding cannot connect (but configuration is absolutely the same compared with Raspi)

My suspicion: maybe docker is not allowing the network communication to Husqvarna? But how to check?
Did anyone try to use it within a openHAB Docker?

I don’t know how to do further checks - because docker does not allow too much configuration (e.g. I can not do a simple ping check to Husqvarna, or so)

Hey there, first of all, thanks for developing a automower binding, Markus!
Is there any possibility to implement the “next start” feature like in the app (e.g. "Next start tomorrow 10.00h)?
Would be very, very useful to use the binding for automating a mower garage.

Seems to be possible via the “nextStartTimestamp” (API documentation).

Thanks!

Hi @markus_pfleger,

just want to give an update on my issue - it is solved and you can ignore my other posting.
After doing a t lot of testing I created a new (additional) “application” at Husqvarna Website and connected that to “Automower Connect API” as well.
I configured the Automower Bridge with that new Application Key - and it worked again (in Docker).

Thanks for you nice binding,
regards, Kai

Same issue over here…
Running OpenHAB3 inside docker, never used husqvarna binding before, so I don’t now if its related to my recent upgrade to 3.
I created an application in the husqvarna portal and connected the 2 API’s to it (authentication & automower), now my log is saying:

2021-01-09 22:05:58.188 [WARN ] [ternal.bridge.AutomowerBridgeHandler] - Unable to fetch automowers: Rest call failed: statusCode=-1, message=Unable to authenticate

Don’t know where to look as i already recreted the application multiple times in the husvarna portal.
Is there anything I can check to see why authentication is failing?

Using the supplied test URL from husqvarna i’m able to authenticate succesful.

Workaround did the trick for me.

I was experiencing a lot of errors like these:

java.lang.IllegalStateException: Insufficient configured threads: required=13 < max=10 for QueuedThreadPool[common]@75f3f957{STARTED,5<=5<=10,i=5,q=0}[ReservedThreadExecutor@16f08868{s=0/1,p=0}]

Turns out after research that this has to do if you assign to much vCPU’s to your instance.
I downscaled to 4 vCPU’s with the effect that errors are gone, and directly this binding was working.
90% sure there is a relation, which could be logical when the binding uses Jetty to speak wit Husqvarna API.

I would like to start and stop my AM430X using two switches in OH.
With the rule-example on the openHAB Binding page I was able to park the Automower (immediately).
But I am too stupid… how to start the Automower outside the regular schedule?

I am aware that I need to disable the schedule for e.g. 3hours in main-area (using the AutoMower App).
But how to realize this in a OH rule? There is no switch to start mowing (but there is a switch to park).

Did anyone successful wrote a rule to start mowing outside the regular schedule?
Any hints are appreciated :smiley:

Hey there,

tried to find out how to get commands working.
Maybe someone can give me advice?
Got my automower connected and every known channel is working fine but every command gets quited with Script execution of rule with UID ‘automower’ failed: null in automaker.

Thanks

Hi jfi1310 - did you manage to get the nextStartTime value out with that binding? I also want to control my automower garagedoor with that kind of information but my binding isn´t providing anything like next starttime.

Thanks and best regards,
Mario

Not yet. The „next start“ timestamp is implemented within the latest version of the binding. But, as far as I understand, this version of the binding will be available in OpenHAB 3.1 (stable). So, I‘m waiting for the next stable version because I‘m not willed to use a milestone version

Thanks for your reply!

Hi Anpro,
did you manage to get the commands working? I´m also facing the same problem and the documentation isn´t that good…

Thank you!

Hi Mario,

I guess you face the same problem, but after Denis showed me the trick everything is working fine. Now I now longer use the husqvarna app. I plan my automower start and end time via iCal and use my homematic weather station to prevent my automower to start when my lawn is to wet.
But for the start you have to get the commands working.
The documentation is not wrong but in this point not very precise:

val mowerActions = getActions("automower", "automower:automower:mybridge:myAutomower")

The last part is important „myAutomower“ is not the OpenHAB ID it is the ID you get from the husqvarna API.
Then it worked for me! Let me know if you need help finding the ID.

Greetings
Andreas

Hi there,

i just installed the binding on a new system (OH3), created the bridge, but no mower appears in the inbox. The bridge is online and i get no hint in the openhab log.

Any ideas where to look?

HMMM with latest nightly i got now an error

2021-05-19 20:02:20.572 [ERROR] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://api.authentication.husqvarnagroup.dev/v1/oauth2/token failed with error code invalid_grant, description Invalid grant: refresh token is invalid
2021-05-19 20:02:20.584 [WARN ] [ternal.bridge.AutomowerBridgeHandler] - Unable to fetch automowers: Rest call failed: statusCode=-1, message=Unable to authenticate

I checked Key, user and password twice. should work.

Any ideas?

I was able to solve this. If anyone else is looking for the solution how to start and stop the mower…
To start the mower for e.g. 2 hours you need a rule:

val mowerActions = getActions("automower", "automower:automower:mybridge:<yourAutomowerID>")
mowerActions.start(120)

to stop the mower immediately:

val mowerActions = getActions("automower", "automower:automower:mybridge:<yourAutomowerID>")
mowerActions.ParkUntilNextSchedule()

I am using this to stop mowing e.g. in case of rain or other reasons.
Works perfect.

Is anyone else having problem to connect the bridge?

I get this error

2021-06-23 23:50:47.250 [ERROR] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://api.authentication.husqvarnagroup.dev/v1/oauth2/token failed with error code invalid_grant, description Failed to find token
2021-06-23 23:50:47.258 [WARN ] [ternal.bridge.AutomowerBridgeHandler] - Unable to fetch automowers: Rest call failed: statusCode=-1, message=Unable to authenticate

Hi Michael,

I am having the same problem (“Unable to authenticate”). I got my Automower only very recently, so I initially set it up 2 days ago.

The funny thing is that it worked at first. The Bridge Thing was online and I was able to discover the Automower as well. Everything worked.

Today, the bridge is offline and I can’t get it to work anymore. I’ve reset everything and created a new app key in the Husqvarna developer portal, double-checked the password and app key several times. Nothing helps. The terminal test works fine.

I am hoping for a solution.

PS: I am on openHAB 3.0.1