This application and driver provides Integration for Husqvarna AutoMower.
- This is the robot lawn mower: Residential Robotic Lawn Mowers | Husqvarna US
it allows you to monitor and control basic mower operations via the Husqvarna API.
It is available now in HPM
or
It consists of an application and a device hander (App will create the child devices once configured).
After you install you have to get an API key and secret from Husqvarna to securely connect to their API:
Instructions:
- Go to https://developer.husqvarnagroup.cloud
- Sign in with your AutoConnect credentials
- +Create application
- Name it, URI for redirect https://cloud.hubitat.com/oauth/stateredirect
- Connect this to authentication api and automower api
- after saving, note application key and application secret to enter into settings in 'AutoMower Connect' App on your HE system
DO NOT SHARE THIS KEY OR SECRET WITH OTHERS
-
Add app on HE
- HE console -> Apps -> "+ Add User App" and select Husqvarna Connect -
App during configuration will have you enter the API key/secret, and have you go thru the OAUTH process to connect securely to the Husqvarna API. The app will handle Oauth refreshes automatically.
-
Note: currently Husqvarna API allows a total of 10K requests a month per application (and they only let you create 1 per account). This app must poll so this must be taken into your decisions on polling rate.
-
This works out to shortest poll is every 5 minutes, with little remaining headroom so likely 10 - 15 minute polls are better
-
I don't know this, but I expect the mobile apps for these products from Husqvarna also share the total API limits, so longer poll times are likely your friend.
-
-
This API for Husqvarna is also used for their Gardena line of products (and they all share the above limit). I don't have these other products so I have not added drivers for them.
In addition to custom attributes based on the REST API from Husqvarna, the mower device also exposes battery, motion sensors, and power source.
- battery shows charge %
- motion is active while moving/mowing, and inactive when stopped, or parked.
- powersource is battery or mains (when charging)
Custom attributes:
-
mowerStatus -> MAIN_AREA, SECONDARY_AREA, HOME, DEMO, UNKNOWN
-
mowerActivity -> UNKNOWN, NOT_APPLICABLE, MOWING, GOING_HOME, CHARGING, LEAVING, PARKED_IN_CS, STOPPED_IN_GARDEN
-
mowerState -> UNKNOWN, NOT_APPLICABLE, PAUSED, IN_OPERATION, WAIT_UPDATING, WAIT_POWER_UP, RESTRICTED, OFF, STOPPED, ERROR, FATAL_ERROR, ERROR_AT_POWER_UP
-
mowerConnected -> TRUE or FALSE
-
mowerTimeStamp -> LAST TIME connected (EPOCH LONG)
-
errorCode -> current error code (long list with meanings in API site)
-
errorTimeStamp -> (EPOCH LONG)
-
plannerNextStart -> (EPOCH LONG)
-
plannerOverride -> Override Action
-
name
-
model
-
serialNumber
Commands supported:
- start(mins) - start mowing for x minutes
- pause - pause operation
- park(mins) - park for x minutes
- parkuntilnext - park until next schedule start
- parkindefinite - park until someone takes you out of park
- resumeSchedule - resume operations based on schedule settings
At some point I will add some apps. Initial thoughts:
- park the mower for rain event and time after (your lawn floods)
- don't let the mower operate if it is cold (or hot)
- don't have the mower show off during a party (or if something is turned on like the sprinklers)
- alert me if the mower is angry or otherwise bothered