Skip to content

Automower Binding ​

This is the binding for Husqvarna Automower® robotic lawn mowers.

This binding allows you to integrate, view and control Husqvarna Automower® lawn mowers in the openHAB environment.

Supported Things ​

bridge: The bridge needs to be configured with credentials and an application key that allows communicating with the Automower® Connect API

automower: A single Husqvarna Automower® robot

work-area: A single Husqvarna Automower® work-area and the related schedule which is configured for a Husqvarna Automower®

stay-out-zone: A single stay-out zone which is configured for a Husqvarna Automower®

All Husqvarna Automower® models with "Automower® Connect" should be supported. It was tested with a Husqvarna Automower® 430X, 450X and 430X NERA.

Discovery ​

Once the bridge is created and configured, openHAB will automatically discover all Automower® robots registered on your account.

If supported by your mower, work-areas and stay-out zones, configured via your Automower® App, will be discovered as well.

Thing Configuration ​

bridge:

  • appKey (mandatory): The Application Key is required to communicate with the Automower® Connect API. It can be obtained by registering an Application on the Husqvarna Website. This application also needs to be connected to the "Authentication API" and the "Automower® Connect API".
  • appSecret (mandatory): The Application Secret is required to communicate with the Automower® Connect API. It can be obtained by registering an Application on the Husqvarna Website.
  • pollingInterval (optional): How often the current Automower® states should be polled in seconds via REST API. Valid range is 1-86400 seconds. Default is 5min (300s).
  • requestTimeout (optional): Maximum time to wait for an Automower® Connect REST API response in seconds. Valid range is 1-300 seconds. Default is 30s.

Keep in mind that the REST API should not be queried too frequently. According to Husqvarna's guidelines, each application key is limited to 10.000 requests per month and 1 request per second.

With the default polling interval of 5min, the bridge will make approximately 8.640 requests per month. As the states are polled from the bridge, the number does not scale with the number of automower.

In addition to periodic polling, the binding also receives event-triggered notifications whenever there are changes to the Automower®'s status, position, settings, or messages.

automower:

  • mowerZoneId (optional): Time zone of the Automower® (e.g. Europe/Berlin). Default is the time zone of the system.
  • minCuttingHeightCm (optional, advanced): Minimum cutting height in cm used to convert the raw mower and work-area values. Leave empty to keep the raw values as the only active state.
  • maxCuttingHeightCm (optional, advanced): Maximum cutting height in cm used to convert the raw mower and work-area values. If both values are configured, the calculated cm channels are updated and the work-area range is inherited from the mower.

work-area:

  • none

stay-out-zone:

  • none

Channels ​

automower Channels ​

Status Channels ​

These channels represent the Automower® status.

channeltypeaccess modedescriptionadvanced
status#nameStringRThe name of the mowerfalse
status#modeStringRThe current mode (MAIN_AREA, SECONDARY_AREA, HOME, DEMO, UNKNOWN)false
status#activityStringRThe current activity (UNKNOWN, NOT_APPLICABLE, MOWING, GOING_HOME, CHARGING, LEAVING, PARKED_IN_CS, STOPPED_IN_GARDEN)false
status#inactive-reasonStringRThe current reason for being inactive (NONE, PLANNING, SEARCHING_FOR_SATELLITES)false
status#stateStringRThe current state (UNKNOWN, NOT_APPLICABLE, PAUSED, IN_OPERATION, WAIT_UPDATING, WAIT_POWER_UP, RESTRICTED_NONE, RESTRICTED_WEEK_SCHEDULE, RESTRICTED_PARK_OVERRIDE, RESTRICTED_SENSOR, RESTRICTED_DAILY_LIMIT, RESTRICTED_FOTA, RESTRICTED_FROST, RESTRICTED_ALL_WORK_AREAS_COMPLETED, RESTRICTED_EXTERNAL, OFF, STOPPED, ERROR, FATAL_ERROR, ERROR_AT_POWER_UP)false
status#work-area-id1NumberRId of the active Work Areatrue
status#work-area1StringRName of the active Work Areafalse
status#last-updateDateTimeRThe time when the mower sent the last updatefalse
status#last-poll-updateDateTimeRThe time when the binding polled the last update from the cloudtrue
status#poll-updateSwitchR/WPoll mower status update from the cloud (sendCommand(ON))true
status#batteryNumber:DimensionlessRThe battery state of charge in percentfalse
status#error-codeNumberR/WThe current error code. sendCommand(0) to confirm current non fatal errortrue
status#error-messageStringRThe current error messagefalse
status#error-timestampDateTimeRThe timestamp when the current error occurredfalse
status#error-confirmable1SwitchRIf the mower has an error, this attribute states if the error is confirmabletrue
status#next-startDateTimeRThe time for the next scheduled start. If the mower is charging then the value is the estimated time when it will leave the charging station. If the mower is about to start now, the value is NULLfalse
status#override-actionStringRThe action that overrides the current planner operationtrue
status#restricted-reasonStringRThe reason that restrics the current planner operation (NONE, WEEK_SCHEDULE, PARK_OVERRIDE, SENSOR, DAILY_LIMIT, FOTA, FROST, ALL_WORK_AREAS_COMPLETED, EXTERNAL)false
status#external-reasonStringRAn external reason set by i.e. Google Assistant or Amazon Alexa that restrics the current planner operationtrue
status#positionLocationRLast GPS Position of the mowerfalse

Settings Channels ​

These channels hold Automower® settings.

channeltypeaccess modedescriptionadvanced
setting#cutting-heightNumberR/WPrescaled cutting height, Range: 1-9false
setting#headlight-mode1StringR/WHeadlight Mode (ALWAYS_ON, ALWAYS_OFF, EVENING_ONLY, EVENING_AND_NIGHT)false
setting#cutting-height-cm3Number:LengthR/WCalculated cutting height in cm; commands set the nearest mower settingtrue

The advanced setting#cutting-height-cm channel reports the calculated cutting height in cm when both mower height limits are configured. Commands are mapped to the nearest supported raw mower setting.

The absolute cutting height can be calculated from the prescaled cutting height using the following formula:

cuttingHeightInCM = round((minCuttingHeight + ((maxCuttingHeight - minCuttingHeight) * (setting#cutting-height - 1) / 8)) * 2) / 2

Statistics Channels ​

These channels hold different Automower® statistics.

channeltypeaccess modedescriptionadvanced
statistic#cutting-blade-usage-timeNumber:TimeR/WThe time since the last reset of the cutting blade usage counter. sendCommand(0) to resetfalse
statistic#down-timeNumber:TimeRThe time the mower has been disconnected from the cloudtrue
statistic#number-of-charging-cyclesNumberRNumber of charging cyclesfalse
statistic#number-of-collisionsNumberRTotal number of collisionsfalse
statistic#total-charging-timeNumber:TimeRTotal charging timefalse
statistic#total-cutting-timeNumber:TimeRTotal Cutting Timefalse
statistic#total-cutting-percentNumber:DimensionlessRTotal cutting time in percentfalse
statistic#total-drive-distanceNumber:LengthRTotal driven distancefalse
statistic#total-running-timeNumber:TimeRThe total running time (the wheel motors have been running)false
statistic#total-searching-timeNumber:TimeRThe total searching timefalse
statistic#total-searching-percentNumber:DimensionlessRThe total searching time in percentfalse
statistic#up-timeNumber:TimeRThe time the mower has been connected to the cloudtrue

Calendar Tasks Channels ​

These channels hold the different Calendar Task configurations in case the Automower® does not support Work Areas.

channeltypeaccess modedescriptionadvanced
calendar-task#<x>-task-startNumber:TimeR/WStart time relative to midnightfalse
calendar-task#<x>-task-durationNumber:TimeR/WDuration timefalse
calendar-task#<x>-task-mondaySwitchR/WEnabled on Mondaysfalse
calendar-task#<x>-task-tuesdaySwitchR/WEnabled on Tuesdaysfalse
calendar-task#<x>-task-wednesdaySwitchR/WEnabled on Wednesdaysfalse
calendar-task#<x>-task-thursdaySwitchR/WEnabled on Thursdaysfalse
calendar-task#<x>-task-fridaySwitchR/WEnabled on Fridaysfalse
calendar-task#<x>-task-saturdaySwitchR/WEnabled on Saturdaysfalse
calendar-task#<x>-task-sundaySwitchR/WEnabled on Sundaysfalse

<x> ... 01-#calendar-tasks

Stayout Zones Channels ​

Channels that are relevant for all Stayout Zones of this Automower®.

channeltypeaccess modedescriptionadvanced
stay-out-zone#dirty1SwitchRIf the stay-out zones are synchronized with the Husqvarna cloud. If the map is dirty you can not enable or disable a stay-out zonetrue

work-area Channels ​

Work Area Channels ​

These channels hold the different Work Area configurations.

channeltypeaccess modedescriptionadvanced
work-area#nameStringR/WName of the Work Areafalse
work-area#idNumberRUnique numeric ID of the Work Areatrue
work-area#typeStringRThe type of the Work Area, e.g. RANDOMtrue
work-area#cutting-heightNumber:DimensionlessR/WCutting height of the Work Area in percent. 0-100false
work-area#cutting-height-cm3Number:LengthR/WCalculated cutting height in cm; commands set the nearest whole percenttrue
work-area#use-global-cutting-heightSwitchRIf the Work Area uses the global cutting height instead of its owntrue
work-area#enabledSwitchR/WIf the Work Area is enabled or disabledfalse
work-area#schedulableSwitchRIf the Work Area can be scheduledtrue
work-area#progress2NumberRThe progress on a Work Areatrue
work-area#last-time-completed2DateTimeRTimestamp when the Work Area was last completedtrue
work-area#last-time-abandonedDateTimeRTimestamp when the Work Area was last abandonedtrue
work-area#orientationNumber:AngleR/WOrientation of the mowing pattern in degrees. Pattern based Work Areas onlytrue
work-area#orientation-shiftNumber:AngleR/WOrientation shift of the mowing pattern in degrees. Pattern based Work Areas onlytrue

The advanced work-area#cutting-height-cm channel reports the calculated height using the limits inherited from the mower. Commands within that range are mapped to the nearest whole percent (0-100). The inherited minimum and maximum are also visible as work-area properties.

Both cm channels accept length commands such as 4.5 cm or 45 mm, and unitless numeric commands are interpreted as centimeters. Values outside the configured range, incompatible units, and commands without valid height limits are ignored.

Calendar Tasks Channels (Work Area) ​

These channels hold the different Calendar Task configurations which belong to the Work Area of the same Thing.

channeltypeaccess modedescriptionadvanced
calendar-task#<x>-task-startNumber:TimeR/WStart time relative to midnightfalse
calendar-task#<x>-task-durationNumber:TimeR/WDuration timefalse
calendar-task#<x>-task-mondaySwitchR/WEnabled on Mondaysfalse
calendar-task#<x>-task-tuesdaySwitchR/WEnabled on Tuesdaysfalse
calendar-task#<x>-task-wednesdaySwitchR/WEnabled on Wednesdaysfalse
calendar-task#<x>-task-thursdaySwitchR/WEnabled on Thursdaysfalse
calendar-task#<x>-task-fridaySwitchR/WEnabled on Fridaysfalse
calendar-task#<x>-task-saturdaySwitchR/WEnabled on Saturdaysfalse
calendar-task#<x>-task-sundaySwitchR/WEnabled on Sundaysfalse

<x> ... 01-#calendar-tasks

stay-out-zone Channels ​

These channels hold the different Stayout Zone configurations.

channeltypeaccess modedescriptionadvanced
name1StringRThe name of the stay-out zonetrue
enabled1SwitchR/WIf the stay-out zone is enabled, the mower will not access the zonetrue

Messages ​

These channels hold the last message recorded by the Automower®.

channeltypeaccess modedescriptionadvanced
message#msg-timestampDateTimeRThe time when the last error occurredtrue
message#msg-codeNumberRThe last error codetrue
message#msg-textStringRThe last error messagetrue
message#msg-severityStringRThe severity of the last errortrue
message#msg-positionLocationRGPS position of the last event (if available)true

Command Channels ​

Command channels that trigger actions.

channeltypeaccess modedescriptionadvanced
command#startNumberWStart the mower for the given duration, overriding the schedulefalse
command#start-in-workareaNumberWStart the mower in the given Work Area, overriding the schedule. The mower will continue foreverfalse
command#resume-scheduleSwitchWResume the schedule of the mowerfalse
command#pauseSwitchWPause the mower at the current location until manual resumefalse
command#parkNumberWPark the mower for the given duration, overriding the schedulefalse
command#park-until-next-scheduleSwitchWPark the mower, fully charge it and start afterwards according to the schedulefalse
command#park-until-further-noticeSwitchWPark the mower until it is started again by the start action/command or the schedule gets resumedfalse

Actions ​

The following actions are available for automower things:

action nameargumentsdescription
startduration (long)Start the mower for the given duration (minutes), overriding the schedule
startInWorkAreaworkAreaId (long)
duration (long)
Start the mower in the given Work Area for the given duration (minutes), overriding the schedule. If duration is skipped the mower will continue forever
pause-Pause the mower at the current location until manual resume
parkduration (long)Park the mower for the given duration (minutes), overriding the schedule
parkWithExternalReasonduration (long)
externalReason (long)
Park the mower for the given duration (minutes) with an external reason, overriding the schedule. externalReason must be in the range 200000-299999, maximum duration is 1500 minutes
parkUntilNextSchedule-Park the mower, fully charge it and start afterwards according to the schedule
parkUntilFurtherNotice-Park the mower until it is started again by the start action/command or the schedule gets resumed
resumeSchedule-Resume the schedule of the mower
confirmError-Confirm current non fatal error
resetCuttingBladeUsageTime-Reset the cutting blade usage time
setSettingsbyte cuttingHeight
String headlightMode
Update mower settings
setWorkArealong workAreaId
boolean enable
byte cuttingHeight
Update Work Area settings
setWorkAreaNamelong workAreaId
String name
Update the name of a Work Area
setWorkAreaOrientationlong workAreaId
int orientation
int orientationShift
Update the mowing pattern orientation of a Work Area. Pattern based Work Areas only
setStayOutZoneString zoneId
boolean enable
Enable or disable stay-out zone
setCalendarTaskLong workAreaId (optional, set to null if the mower doesn't support Work Areas)
short[] start
short[] duration
boolean[] monday
boolean[] tuesday
boolean[] wednesday
boolean[] thursday
boolean[] friday
boolean[] saturday
boolean[] sunday
Update calendar task settings. Parameter are an array for all calendar tasks (per Work Area)
poll-Poll mower status update from the cloud

Full Example ​

automower.thing ​

dsl
Bridge automower:bridge:mybridge [ appKey="<your_private_application_key>", appSecret="<your_private_application_secret>", pollingInterval=300 ] {
    Thing automower     12345678-1234-12ab-1234-123456abcdef   [ ] // 1234... is an example of the mowerId recieved via discovery
    Thing work-area     12345678-1234-12ab-1234-123456abcdef-0 [ ] // mowerId followed by the areaId received via discovery (0 := main area)
    Thing stay-out-zone 87654321-4321-ba21-4321-fedcba654321   [ ] // 8765... is an example of the zoneId recieved via discovery
}

automower.items ​

dsl
String   Automower_Mode                       "Mode [%s]"                          { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#mode" }
String   Automower_Activity                   "Activity [%s]"                      { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#activity" }
String   Automower_State                      "State [%s]"                         { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#state" }
DateTime Automower_Last_Update                "Last Update"                        { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#last-update" }
Number   Automower_Battery                    "Battery [%d %%]"                    { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#battery" }
Number   Automower_Error_Code                 "Error Code [%d]"                    { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#error-code" }
DateTime Automower_Error_Time                 "Error Time"                         { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#error-timestamp" }
String   Automower_Override_Action            "Override Action [%s]"               { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#override-action" }
DateTime Automower_Next_Start_Time            "Next Start Time"                    { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#next-start" }
Location Automower_Position                   "Last Position"                      { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:status#position" }

Number   Automower_Command_Start              "Start mowing for duration [%d min]" { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:command#start" }
Switch   Automower_Command_Resume             "Resume the schedule"                { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:command#resume-schedule" }
Switch   Automower_Command_Pause              "Pause the automower"                { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:command#pause" }
Number   Automower_Command_Park               "Park for duration [%d min]"         { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:command#park" }
Switch   Automower_Command_Park_Next_Schedule "Park until next schedule"           { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:command#park-until-next-schedule" }
Switch   Automower_Command_Park_Notice        "Park until further notice"          { channel="automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef:command#park-until-further-notice" }

automower.sitemap ​

dsl
sitemap demo label="Automower"
{
    Frame {
        Text        item=Automower_Mode
        Text        item=Automower_Activity
        Text        item=Automower_State
        Text        item=Automower_Last_Update
        Text        item=Automower_Battery
        Text        item=Automower_Error_Code
        Text        item=Automower_Error_Time
        Text        item=Automower_Override_Action
        Text        item=Automower_Next_Start_Time
        Text        item=Automower_Position
    }
}

automower.rule ​

Example rule that triggers an Automower® action

rules
rule "AutomowerParkUntilFurtherNotice"
when
    Item Some_Item changed to ON
then
    // via command item
    Automower_Command_Park_Notice.sendCommand(ON)
    
    // alternative via actions
    val mowerActions = getActions("automower", "automower:automower:mybridge:12345678-1234-12ab-1234-123456abcdef")
    mowerActions.parkUntilFurtherNotice()
end

Footnotes ​

  • 1) ... Channel availability depends on Automower® capabilities ↩
  • 2) ... Channel available for EPOS Automower® and systematic mowing Work Area only ↩
  • 3) ... cm channels are available only when both mower cutting-height limits are configured with valid values ↩