[APP] Husqvarna Automower Connect

What I don’t get is that it seems to work for « old user », where the redirect URL wasn’t required.

Did Husqvarna release a new version of its API?

I also tried to give some dumb credential and the errors message was the same. Are we sure that the APPS is able to use the authentication API correctly (for users) ?

i changed the password to an pass without special char => still not working. seems that the truth is still out there

Same here getting the homey undefined error message. I can’t add my mower.

I am not 100% but i have a very strong suspicion as to what the problem is.

Husqvarna have changed the Auth API. When the application was written they used grant_type ‘password’ but now they use grant_type ‘client_credentials’ and i suspect they only support the old method for accounts created before a certain date.

Will make some more tests and will let you know the result.

New version 1.2.0 published to test https://homey.app/a/com.husqvarna.automower/test/

This will hopefully fix the issue @Mathijs_1971 @Hub0 @Tutu81 and others have experienced. This was likely due to a change in Husqvarna Auth API where the better grant_type client_credentials now is used in favor of grant_type password and is mandatory for new accounts.

There is a new setup parameter added called ‘app secret’. One must have either ‘username+password+appkey’ (old way kept for backwards compatibility) or the new preferred way ‘appkey+appsecret’. If all fields are filled out the new method will be used.

Compared to the ‘live’ version 1.0.1 the main changes are:

  • Added 33 new error codes from Husqvarna
  • Added ‘Next start’ capability that displays the scheduled next start.
  • Added support for Husqvarna Auth API changes
  • Added auth token caching (contribution from Theodor Storm)
  • New improved multiple mower support (contribution from Theodor Storm)¨

It would be great if some of you having this issue could test the new version using the link above :slight_smile:

Awesome! I can confirm this has fixed my authentication/device-adding issues. Multi mower support also works like a charm. Thanks! :partying_face:

Side note: this shows http://localhost:8080 is indeed the correct Redirect URL for setting up the app in the Husqvarna Developer portal, as suggested by @Krisstenswe. Husqvarna probably made the Redirect URL field mandatory for new accounts, along with changes in the Auth API. Might be good to add this info to installation guides for new users.

1 Like

Great work!

I’ve had the same issues as described. This version solved it!!

The redirect-url is used in the auth flow ‘authorization code’ which is not used in this app. So you should be able to use any url in the Husqvarna portal. But you have a good point that the documentation should reflect this as it now is mandatory. I will add this :slight_smile:

1 Like

Great to hear! Thanks for the feedback. :slight_smile:

Hi @BufferOverflow ,

Thanks for the update. Works now perfectly (just had to restart the app first).

1 Like

Thanks for update. After the 1.2.0 version both i can command both my 315X with Homey, park, resume etc. The bug where the app only sent commands to last polled mower looks fixed. I will update the forum if I experience any more bugs.