A Home Assistant integration to monitor Robonect
- MQTT listener
- REST API client
- All Robonect sensors (if MQTT enabled priority to MQTT sensors over REST)
- Automower lawn mower entity
- Automower vacuum entity (remains until the lawn mower entity, introduced in 2023.9 will be fully developed)
- Buttons (change mode, start, stop, return home, ...)
- Service calls to Robonect actions, like scheduling a job, modifying a timer
MQTT sensors (when enabled) are enabled prior to the REST sensors, as they update faster.
The REST sensors, are updated on a configurable scan interval. When the mower is sleeping, only the status sensors are being updated (since the others have no activity and updating them would wake up the mower, resuling in a beep every time a scan happens). Example here: Rest sensor and the REST category
- Robonect for Home Assistant
Using HACS (recommended)
Click on this button:
or follow these steps:
- Simply search for
Robonect
in HACS and install it easily. - Restart Home Assistant
- Add the 'Robonect' integration via HA Settings > 'Devices and Services' > 'Integrations'
- Provide your Robonect configuration details
- Copy the
custom_components/robonect
directory of this repository asconfig/custom_components/robonect
in your Home Assistant instalation. - Restart Home Assistant
- Add the 'robonect' integration via HA Settings > 'Devices and Services' > 'Integrations'
- Provide your Robonect configuration details
This integration will set up the following platforms.
Platform | Description |
---|---|
robonect |
Home Assistant component for Robonect |
If you want to contribute to this please read the Contribution guidelines
- I am missing a lot of sensors: please check that the MQTT topic you have entered in the HA config flow equals the MQTT topic in Robonect
To enable debug logging, go to Settings -> Devices & Services and then click the triple dots for the Robonect integration and click Enable Debug Logging.
Once you enable debug logging, you ideally need to make the error happen. Run your automation, change up your device or whatever was giving you an error and then come back and disable Debug Logging. Disabling debug logging is the same as enabling, but now you will see Disable Debug Logging. After you disable debug logging, it will automatically prompt you to download your log file. Please provide this logfile.
Define a daily mowing time sensor by adding the followinng lines to your configuration.yaml:
sensor:
- platform: history_stats
name: Daily mowing time
entity_id: sensor.automower_mower_status
state: 2
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
In template.yaml, add the following:
- sensor:
- name: "Automower Battery Current"
unique_id: "sensor.automower_battery_current"
unit_of_measurement: "mA"
state: "{{ state_attr('sensor.automower_battery_0', 'current') | replace(' mA', '') | int(0) }}"
icon: "mdi:current-dc"
- name: "Automower Battery Voltage"
unique_id: "sensor.automower_battery_voltage"
unit_of_measurement: "V"
state: "{{ state_attr('sensor.automower_battery_0', 'voltage') | replace(' V', '') | float(0) }}"
icon: "mdi:sine-wave"
- name: "Automower Battery Temperature"
unique_id: "sensor.automower_battery_temperature"
unit_of_measurement: "°C"
state: "{{ state_attr('sensor.automower_battery_0', 'temperature') | replace(' °C', '') | float(0) }}"
icon: "mdi:temperature-celsius"
- name: "Automower Battery Capacity"
unique_id: "sensor.automower_battery_capacity"
unit_of_measurement: "mAh"
state: "{{ state_attr('sensor.automower_battery_0', 'capacity').remaining | replace(' mAh', '') | int(0) }}"
icon: "mdi:battery-charging-medium"
Show markdown code
The example uses the following custom lovelace cards:
- custom:button-card: https://github.com/custom-cards/button-card
- custom:mini-graph-card: https://github.com/kalkih/mini-graph-card
type: vertical-stack
cards:
- card:
content: " "
card_mod:
style: |
ha-card {
color: white;
font-variant: small-caps;
background-color: red;
text-align: center
}
title: Automower needs help
type: markdown
conditions:
- entity: sensor.automower_mower_status
state: "7"
type: conditional
- type: conditional
conditions:
- condition: state
entity: binary_sensor.automower_winter_mode
state: "off"
card:
type: custom:stack-in-card
mode: vertical
keep:
border_radius: true
cards:
- type: horizontal-stack
cards:
- entity: sensor.automower_mower_status_duration
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: sensor.automower_mower_blades_quality
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: binary_sensor.automower_health_alarm
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: sensor.automower_mower_distance
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: sensor.automower_mower_battery_charge
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: sensor.automower_wlan_rssi
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: sensor.automower_health_climate_temperature
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- entity: sensor.automower_health_climate_humidity
show_entity_picture: true
show_name: false
font-size: 11px
show_state: true
show_label: true
styles:
card:
- height: 40px
- padding: 5px
- margin-top: 10px
- border-top: 1px solid var(--state-icon-color)
- border: 0px solid var(--primary-background-color)
- font-size: 11px
type: custom:button-card
- type: conditional
conditions:
- entity: binary_sensor.automower_mower_stopped
state: "on"
card:
show_name: false
label: Automower is currently stopped.<br> Click here to start.
show_label: true
show_icon: true
layout: icon_label
type: custom:button-card
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.automower_start
entity: button.automower_start
styles:
icon:
- height: 30px
card:
- border: 0px solid var(--primary-background-color)
- background: var(--warning-color)
- font-size: 11px
- border-radius: 10px
- "--keep-background": "true"
- type: conditional
conditions:
- entity: sensor.automower_mower_timer_next_unix
state_not: unknown
card:
type: markdown
content: >
{% set time = states.sensor.automower_mower_timer_next_unix.state|as_datetime %}
{% if time is not none %}
{% set day = as_timestamp(time)|timestamp_custom('%d', true)|int %}
{% set weekday = as_timestamp(time)|timestamp_custom('%w', true)|int %}
{% set month = as_timestamp(time)|timestamp_custom('%m', true)|int -1 %}
{% set weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][weekday] %}
{% set month = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][month] %}
Next start scheduled on {{weekday}} {{day}} {{month}} at {{ as_timestamp(time)|timestamp_custom('%H:%M', true) }}
{% else %}
No scheduled start time available.
{% endif %}
card_mod:
style: |
ha-card {
border-width: 0;
text-align: center;
}
- type: conditional
conditions:
- entity: binary_sensor.automower_weather_data_break
state: "on"
card:
type: markdown
content: >
{% set data = {'toorainy': 'teveel regen', 'toocold': 'te koud',
'toowarm': 'te warm', 'toodry': 'te droog', 'toowet': 'te nat',
'day': 'overdag', 'night': '\'s nachts'} -%} Botje is gestopt
omwille van het weer: {% for condition,value in
state_attr('binary_sensor.automower_weather_service',
'weather').condition.items() -%} {% if value -%}
{{data[condition]}} {% endif -%} {% endfor -%}
card_mod:
style: |
ha-card {
border-width: 0;
text-align: center;
}
- type: tile
entity: lawn_mower.automower_robonect
show_entity_picture: true
vertical: true
features:
- type: lawn-mower-commands
commands:
- start_pause
- dock
card_mod:
style: |
ha-card {
border-width: 0;
}
- type: horizontal-stack
style: |
ha-card {
margin-left: 10px;
}
cards:
- show_name: false
show_icon: true
type: custom:button-card
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.automower_auto
entity: button.automower_auto
styles:
card:
- height: 40px
- border: 0px solid var(--primary-background-color)
- background: |
[[[
if (states['sensor.automower_mower_mode'].state == '0' )
return 'var(--state-vacuum-17-color, var(--state-vacuum-active-color, var(--state-active-color)))'
return ''
]]]
- font-size: 11px
- border-radius: 10px
- "--keep-background": "true"
- show_name: false
show_icon: true
type: custom:button-card
entity: button.automower_man
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.automower_man
styles:
card:
- height: 40px
- border: 0px solid var(--primary-background-color)
- background: |
[[[
if (states['sensor.automower_mower_mode'].state == '1' )
return 'var(--state-vacuum-17-color, var(--state-vacuum-active-color, var(--state-active-color)))'
return ''
]]]
- font-size: 11px
- "--keep-background": "true"
- show_name: false
show_icon: true
type: custom:button-card
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.automower_eod
entity: button.automower_eod
styles:
card:
- height: 40px
- border: 0px solid var(--primary-background-color)
- background: |
[[[
if (states['sensor.automower_mower_mode'].state == '2' )
return 'var(--state-vacuum-17-color, var(--state-vacuum-active-color, var(--state-active-color)))'
return ''
]]]
- font-size: 11px
- "--keep-background": "true"
- type: horizontal-stack
cards:
- type: gauge
entity: sensor.automower_battery_current
needle: true
min: -1500
max: 1500
segments:
- from: -1500
color: var(--info-color)
- from: 0
color: var(--success-color)
name: Stroom
card_mod:
style: |
ha-card {
border-width: 0;
border-radius: 0
}
- type: gauge
entity: sensor.automower_battery_voltage
needle: true
min: 0
max: 30
segments:
- from: 0
color: var(--error-color)
- from: 17.2
color: var(--warning-color)
- from: 19.3
color: var(--success-color)
name: Spanning
card_mod:
style: |
ha-card {
border-width: 0;
border-radius: 0
}
- type: gauge
entity: sensor.automower_battery_capacity
needle: true
min: 0
max: 1600
segments:
- from: 0
color: var(--error-color)
- from: 200
color: var(--warning-color)
- from: 800
color: var(--success-color)
name: Capaciteit
card_mod:
style: |
ha-card {
border-width: 0;
border-radius: 0
}
- type: gauge
entity: sensor.automower_battery_temperature
needle: true
min: -10
max: 50
segments:
- from: -10
color: var(--error-color)
- from: 0
color: var(--warning-color)
- from: 10
color: var(--success-color)
- from: 30
color: var(--warning-color)
name: Temp
card_mod:
style: |
ha-card {
border-width: 0;
border-radius: 0
}
- type: conditional
conditions:
- condition: state
entity: binary_sensor.automower_winter_mode
state: "on"
card:
show_name: true
show_icon: true
type: button
tap_action:
action: more-info
entity: binary_sensor.automower_winter_mode
name: Wintermode
hold_action:
action: none
- type: conditional
conditions:
- condition: state
entity: binary_sensor.automower_winter_mode
state: "off"
card:
aggregate_func: max
entities:
- entity: sensor.daily_mowing_time
group_by: date
hour24: true
hours_to_show: 360
line_color: green
name: Dagelijkse maaitijd
show:
graph: bar
icon: false
type: custom:mini-graph-card
- Name:
start
- Description: Starts the Robonect mower.
- Name:
stop
- Description: Stops the Robonect mower.
- Name:
reboot
- Description: Reboots the Robonect mower.
- Name:
shutdown
- Description: Shuts the Robonect mower down.
- Name:
sleep
- Description: Sets the Robonect mower to sleep mode.
- Name:
operation_mode
- Description: Sets the operation mode of the Robonect mower.
- Fields:
mode
: Operation mode of the mower.- Example:
"eod"
- Default:
"auto"
- Options:
"man"
"auto"
"eod"
"home"
- Example:
- Fields:
- Name:
job
- Description: The mower performs a mowing job.
- Fields:
entity_id
: The entity ID of the Robonect vacuum.- Example:
vacuum.automower_robonect
- Example:
start
: Start time in 'hh:mm'. If omitted, the job starts immediately.- Example:
"10:00"
- Example:
end
: End time in 'hh:mm'.- Example:
"13:00"
- Example:
duration
: Duration of the job in minutes. Omitted if the end is set.- Example:
145
- Min:
1
- Max:
10080
- Example:
after
: Mode activated after the job is done.- Example:
"Auto"
- Default:
"Auto"
- Options:
"Auto"
"Home"
"End of day"
- Example:
corridor
: Corridor width. Defaults to "Normal" if omitted.- Example:
"Normal"
- Options:
"Normal"
"0"
to"9"
- Example:
remotestart
: Remote mowing starting point.- Default:
"Normal"
- Options:
"Normal"
"From charging station"
"Remote start 1"
to"Remote start 5"
- Default:
- Fields:
- Name:
timer
- Description: Modify a Robonect timer.
- Fields:
entity_id
: The entity ID of the Robonect vacuum.- Example:
vacuum.automower_robonect
- Example:
timer
: Timer ID.- Example:
"1"
- Default:
"1"
- Options:
"1"
to"14"
- Example:
enable
: Enable or disable the timer.start
: Start time in 'hh:mm'.- Example:
"10:00"
- Example:
end
: End time in 'hh:mm'.- Example:
"13:00"
- Example:
weekdays
: Select the weekdays for the timer.- Options:
Monday
,Tuesday
,Wednesday
,Thursday
,Friday
,Saturday
,Sunday
- Options:
- Fields:
- Name:
ext
- Description: Control GPIO or OUT channels, set modes, handle errors, and signal inversion.
- Fields:
entity_id
: The entity ID of the Robonect mower.- Example:
vacuum.automower_robonect
- Example:
ext
: External equipment selection.- Options:
GPIO1
,GPIO2
,OUT1
,OUT2
- Options:
gpioout
: Select the GPIO channel mode.- Options:
[IN] Analog
,[IN] Floating
,[IN] PullDown
,[IN] PullUp
,[OUT] OpenDrain
,[OUT] PushPull
- Options:
gpiomode
: Select the mode for GPIO/OUT operation.- Options:
Off
,On
,Night (19-7 o'clock)
,Drive
,Night drive (19-7 o'clock)
,Searching/Way home
,Park position
,Brake light
,Left Turn Signal
,Right Turn Signal
,API
- Options:
gpioerr
: Checkbox to flash on fault.gpioinv
: Checkbox to set Low-activ signal.
- Fields:
- Name:
direct
- Description: Direct a Robonect mower by setting the speed percentage for each wheel and duration.
- Fields:
entity_id
: The entity ID of the Robonect mower.- Example:
vacuum.automower_robonect
- Example:
left
: The speed percentage of the left wheel. Positive or negative.- Example:
50%
- Example:
right
: The speed percentage of the right wheel. Positive or negative.- Example:
50%
- Example:
timeout
: The timeout/duration in milliseconds.- Example:
3000 ms
- Example:
- Fields:
Options
Note: if the sensor is a REST sensor and the category does not equal 'status', the sensor will only be updated during the non-sleeping phase of the mower