Robonect module in Husqavarna Automower via mqtt vacuum

There is the remote option, providing this for the moment:

{“remotestart_1”: {“name”: “Fernstart 1”, “visible”: true, “path”: 2, “proportion”: 20, “distance”: 300}, “remotestart_2”: {“name”: “Fernstart 2”, “visible”: true, “path”: 2, “proportion”: 0, “distance”: 0}, “remotestart_3”: {“name”: “Fernstart 3”, “visible”: true, “path”: 2, “proportion”: 0, “distance”: 0}, “remotestart_4”: {“name”: “Fernstart 4”, “visible”: true, “path”: 2, “proportion”: 0, “distance”: 0}, “remotestart_5”: {“name”: “Fernstart 5”, “visible”: true, “path”: 2, “proportion”: 0, “distance”: 0}, “successful”: true}

Let me check what’s possible, I’ll add it as a service

Hm. This is not a service for ad hoc command to start the mower ad hoc for a given duration at a given position. This is currently only possible via REST AFAIK. See above. What you posted is to define proportion and starting points. Not related to the the ad hoc starts.

rest_command:
  start_husqvarna_330x5:
    url: "http://xxx.xxx.xxx.xxx/xml?cmd=mode&mode=job&duration={{ duration }}&remotestart={{ remotestart }}&after=auto"
    method: POST
    username: !secret robonect_username
    password: !secret robonect_password

More MQTT commands (e.g. feature parity to REST API) have been requested for years at Robonect developer. But he is not even fixing bugs. It is still sold but seems to be a dead project.


This command defines a job, result in the interface below… So I think it’s possible :wink:

Yes, but where is the MQTT here? The question was:

Anyone know if it is possible and what to publish to MQTT to do a remote start?

Why you have now called is the same REST command I have posted already and what is working. See above in this thread in all of my services and explanations. Not MQTT.

Indeed, seen it, didn’t read everything, sorry about that :slight_smile:
Anyway, I will build it in as a service of the HA integration i’m starting. Stepping away from the MQTT

The sensors are building up

1 Like

Nice, where/how did you find these sensors? My mqtt explorer don’t show this info.

My simple automower card:

I am getting them from the json api endpoints. Building them in my HA integration (GitHub - geertmeersman/robonect: Home Assistant integration for Robonect)

1 Like

That’s great news, will definitely try out. This is my first season with Robonect, very happy so far. :slight_smile:

The mowing job service is defined, I will try it out tomorrow when there is daylight :slight_smile:

I’m translating it into NL/DE/EN, any other languages needed?

Sensor list keeps growing

3 Likes

Do you plan to generate a vacuum as well, e.g. mine here

  - platform: template
    vacuums:
      mahroboter_husqvarna_330x:
        friendly_name: "Mähroboter Husqvarna 330x"
        unique_id: unique_id_mahroboter_husqvarna_330x
        value_template: |
          {% if is_state("sensor.mahroboter_status_raw", "0") %}
            idle
          {% elif is_state("sensor.mahroboter_status_raw", "1") %}
            docked
          {% elif is_state("sensor.mahroboter_status_raw", "2") %}
            cleaning
          {% elif is_state("sensor.mahroboter_status_raw", "3") %}
            returning
          {% elif is_state("sensor.mahroboter_status_raw", "4") %}
            docked
          {% elif is_state("sensor.mahroboter_status_raw", "5") %}
            cleaning
          {% elif is_state("sensor.mahroboter_status_raw", "7") %}
            error
          {% elif is_state("sensor.mahroboter_status_raw", "8") %}
            error
          {% elif is_state("sensor.mahroboter_status_raw", "16") %}
            docked
          {% elif is_state("sensor.mahroboter_status_raw", "17") %}
            docked
          {% elif is_state("sensor.mahroboter_status_raw", "18") %}
            idle
          {% else %}
            error
          {% endif %}
        battery_level_template: "{{ states('sensor.mahroboter_batterie')|int(default=0) }}"
        start:
          service: script.rasenmahersteuerung_robonect
          data:
            message: start
        stop:
          service: script.rasenmahersteuerung_robonect
          data:
            message: stop
        return_to_base:
          service: script.rasenmahersteuerung_robonect
          data:
            message: eod
        locate:
          service: script.rasenmahersteuerung_robonect
          data:
            message: auto
        attribute_templates:
          substatus: "{{ states('sensor.mahroboter_substatus_raw') }}: {{ states('sensor.mahroboter_substatus_plain') }}"
          status: "{{ states('sensor.mahroboter_status_raw') }}: {{ states('sensor.mahroboter_status_plain') }}"

Secondly Robonect delivers a Status Raw and a Status Plain, but the Plain is nur usefull, esp. not wanted in some cases.

For this I (and several others) created another template sensor, to have a “better”, additional plain.

See here

The first is the raw and is showing 4, but the plain devices in 1% steps of loading, whereas I like to show only loading (and then perhaps more details somewhere else). Same for returning to home base and searching

where plain devides to m and I’m most of the time only interesting in a text for 5 “searching”.

Long story short, can you add such template as sensor of the device as well, with additional “better” plain, like shown above and here.

  - sensor:
      - name: Mähroboter Status lesbar
        unique_id: unique_id_mahroboter_status_lesbar
        state: >
          {% if is_state("sensor.mahroboter_status_raw", "0") %}
            Erkenne Status
          {% elif is_state("sensor.mahroboter_status_raw", "1") %}
            Parkt
          {% elif is_state("sensor.mahroboter_status_raw", "2") %}
            Mäht
          {% elif is_state("sensor.mahroboter_status_raw", "3") %}
            Fährt heim
          {% elif is_state("sensor.mahroboter_status_raw", "4") %}
            Lädt
          {% elif is_state("sensor.mahroboter_status_raw", "5") %}
            Sucht
          {% elif is_state("sensor.mahroboter_status_raw", "7") %}
            Fehler
          {% elif is_state("sensor.mahroboter_status_raw", "8") %}
            Schleifensignal verloren
          {% elif is_state("sensor.mahroboter_status_raw", "16") %}
            Aus
          {% elif is_state("sensor.mahroboter_status_raw", "17") %}
            Schläft
          {% elif is_state("sensor.mahroboter_status_raw", "18") %}
            Wartet_auf_Garagentor
          {% else %}
            Versuche herauszufinden was {{ states("sensor.mahroboter_status_raw") }} bedeutet
          {% endif %}
        icon: mdi:list-status

Ofc I can use such templates still, if you are not providing them, but because of the limitations, this is then not part of the device.

Do you mean this?

image

Btw if you can join on discord, it will ease the communication :slight_smile:

Yes, this is fine as well, so you are only taking the raw and then not showing the number but the text and the raw number in the attributes. Like it.

Yes, but adding an extra sensor is always possible :slight_smile: but normally not really needed.
And the raw status is translated (as said currently only in NL/DE/EN

Regarding the Vacuum, I don’t have one, but I can always add things if I know the json stuff

The only “difference” there now is (compared to MQTT), that since it is local_polling that is being used, I have set the polling interval to 2 minutes, meaning the mower is waken up every 2 minutes, so never goes into a “deep” sleep :slight_smile:

Fix for the beep and the waking up of the mower

@arganto , would you by any chance have the list of substatus possibilities? And a question regaring the Vacuum: is this a must? I implemented it, but wat disturbs me, is that it shows “cleaning” etc, while the mower should be “mowing” :smiley:

image

3 Likes

As they come in plain as well, I didn’t take care on them until now.

In the Reobonect-Forum, there is this German list:

Mögliche Werte für /substatus/plain:
1 fährt
2 draußen
3
4 Räder rutschen!
5
6 Kollision!
7 Angehoben!
8 Spiralschnitt
9 folgt Leitdraht 1 zur Ladestation
10 folgt rechtem Begrenzungsdraht
11 dockt an
12 Schnellladung
13
14 Ladung abgeschlossen
15 Ausfahrtswinkel
16 folgt Leitdraht 1 zum Startpunkt
17
18 Kein Schleifensignal!
19 Mähmotor blockiert!
20
21 folgt Leitdraht 2 zur Ladestation
22
23 folgt Leitdraht 2 zum Startpunkt
24
25 folgt linkem Begrenzungsdraht

But I don’t know the completeness and if is the current state.

Regarding the vaccum, you are most probably right, that it is disturbing. But I liked the way to see everything in a build in entity popup. Good for newbies as well, who are not building a card as I did above.

Thanks!
I already found a wat to override the vacuum states, so perhaps I’ll do something with it.

I now already have created all the sensors for mqtt in the integration