iRobot Roomba i7+ Configuration using Rest980

Hi @Syrius,

In the documentation of the HA installation under Step 2 it says:

" NOTE Do not have iRobot App running on your phone when doing this !!!"

What is meant by this exactly:

  1. One should not operate the iRobot from the app on your phone while doing this
  2. One should not have installed the app and connected the iRobot with that app while doing this

It is a major difference in hassle to get this done. :slight_smile:

I hope you can eleborate on this for me and others.

Regards,
Wolk9, Martin

Hi,

I’ve been using this for over a year, and it seems to work correctly, but my logs are being filled with the following errors:

2022-12-09 12:13:39.486 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'None' has no attribute 'notReady' when rendering '{% set mapper =  {
  0 : 'n-a',
  2 : 'Uneven Ground',
  15 : 'Low Battery',
  39 : 'Pending',
  48 : 'Path Blocked' } %}
{% set state =  state_attr('sensor.rest980', 'cleanMissionStatus')['notReady'] %} {{ mapper[state] if state in mapper else state }}'
2022-12-09 12:13:39.553 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'None' has no attribute 'error' when rendering '{% set mapper =  {
  0 : 'n-a',
  15 : 'Reboot Required',
  18 : 'Docking Issue'} %}
{% set state =  state_attr('sensor.rest980', 'cleanMissionStatus')['error'] %} {{ mapper[state] if state in mapper else state }}'
2022-12-09 12:13:39.557 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'split' when rendering '{% if state_attr('sensor.rest980', 'softwareVer') is defined %} {% set version = state_attr('sensor.rest980', 'softwareVer') %}
  {{ version.split('+')[1] }} 
{% else %}
  n-a
{% endif %}'
2022-12-09 12:13:39.564 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'None' has no attribute 'phase' when rendering '{% if state_attr('sensor.rest980', 'cleanMissionStatus')['phase'] == 'charge' and state_attr('sensor.rest980', 'batPct') == 100 %}
  Idle
{% elif state_attr('sensor.rest980', 'cleanMissionStatus')['cycle'] == 'none' and state_attr('sensor.rest980', 'cleanMissionStatus')['phase'] == 'stop' %}
  Stopped
{% else %} {% set mapper =  {
  'charge' : 'Charge',
  'run' : 'Run',
  'evac' : 'Empty',
  'stop' : 'Paused',
  'stuck' : 'Stuck',
  'hmUsrDock' : 'Sent Home',
  'hmMidMsn' : 'Mid Dock',
  'hmPostMsn' : 'Final Dock' } %}
{% set state =  state_attr('sensor.rest980', 'cleanMissionStatus')['phase'] %} {{ mapper[state] if state in mapper else state }} {% endif %}'
2022-12-09 12:13:39.571 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'None' has no attribute 'full' when rendering '{% set mapper =  {
  true : 'Full',
  false : 'Not Full' } %}
{% set state =  state_attr('sensor.rest980', 'bin')['full'] %} {{ mapper[state] if state in mapper else state }}'
2022-12-09 12:13:39.577 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'None' has no attribute 'present' when rendering '{% set mapper =  {
  true : 'Yes',
  false : 'No' } %}
{% set state =  state_attr('sensor.rest980', 'bin')['present'] %} {{ mapper[state] if state in mapper else state }}'
2022-12-09 12:13:39.589 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'None' has no attribute 'initiator' when rendering '{% set mapper =  {
  'schedule' : 'Scheduler',
  'rmtApp' : 'App',
  'manual' : 'Robot',
  'localApp' : 'HA' } %}
{% set state =  state_attr('sensor.rest980', 'cleanMissionStatus')['initiator'] %} {{ mapper[state] if state in mapper else state }}'
2022-12-09 12:13:39.603 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'notReady'') while processing template 'Template("{% if state_attr('sensor.rest980', 'cleanMissionStatus')['cycle'] == 'none' and state_attr('sensor.rest980', 'cleanMissionStatus')['notReady'] == 39 %}
  Pending
{% elif state_attr('sensor.rest980', 'cleanMissionStatus')['notReady'] > 0 %}
  Not Ready
{% else %} {% set mapper =  {
  'clean' : 'Clean',
  'quick' : 'Clean',
  'spot' : 'Spot',
  'evac' : 'Empty',
  'dock' : 'Dock',
  'train' : 'Train',
  'none' : 'Ready' } %}
{% set state =  state_attr('sensor.rest980', 'cleanMissionStatus')['cycle'] %} {{ mapper[state] if state in mapper else state }} {% endif %}")' for attribute '_attr_native_value' in entity 'sensor.vacuum'
2022-12-09 12:13:39.608 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'split'') while processing template 'Template("{% if state_attr('sensor.rest980', 'softwareVer') is defined %} {% set version = state_attr('sensor.rest980', 'softwareVer') %}
  {{ version.split('+')[1] }} 
{% else %}
  n-a
{% endif %}")' for attribute 'software_ver' in entity 'sensor.vacuum'

This is causing Home Assistant to hang, sometimes for hours at a time. Disabling the Rest980 Add-on prevents it happening.

Thanks

Guyan

are you hitting the ip address of your HA instance and the port defined in the rest980 app? there is no further expected output in the docker image log.

i am not sure sorry, if you can create maps in the irobot app and initiate jobs of specific rooms, then it should be possible using this solution

rest_command.vacuum_action

data contains - “command: < action >” being stop/start/dock depending on button.

i understand your question, you can manually kickoff a room with the following example code -

service: rest_command.vacuum_clean
data: {
 "ordered": 1,
 "pmap_id": "{{ state_attr('sensor.vacuum', 'pmap0_id') | string }}",
 "regions": [{"region_id": "32", "type": "rid"}]
}

as the pmapid can change, i call it using a template variable.
in the region section above, you can just hard set the region id for the room you want to clean

HTH.

mapping is broken.

the robot only supports a single connection at any one time, so sometimes if you have the app open, it will establish the connection and when you try get the credentials, it will fail.

basically, just close the app on your phone when getting the details, no need to uninstall.

there have been some revisions to the vacuum.yaml file - perhaps use notepad++ to compare your setup and ammend any changes - report back if you still have issues

Calling j7 users!

Does anyone have this working correctly with a j7 ? I don’t have one, but someone has reached out with issues and I was hoping to confirm this solution works (and any potential needed tweaks).

suspected j7 owners - can you confirm?
@KurtaPajama @dstwins @Dario_Lemes_Gonzalez @thiagodeserto

Thanks :beers:

1 Like

@boutXIII me

Just to confirm, you have this working with the j7 ? Specifically selective cleaning?

Can you please briefly detail your deployment, and current firmware?

Hello
Add-on: rest980_j7_2 Docker Image and php-nginx_2 Docker Image install with standard configurations.

The roomba j7 works by cleaning, but not by room.

Where to look for the firmware?

Hi @Syrius
I do not have this working on a j7.

I got my username blid and password using the python script here GitHub - NickWaterton/Roomba980-Python: Python program and library to control iRobot Roomba 980 Vacuum Cleaner

But I cannot any of your lovelace UI cards working.
github. com jeremywillans/ha-rest980-roomba (won’t let me post more than 2 links)

I only have this regular iRobot integration setup

I would REALLY love to get yours fully integrated so I can setup specific room cleanings, and of course the maintenance schedule would be handy to monitor.

my j7 info is:
model: Roomba j7+
SKU: j755020
Firmware: sapphire+22.29.3+2022-08-23-eb90240ea48+Firmware-Production+96
Software 22.29.3 (updated oct 7, 2022)

I am running your rest980_j7 add on, and put in the configuration (BLID, password, IP address, firmware 2, port). I was never able to access the WebUI:
http://’<‘ip or fqdn of docker host>:’<'port>/api/local/info/state
(using port 3000, as configured in add on)

yes, this is what i am trying to work out why its not working lol.

this requires the setup of the sensors first, so need to explore that first.

you cant run these at the same time which might be contributing to your issue

what happens when you try?

I have a j7 that’s working with the rest980_j7 Add-on, including selective room cleaning.

Add-on version 20220113, Roomba Software ver 22.21.1

@buckbanzai , any luck getting the map to work? I don’t really care for the real-time map if it matters.

Unfortunately not, the “pose” data that’s used for map generation/etc was removed from the Roomba firmware some time ago- the upstream repo is tracking the issue in this GitHub issue, but as far as I know the j7 never shipped with a firmware that provided this data.

Appears there must be something wrong with adding the GitHub Repository to HA Add-ons. When I add the link “GitHub - jeremywillans/hass-addons: Hass.io Addon Repository”, it’ll accept it. But nothing shows up in the Add-on Store. There are no logs stating that it failed either.

Maybe this is a bug?

Force refresh of the browser window (Shift-ctrl-R). Ran into the same issue!

1 Like

My bad! I can now see data. I will soon try installing further :slight_smile:

Hello;

I’m using rest980 and it’s working great. However, I’d love to create an automation that tell my roomba to go clean but I don’t know how do to this ? (I guess I have to make a REST call ?)
Any idea ?

Thanks a lot :slight_smile: edit: foudn the solution in this same topic !

    - service: rest_command.vacuum_action
        data:
          command: start
1 Like

Hello. I’ve been getting my HA up and running and I’ve added an automation that sends the Roomba to the litterbox after the litter robot reports a status change that the clean cycle is complete. I’d like to make this smarter and have a couple question for those here.

  1. is there a way to tell the rooomba “twoPass”:true on this job?
  2. can the roomba be told not to empty itself when it docks (only when initiated via the automation).

Thanks for any feedback, below is my current automation for reference

alias: CCC Automation
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.litterbot_status_code
    to: ccc
condition: []
action:
  - service: input_text.set_value
    data:
      value: mud_room
    target:
      entity_id: input_text.vacuum_rooms
  - service: automation.trigger
    data:
      skip_condition: true
    target:
      entity_id: automation.vacuum_clean_rooms
mode: single

Hello,

Ive been having trouble connecting my iRobot Roomba i7 to the rest980 http server. ive filled out the default.json file but every request i make comes back with an Endpoint not found error.

The webserver is up and there is no proxy restricting my access, but it doesnt work on the hosted server. Has anyone else had this problem? Does anyone know how to fix it?

Good day.
I intend to control the i7 with voice control in my language using HA Assist.
Can you please advise me what services or commands must be sent for
cleaning everywhere
pause
total stop
dock
Thank you

Kind of new to HA but I have gotten most of this setup
The lovelace card is there, it works for full clean, empty bin, etc. Just doesnt work for selective room cleaning. Any thoughts?

Not really sure what else to do. I think things are setup correctly.
One thing, should i be able to see anything when going to http://192.168.1.47:3000/api/local/action/ like i do with the info/state? I get not found…

###################################
# Secrets
###################################

# Vacuum
vacuum_state: http://192.168.1.47:3000/api/local/info/state
vacuum_action: http://192.168.1.47:3000/api/local/action/
vacuum_verify_ssl: false
vacuum_notify: notify.mobile_app_SM # You can also use a notify group here
vacuum_map: http://192.168.1.47:3001/image.php
vacuum_log: /config/vacuum/vacuum.log
vacuum_dir: /config/vacuum
vacuum_master_bedroom: '{"region_id": "1", "type": "rid"}'
vacuum_behind_couch: '{"region_id": "5", "type": "rid"}'
vacuum_master_bath: '{"region_id": "6", "type": "rid"}'
vacuum_living_room: '{"region_id": "11", "type": "rid"}'
vacuum_hallway: '{"region_id": "23", "type": "rid"}'
vacuum_laundry: '{"region_id": "28", "type": "rid"}'
vacuum_kitchen: '{"region_id": "30", "type": "rid"}'
vacuum_entryway: '{"region_id": "31", "type": "rid"}'
vacuum_dining_room: '{"region_id": "29", "type": "rid"}'
vacuum_patio_door: '{"region_id": "32", "type": "rid"}'
vacuum_office: '{"region_id": "34", "type": "rid"}'
vacuum_addison_room: '{"region_id": "35", "type": "rid"}'