iRobot Roomba i7+ Configuration using Rest980

Today I noticed a huge problem. The vacuum robot has done its job, suddenly stopped at the end (running mode) and glowed white. It could no longer be operated at all, not with the “Clean” button or via the app or via HomeAssistant.
Only the hard reset allowed it to restart (over a minute on the clean button)
Any idea?

I also just noticed that the mop cannot be started via the dashboard. Whenever I press “clean”, the S9 starts instead of the Braava: /
The rest of the command is changed or not as follows: (or is it still called vaccum_action …)

rest_command:
  mop_action:
    url: >-
      {{ states('input_text.mop_action') }}{{ command }}
    verify_ssl: !secret mop_verify_ssl
    method: 'get'
    timeout: 20
  mop_clean:
    url: >-
      {{ states('input_text.mop_action') }}cleanRoom
    verify_ssl: !secret mop_verify_ssl
    method: POST
    content_type: 'application/json'
    payload: '{{ payload }}'

PS: I renamed everything that was called “vaccum” to mop.
I looked further up, but unfortunately I couldn’t find a post where someone successfully integrated the Braava.
But I have now deleted everything that contains the base and the bin and now the error message is gone.
What is still stupid, however, is in the Lovelace the “dust bag” cannot hide: / see photo
image

have you defined the entities in the Lovelace card? you will also need to change the vacuum_action to reflect the rest_command for your braava also

- type: custom:roomba-vacuum-card
  entity: sensor.vacuum or sensor.mop <----- define the correct entity here
  vacuum_action: mop_action <----- add this and change to your rest_command name

this sounds like a vacuum specific issue, im not sure sorry :man_shrugging:

you need to change the vacuum_action command in your second instance of the lovelace card

- type: custom:roomba-vacuum-card
  entity: ...
  vacuum_action: mop_action <----- add this entry

please keep in mind that I created this for a Roomba and i dont own a Braava. I have a pending task to make the LL card modular however spare time is in short supply so i havent yet had a chance to implement it. anyone can feel free to raise a PR if they wish or donate me a braava :wink:

Hey there, yes I believe I’ve done all that - sorry for the long code block but see below the code config for both cards:

- title: Roombas
    path: roombas
    theme: kibibit-dark-cards
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - entity: sensor.vacuum
            type: custom:roomba-vacuum-card
          - entities:
              - input_boolean.vacuum_clean_kitchen
              - input_boolean.vacuum_clean_entry
              - input_boolean.vacuum_clean_hall
              - input_boolean.vacuum_clean_living_room
              - input_boolean.vacuum_clean_dining_room
              - input_boolean.vacuum_clean_guest_toilet
              - input_boolean.vacuum_clean_laundry_room
              - entity: automation.vacuum_clean_rooms
                lock:
                  enabled: |
                    [[[
                      if ((states['group.vacuum_rooms'].state == "on") && (states['sensor.vacuum'].state == "Ready"))
                        return false;
                      return true;
                    ]]]
                  exemptions: []
                name: Clean Rooms
                styles:
                  card:
                    - height: 50px
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.vacuum_clean_rooms
                type: custom:button-card
            head:
              label: Selective Room Cleaning
              type: section
            type: custom:fold-entity-row
          - entities:
              - style: |-
                  .text-divider {
                    padding: 0em;
                    margin: 0em;
                  } h2 {
                    font-size: 1em;
                    margin-block-start: 0em;
                    margin-block-end: 0em;
                  }
                text: Clean
                type: custom:text-divider-row
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_clean_brushes
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-1 days'
                timeout: 10 days
                title: Brushes
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_clean_contacts
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-3 days'
                timeout: 18 days
                title: Contacts
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_clean_filter
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-10 days'
                timeout: 10 days
                title: Filter
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_clean_wheel
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-3 days'
                timeout: 18 days
                title: Wheel
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_clean_bin
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-3 days'
                timeout: 18 days
                title: Bin
                type: custom:check-button-card
              - style: |-
                  .text-divider {
                    padding: 0em;
                    margin: 0em;
                  } h2 {
                    font-size: 1em;
                    margin-block-start: 0em;
                    margin-block-end: 0em;
                  }
                text: Replace
                type: custom:text-divider-row
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_replace_brushes
                severity:
                  - color: '#bfb540'
                    value: 0 months
                  - color: '#bf4060'
                    value: '-4 months'
                timeout: 8 months
                title: Brushes
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_replace_filter
                severity:
                  - color: '#bfb540'
                    value: 0 months
                  - color: '#bf4060'
                    value: '-1 months'
                timeout: 3 months
                title: Filter
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.vacuum_maint_replace_wheel
                severity:
                  - color: '#bfb540'
                    value: 0 months
                  - color: '#bf4060'
                    value: '-4 months'
                timeout: 2 years
                title: Wheel
                type: custom:check-button-card
            head:
              label: Maintenance
              type: section
            type: custom:fold-entity-row
      - type: vertical-stack
        cards:
          - entity: sensor.mop
            type: custom:roomba-vacuum-card
          - entities:
              - input_boolean.mop_clean_kitchen
              - input_boolean.mop_clean_entry
              - input_boolean.mop_clean_hall
              - input_boolean.mop_clean_bedroom_hall
              - input_boolean.mop_clean_living_room
              - input_boolean.mop_clean_dining_room
              - input_boolean.mop_clean_guest_toilet
              - input_boolean.mop_clean_laundry_room
              - entity: automation.mop_clean_rooms
                lock:
                  enabled: |
                    [[[
                      if ((states['group.mop_rooms'].state == "on") && (states['sensor.mop'].state == "Ready"))
                        return false;
                      return true;
                    ]]]
                  exemptions: []
                name: Clean Rooms
                styles:
                  card:
                    - height: 50px
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.mop_clean_rooms
                type: custom:button-card
            head:
              label: Selective Room Cleaning
              type: section
            type: custom:fold-entity-row
          - entities:
              - style: |-
                  .text-divider {
                    padding: 0em;
                    margin: 0em;
                  } h2 {
                    font-size: 1em;
                    margin-block-start: 0em;
                    margin-block-end: 0em;
                  }
                text: Clean
                type: custom:text-divider-row
              - color: '#40bf6a'
                due: true
                entity: sensor.mop_maint_clean_brushes
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-1 days'
                timeout: 10 days
                title: Brushes
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.mop_maint_clean_contacts
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-3 days'
                timeout: 18 days
                title: Contacts
                type: custom:check-button-card
              - color: '#40bf6a'
                due: true
                entity: sensor.mop_maint_clean_wheel
                severity:
                  - color: '#bfb540'
                    value: 0 days
                  - color: '#bf4060'
                    value: '-3 days'
                timeout: 18 days
                title: Wheel
                type: custom:check-button-card
              - style: |-
                  .text-divider {
                    padding: 0em;
                    margin: 0em;
                  } h2 {
                    font-size: 1em;
                    margin-block-start: 0em;
                    margin-block-end: 0em;
                  }
                text: Replace
                type: custom:text-divider-row
              - color: '#40bf6a'
                due: true
                entity: sensor.mop_maint_replace_wheel
                severity:
                  - color: '#bfb540'
                    value: 0 months
                  - color: '#bf4060'
                    value: '-4 months'
                timeout: 2 years
                title: Wheel
                type: custom:check-button-card
            head:
              label: Maintenance
              type: section
            type: custom:fold-entity-row

Entities are defined as sensor.vacuum for Roomba and sensor.mop for the braava, yet the top card only shows braava details for both.

My rest_command section and other references to it are as follows:

###################################
# Rest Command
###################################

rest_command:
  mop_action:
    url: >-
      {{ states('input_text.mop_action') }}{{ command }}
    verify_ssl: !secret mop_verify_ssl
    method: 'get'
    timeout: 20
  mop_clean:
    url: >-
      {{ states('input_text.mop_action') }}cleanRoom
    verify_ssl: !secret mop_verify_ssl
    method: POST
    content_type: 'application/json'
    payload: '{{ payload }}'
automation mop:
    # Initiate Selective Room Clean
  - alias: Mop Clean Rooms
    trigger:
    - platform: event
      event_type: initiate_mop_clean       
    action:
      - service: rest_command.mop_clean
        data_template:
          payload: >
            {% set rooms = states('input_text.mop_rooms') %}
            {% if rooms[-1:] == ',' %}
            {% set rooms = rooms[:-1] %}
            {% endif %}
            {% set rooms = rooms.split(",") %}
            {
              "ordered": 1,
              "pmap_id": "{{ state_attr('sensor.mop', 'pmap0_id') | string }}",
              "regions": [{% for id in rooms %}
                {% set room = 'input_text.mop_clean_' + id %} {{ states(room) | string }} {%- if not loop.last %},{%- endif %}
                {%- endfor %}
              ]
            }

So everything that had vacuum is changed to mop. I haven’t changed anything in the vacuum.yaml, so I’m v surprised that the existing card changed to track the braava instead.

just to confirm sensor.mop, is not pointing at the vacuum resource?

sensor:
  # Roomba via Rest980 Docker Image <-- optional rename comment
  - platform: rest
    name: rest980 <--- name rest980_2
    json_attributes:
      - batPct
      - bin
      - cleanMissionStatus
      - dock
      - pose
      - signal
      - bbmssn
      - bbrun
      - name
      - pmaps
    resource: !secret vacuum_state <--- change to vacuum_state
    value_template: 'OK'
    scan_interval: 10
  - platform: template
    sensors:
      vacuum:
        friendly_name_template: >-
          {{ state_attr('sensor.rest980', 'name') }}  <-- change to sensor.rest980_2 and so on...

This is what I’d forgotten to do. Thanks for sticking with me on that. It’s now working:

FYI the below deidn’t seem to be necessary:

name: vacuum_action: mop_action <----- add this entry

I’d added a completely separate section in secrets and had changed everything to mop_action, mop_state etc. and made the relevant changes in the mop.yaml too.

@clipse can I ask how you got the Braava image on this card?

Are you sure? Do the buttons on the card work and actually contorol the mop? :thinking:

I am fairly sure the LL card is hard-coded to call rest_command.vacuum_action for the buttons

Check this post for the image :+1:

Ah amazing thank you. Took me about 10 mins to realise I didn’t need to recreate the whole card and could just specify the same card with an image: /hacsfiles/lovelace-roomba-vacuum-card/braava.png line added in. Thank you!

1 Like

New release published for both ha-rest980-roomba and lovelace-roomba-vacuum-card

Vacuum Changes

  • Add Room Check for Selective Clean
  • Add Software Version attribute
  • Fix Job Time, Resume In and add Expires (replacing Job Area)
  • Add Error Message Attribute
  • Update FAQ and README
  • Fix missing Input Boolean in Fridge CZ (#20, thanks @ElieSauveterre!)
  • Add additional Not-Ready states
  • Fix naming inconsistency

Map Image File Changes

  • Allow optionally not rendering status text (#26, thanks @stnokott!)
  • Add File Check
  • Split X/Y Scale

Lovelace Card Changes

  • Supports layout customization!
  • Replaced job_area with job_expires
  • Support customized button labels

Please let me know if you find any issues!! :partying_face:

Try now, and let me know how you go :+1:

There is no update for the rest980 in the add on store indicated. What do I have to do to get the update installed?

Unfortunatley its a manual process, you will need to bascially compare the yaml code differences between the repo and your environment

Edit - Yay for Cake day :partying_face:

Has anyone posted a configuration for the Bravaa Jet M6? As in getting the sensors from REST980 and adding it to the Vacuum card? I have it set up and it works, but I’d like to get more customized info into HA like the tank status, etc.

1 Like

@emergent have a look at this GH issue for some potential inspiration.

If somoene has a complete braava.yaml working copy, i might actually look to upload into this repo to make it essier for others, as well is incorporate some of the above changes into the lovelace card natively with a attribute to switch between roomba and braava.

as i dont have one… i can only speculate :frowning:

DM/PR/Raise Issue to contribute ! :+1:

I’ve now copied the code from the new yaml to my existing and changed the states again in german. But there is still no change. I can not use the buttons of the roomba vacuum card. After restoring the original yaml with english states it works again.

A second thing I recognized is that if I only select a zone for cleaning I’m not able to start with the clean rooms button on the lovelace card. It remains locked.

Incredible work. I’ve got everything set up.

Quick question, how would i trigger Clean Everywhere from a home assistant script?

I have another question, in the Image.php file in line 23 “$ha_rest980 =”
There is the IP of HA and the associated port to enter, somewhere I have read here once an answer from you on it. If I use the correct address (by the way, I have to use HTTP instead of HTTPS) still comes the message “401: Unauthorized” if I try https comes “Page not found”.
Are you sure this is correct?

Camera image not updating >> Getting this error in my Log file:

Error getting new camera image from Roomba: 404 Client Error: Not Found for url: http://192.168.5.120:3002/config/vacuum/image.php For more information check: https://httpstatuses.com/404

Hey @Syrius - sorry that this is months later… not getting the time to root-cause these things :slight_smile: Weird behaviour:

I can see the Rest980 Log is getting successful responses messages from the Get Info State (below), however when I try any commands manually in the browser, the browser simply says it times-out, and theres no response.

Any idea what I’m doing wrong? Thanks again.

GET /api/local/info/state 200 102.839 ms - 2
GET /api/local/info/state 200 103.302 ms - 2
GET /api/local/info/state 200 103.752 ms - 2
GET /api/local/info/state 200 102.396 ms - 2
GET /api/local/info/state 200 101.850 ms - 2
GET /api/local/info/state 200 101.310 ms - 2
GET /api/local/info/state 200 102.515 ms - 2
GET /api/local/info/state 200 102.198 ms - 2
GET /api/local/info/state 200 102.388 ms - 2
GET /api/local/info/state 200 101.549 ms - 2
GET /api/local/info/state 200 102.491 ms - 2
GET /api/local/info/state 200 102.524 ms - 2
GET /api/local/info/state 200 101.346 ms - 2
GET /api/local/info/state 200 102.463 ms - 2
GET /api/local/info/state 200 101.323 ms - 2
GET /api/local/info/state 200 107.691 ms - 2
GET /api/local/info/state 200 102.134 ms - 2

@Syrius Hi

Been using this for a long time now and no worries
Btw, thanks for all the help with that

Now an interesting thing is that i need to change the maintaince intervals, the brushes are starting to break up and its still saying 2 months until replacement, where do i change that? i looked in image.php and index.php and nothing made a bell ring

EDIT: think its here: ha-rest980-roomba/lovelace.yaml at a18a5eff3ccdefd31242acfaadf08a62cc30c2d7 · jeremywillans/ha-rest980-roomba · GitHub

untested, but in theory should work -

script:
  vacuum_full_clean:
    sequence:
      service: rest_command.vacuum_action
      data:
        command: "start"

have you defined a token on line 24?

if you have setup this using php-nginx, then the URL should just be
http://192.168.5.120:3002/image.php

try and let me now

if you navigate in the browser to this url -
http://<ip or fqdn of docker host>:<port-for-rest980>/api/local/info/state what do you get?

if its just {} then try restarting the container and make sure you dont have the official vacuum integration running in HA, as these dont play nice together.

report back with the outcome

if you mean change the interval? then yes, in the lovelace file is correct.
this line in the lovelave.yaml. the lines above are used to dictate when to change the color to yellow and red.

however if you just want to indicate that you have changed them, then just click on the check-button-card and it will reset. the timing i put were based on the recommendations of irobot, but you can modify to suit your deployment

"if you have setup this using php-nginx, then the URL should just be
http://192.168.5.120:3002/image.php

try and let me now"

That worked!! Thank you!

1 Like