Robonect module in Husqavarna Automower via mqtt vacuum

I’m trying to integrate the data from a Robonect (https://www.robonect-shop.de/) module installed inside my automower. the Robonect has an MQTT interface. I’m trying to figure out how to use the values which are not json in HA via the MQTT vacuum component. looking for any advice I can get. here is a chart of the MQTT values for robonect.

and here is some sample output from subscribing to the mqtt topic (mower was sleeping)

`automower/mqtt online

automower/device/serial
automower/device/name Rosie
automower/wlan/rssi -80 dBm
automower/mower/status 1
automower/mower/status/duration 3 Min.
automower/mower/stopped true
automower/mower/mode 0
automower/mower/battery/charge 100 %
automower/mower/statistic/hours 209
automower/mower/timer/ch0/enable false
automower/mower/timer/ch0/weekdays 0x7F
automower/mower/timer/ch0/start 255:255
automower/mower/timer/ch0/end 255:255
automower/mower/timer/ch1/enable false
automower/mower/timer/ch1/weekdays 0x7F
automower/mower/timer/ch1/start 255:255
automower/mower/timer/ch1/end 255:255
automower/mower/timer/ch2/enable false
automower/mower/timer/ch2/weekdays 0x7F
automower/mower/timer/ch2/start 255:255
automower/mower/timer/ch2/end 255:255
automower/mower/timer/ch3/enable false
automower/mower/timer/ch3/weekdays 0x7F
automower/mower/timer/ch3/start 255:255
automower/mower/timer/ch3/end 255:255
automower/mower/timer/ch4/enable false
automower/mower/timer/ch4/weekdays 0x7F
automower/mower/timer/ch4/start 255:255
automower/mower/timer/ch4/end 255:255
automower/mower/timer/ch5/enable false
automower/mower/timer/ch5/weekdays 0x7F
automower/mower/timer/ch5/start 255:255
automower/mower/timer/ch5/end 255:255
automower/mower/timer/ch6/enable false
automower/mower/timer/ch6/weekdays 0x7F
automower/mower/timer/ch6/start 255:255
automower/mower/timer/ch6/end 255:255
automower/mower/timer/ch7/enable false
automower/mower/timer/ch7/weekdays 0x7F
automower/mower/timer/ch7/start 255:255
automower/mower/timer/ch7/end 255:255
automower/mower/timer/ch8/enable false
automower/mower/timer/ch8/weekdays 0x7F
automower/mower/timer/ch8/start 255:255
automower/mower/timer/ch8/end 255:255
automower/mower/timer/ch9/enable false
automower/mower/timer/ch9/weekdays 0x7F
automower/mower/timer/ch9/start 255:255
automower/mower/timer/ch9/end 255:255
automower/mower/timer/ch10/enable false
automower/mower/timer/ch10/weekdays 0x7F
automower/mower/timer/ch10/start 255:255
automower/mower/timer/ch10/end 255:255
automower/mower/timer/ch11/enable false
automower/mower/timer/ch11/weekdays 0x7F
automower/mower/timer/ch11/start 255:255
automower/mower/timer/ch11/end 255:255
automower/mower/timer/ch12/enable false
automower/mower/timer/ch12/weekdays 0x7F
automower/mower/timer/ch12/start 255:255
automower/mower/timer/ch12/end 255:255
automower/mower/timer/ch13/enable false
automower/mower/timer/ch13/weekdays 0x7F
automower/mower/timer/ch13/start 255:255
automower/mower/timer/ch13/end 255:255
automower/health/voltage/int33 3.2 V
automower/health/voltage/ext33 3.1 V
automower/health/voltage/batt 27.2 V
automower/health/climate/temperature 41 ?C
automower/health/climate/humidity 36 %
automower/mower/status/duration 4 Min.
automower/mower/status/duration 5 Min.
automower/wlan/rssi -74 dBm
automower/wlan/rssi -82 dBm
automower/mower/battery/charge 99 %
automower/wlan/rssi -73 dBm
automower/wlan/rssi -82 dBm
automower/mower/status/duration 6 Min.
automower/wlan/rssi -76 dBm
automower/mower/status/duration 7 Min.
automower/wlan/rssi -82 dBm
automower/wlan/rssi -76 dBm
automower/wlan/rssi -82 dBm
automower/mower/status/duration 8 Min.
automower/mower/status/duration 9 Min.
automower/wlan/rssi -76 dBm
automower/mower/status/duration 10 Min.
automower/wlan/rssi -83 dBm
automower/wlan/rssi -77 dBm
automower/mower/status/duration 11 Min.
automower/mower/status/duration 12 Min.
automower/mower/status/duration 13 Min.
automower/wlan/rssi -83 dBm
automower/mower/status/duration 14 Min.
automower/wlan/rssi -76 dBm
automower/mower/status/duration 15 Min.
automower/health/climate/temperature 43 ?C
automower/wlan/rssi -82 dBm
automower/mower/status/duration 16 Min.
automower/wlan/rssi -76 dBm
automower/mower/status/duration 17 Min.
automower/wlan/rssi -85 dBm
automower/wlan/rssi -78 dBm
automower/mower/status/duration 18 Min.
automower/mower/status/duration 19 Min.
automower/mower/status/duration 20 Min.
automower/mower/status/duration 21 Min.
automower/wlan/rssi -84 dBm
automower/wlan/rssi -78 dBm
automower/mower/status/duration 22 Min.
automower/mower/status/duration 23 Min.
automower/wlan/rssi -84 dBm
automower/mower/status/duration 24 Min.
automower/wlan/rssi -78 dBm
automower/wlan/rssi -84 dBm
automower/wlan/rssi -78 dBm
automower/mower/status/duration 25 Min.
automower/health/voltage/ext33 2.9 V
automower/health/voltage/ext33 0.7 V
automower/health/voltage/ext33 0.4 V
automower/health/voltage/ext33 0.3 V
automower/health/voltage/ext33 0.2 V
automower/health/voltage/ext33 0.1 V
automower/health/voltage/ext33 0.0 V
automower/mower/status 17
automower/mower/status/duration 0 Min.
automower/wlan/rssi -85 dBm
automower/wlan/rssi -78 dBm
automower/mower/status/duration 1 Min.
automower/wlan/rssi -84 dBm
automower/wlan/rssi -78 dBm
automower/mower/status/duration 2 Min.
automower/mower/status/duration 3 Min.
automower/mower/status/duration 4 Min.
automower/mower/status/duration 5 Min.
automower/mower/status/duration 6 Min.
`

4 Likes

Hi, do you made some process on this?
I ordered today a robonect mobul and it would be glorious to have this in my home assistant hub, too.

I ended up just setting things up as MQTT sensors, with an input select to drive an automation that sends the commands.

From my sensor.yaml:

  state_topic: "automower/mower/battery/charge"
  name: "mower_name Battery"
  unit_of_measurement: '%'
  device_class: battery
  
- platform: mqtt
  state_topic: "automower/mower/stopped"
  name: "mower_name Stopped"

- platform: mqtt
  state_topic: "automower/wlan/rssi"
  name: "mower_name wifi signal"
  unit_of_measurement: 'dBm'
  
- platform: mqtt
  state_topic: "automower/mower/status"
  name: "mower_name status raw"
- platform: template
  sensors:
    mower_name_status_friendly:
      friendly_name: "mower_name Status"
      value_template: >
        {% if is_state("sensor.mower_name_status_raw", "0") -%}
          Detecting_Status
        {% elif is_state("sensor.mower_name_status_raw", "1") -%}
          Parking
        {% elif is_state("sensor.mower_name_status_raw", "2") -%}
          Mowing
        {% elif is_state("sensor.mower_name_status_raw", "3") -%}
          Searching_Charging_Station
        {% elif is_state("sensor.mower_name_status_raw", "4") -%}
          Charging
        {% elif is_state("sensor.mower_name_status_raw", "5") -%}
          Searching
        {% elif is_state("sensor.mower_name_status_raw", "7") -%}
          Error
        {% elif is_state("sensor.mower_name_status_raw", "16") -%}
          Off
        {% elif is_state("sensor.mower_name_status_raw", "17") -%}
          Sleeping
        {% elif is_state("sensor.mower_name_status_raw", "18") -%}
          Waiting_For_Garage_Door
        {% else -%}
          Figure out what state {{ states("sensor.mower_name_status_raw") }} means
        {%- endif %}
    
- platform: mqtt
  state_topic: "automower/mower/status/duration"
  name: "mower_name time in current status"
  unit_of_measurement: 'minutes'
    
- platform: mqtt
  state_topic: "automower/mower/mode"
  name: "mower_name mode raw"
  
- platform: mqtt
  state_topic: "automower/mower/statistic/hours"
  name: "mower_name Operation Hours"
  unit_of_measurement: 'hours'
  icon: mdi:timer-sand
    
- platform: mqtt
  state_topic: 'automower/health/voltage/int33'
  name: "mower_name Operating Voltage Robonect"
  unit_of_measurement: 'V'
  
- platform: mqtt
  state_topic: 'automower/health/voltage/ext33'
  name: "mower_name Operating Voltage Mower"
  unit of measurement: 'V'

- platform: mqtt
  state_topic: 'automower/health/voltage/batt'
  name: "mower_name Battery Voltage"
  unit_of_measurement: 'V'

From my configuration.yaml:

    mower_name_command:
      name: mower_name Set State
      options:
       - _
       - start
       - stop
       - auto
       - home
       - man
       - eod
      initial: _
      icon: mdi:robot

from automations.yaml

      - id: 'automower_command_mode'
        alias: mower_name Command Control
        trigger:
        - entity_id: input_select.mower_name_command
          from: _
          platform: state
          to: start
        - entity_id: input_select.mower_name_command
          from: _
          platform: state
          to: stop
        condition: []
        action:
        - data:
            payload_template: '{{ states(''input_select.mower_name_command'') }}'
            topic: automower/control
          service: mqtt.publish
        - data:
            entity_id: input_select.mower_name_command
            option: _
          service: input_select.select_option
      - id: 'automower_command_control_mode'
        alias: mower_name Command Control Mode
        trigger:
        - entity_id: input_select.mower_name_command
          from: _
          platform: state
          to: auto
        - entity_id: input_select.mower_name_command
          from: _
          platform: state
          to: home
        - entity_id: input_select.mower_name_command
          from: _
          platform: state
          to: man
        - entity_id: input_select.mower_name_command
          from: _
          platform: state
          to: eod
        condition: []
        action:
        - data:
            payload_template: '{{ states(''input_select.mower_name_command'') }}'
            topic: automower/control/mode
          service: mqtt.publish
        - data:
            entity_id: input_select.mower_name_command
            option: _
          service: input_select.select_option      
1 Like

Hi,

Thanks for your work. Please can you tell me what do I need to put in MQTT-Client in automower?

Thanks

you just put in you mqtt server port and choose your topic under the Communication>MQTT-client in robonect

In HA I got message “Unable to find component mower_name_command”. I copy/pase all from your configuration (I did not change anything). What do you think it could be?

I missed a line when I pasted my code. you need to define a input_select:

  mower_name_command:
    name: mower_name Set State
    options:
     - status_quo
     - start
     - stop
     - auto
     - home
     - man
     - eod
    initial: status_quo
    icon: mdi:robot
2 Likes

thanks, you are right I missed “input_select:”!
Now I can see Robonect in HA but when I try to sent commands from HA to robonect nothing happens (HA says :“Service input_select/select_option called.”). In robbonect status of MQTT-Client is connected.

did you set up the automations that publish the commands to the mower?

as as side not I just had to pull my robonect out of my automower because I got an email from the robonect supplier advising to stop using immediately, due to a possible short circuits due the manufacturing process. they are sending out replacement parts in about 14 days. I bought a Robonect® Hx modules with a 20p adapter in June of this year. I think it’s the 20p adaptor that has the issue.

Problem was in copy/paste configuration from last post in configuration.yaml because I mixed config from tube0013 and config from JLeandroFreitas (he use “- status _quo” insted only “- _”.

Thank you both!!!

I am using Robonect® Hx - 10p without problems last 2 years :grinning:

@tube0013 hi how did you configure the mqtt vacuum platform? can you please post your config here?
that would be great.

Thanks

Never got MQTT vacuum working went with what I have above a mix of mqtt sensors and mqtt commands sent via automation.

I’ve got Home Assistant talking to my Robonect - so thanks.

I don’t see any push/alert for “picked up”. This would be really useful in the event of attempted theft as I could raise an alarm and turn on exterior (and interior) lights which might discourage the thief.

Is there a “picked up” or “tilted” status exposed via Robonect & MQTT?

Thanks,
Keith

Its looks like it use Front Collision status (“sensor.bob_status_raw”, “7” for that. Maybe you can get an zigbee aqara vibration sensor and use the tilt (gyro) for that.

  - platform: mqtt
    state_topic: "robotic_mower/mower/status"
    name: "Bob status raw"

  - platform: template
    sensors:
      bob_status_friendly:
        friendly_name: "Bob Status"
        value_template: >
          {% if is_state("sensor.bob_status_raw", "1") -%}
            Parked
          {% elif is_state("sensor.bob_status_raw", "2") -%}
            Mowing
          {% elif is_state("sensor.bob_status_raw", "4") -%}
            Charging
          {% elif is_state("sensor.bob_status_raw", "5") -%}
            Searching
          {% elif is_state("sensor.bob_status_raw", "17") -%}
            Sleeping
          {% elif is_state("sensor.bob_status_raw", "3") -%}
            Heading Home
          {% elif is_state("sensor.bob_status_raw", "7") -%}
            Front Collision
          {% else -%}
            Figure out what state {{ states("sensor.bob_status_raw") }} means
          {%- endif %}

Ah, thanks, I’ll check out the “bob_status_raw”…

I also have spare Samsung SmartThings tilt sensors - great idea! Not sure about the range though - even my SmartThings motion sensors have problems connection around my house and I have repeaters! I’ll test though and it would be great to get that work also!

Thanks again.

Osram outdoor plug maybe?

Are they Zigbee repeaters? I think I have something wrong in my setup as I have problems even inside my house with Zigbee connections. I have to try moving my SmartThings hub to the centre of my house away from one corner where my internet comes in.

All non-battery devices works as zigbee repeaters.

Thanks for the info JLeandroFreitas

That’s a couple of options I’ve got to explore. I’ve left a suggestion on the Robonect forum also. Hopefully there will be a new firmware version coming soon with more features.