iRobot Roomba i7+ Configuration using Rest980

Good morning,
I have a roomba I7 and I’ve been trying to install this integration for several weeks but not great.
Is it still possible to install it?

The command :
http://192.168.1.131:3002/api/local/info/state


Don’t give me the region or for the parts…

http://192.168.1.131:3002/image.php?last=true

https://192.168.1.131:8123/api/states/sensor.rest980
image

I don’t know what’s bugging…

I have been trying to get the roomba card to work, i have downloaded it with Hacs (where i can see it) i added it by adding the code to the dashbord
(resources:

  • type: module
    url: /hacsfiles/lovelace-roomba-vacuum-card/roomba-vacuum-card.js)

, but even after restarting i cannot select the card. What am i missing?

Trying to configure this on a Raspberry pi 4 setup, and getting an issue where roombapw is unable to start. Pulled the Add-on repo via UI. Anything that could be top of mind what is going on?

Note: I have the current iRobot integration working fine.

Is anyone else having problems with the tank status for a Braava m6? Mine used to display the tank status fine, but I think it’s been broken since a robot firmware update. I’m on firmware 22.29.6.

The status of the tank is always displaying as “n-a”. Looking at the code under the tank section for the mop, there’s this…

          tank: >-
            {% if state_attr('sensor.rest980_2', 'mopReady')['tankPresent'] is defined %}
              {% if state_attr('sensor.rest980_2', 'cleanMissionStatus')['notReady'] == 31 %}
                Fill Tank
              {% elif state_attr('sensor.rest980_2', 'mopReady')['tankPresent'] and state_attr('sensor.rest980_2', 'mopReady')['lidClosed'] %}
                Ready
              {% elif state_attr('sensor.rest980_2', 'mopReady')['tankPresent'] and (state_attr('sensor.rest980_2', 'mopReady')['lidClosed'] == false) %}
                Lid Open
              {% else %}
                Tank Missing
              {% endif %}
            {% else %}
              n-a
            {% endif %}

…and it seems that its falling back to the else statement at the end so that’s where my status is coming from.

There’s no ‘tankPresent’ attribute for the mop in HA, but looking at /api/local/info/state for rest980_2 it does list “tankPresent”:true. So I’m a bit lost why it’s not working.

Thanks.

yes you can, but i havent written the code to support this on a per-room basis. if you run a job from your irobot app and review the lastCommand, you will see that you can pass these attributes to each room, but my code does not account for this support.

i dont believe this is possible.

this sounds like you are trying to hit the wrong endpoint - can you please provide some futher details on what your trying ?

this post shows the command for start, replace the command with dock, stop and pause and resume

no you wont get a response when trying to nagivate to it.

have a look at faq 12 which explains how the scheduling works. can you check this is all happening as expected? does selective cleaning a single room work?

the live map does not work anymore as iRobot has removed the location data from the api

you need to specify it manually, it wont appear in the list.

do you have j-series robot? i dont know if roomapw works for the j series.
you cannot run them in parallal, turn off the iRobot one first.

good call, i have pushed some changes to the mop.yaml file which reflects the new api changes.
update these and it should work better now :+1:

Looks better now. Thanks!

1 Like

any advice getting the password from a braava m6? I got it no problem with my S9, but the braava refuses to connect. I’m holding the home button to initiate pairing, but it’s refusing connection.

also when I start the rest980 addon with my id and PW configured, the logs shows

> [email protected] start /usr/src/app
> node ./bin/www

and thats it, never progresses.

Hi
I have done a fresh installation of Home assistant in supervised mode on Proxmox. I have restored from a full backup from the previous installation. 99% of the things worked perfectly well and overall, the system is performant.

I do have one nagging issue. I have installed Rest980/php-nginx Docker Image. Rest980 seems to work, but the logs from the nginx docker show permission errors. The supervised installation is root:root, and the docker image seems to be 1000:1000. Even though I have changed the access rights to give full RW to both, it seems that the fact nginx using a different user than the homeassistant creates permission errors reading the /config/vacuum directory.

Any idea how I can make this work again?

Error message in log:

2023/04/26 20:03:45 [error] 60#60: *2 open() "/config/vacuum/favicon.ico" failed (13: Permission denied), client: 192.168.0.78, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.55:3003", referrer: "http://192.168.0.55:3003/index.php"

P.S. I did change port to 3003 for testing purposed, but it had no impact.

Hi, I followed all the instructions, I made almost everything work, I can run the robot from HA, I can reach the endpoint api/local/info/state but the map does not work because position is not logged. I’m running rest980 and php-nginx as an addon, I have roomba i+7. Automation Vacuum Log Position was never triggered. Any idea what went wrong and how to fix it?

Thanks

Has the rest call in the link still good? http://homeassistant:3000/api/states/sensor.rest980

GET /api/states/sensor.rest980 404 0.422 ms - 136
Error: Endpoint not found.
    at /usr/src/app/app.js:62:13
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)
    at /usr/src/app/node_modules/express/lib/router/index.js:646:15
    at next (/usr/src/app/node_modules/express/lib/router/index.js:265:14)
    at Function.handle (/usr/src/app/node_modules/express/lib/router/index.js:175:3)
    at router (/usr/src/app/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)
    at /usr/src/app/node_modules/express/lib/router/index.js:646:15
    at next (/usr/src/app/node_modules/express/lib/router/index.js:265:14)
    at jsonParser (/usr/src/app/node_modules/express/node_modules/body-parser/lib/types/json.js:110:7)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)

I must be doing something wrong. php-nginx Docker Image won’t start.

[WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
> writing nginx config
{"level":"debug","time":"2023-06-02T05:45:42Z","msg":"starting gomplate"}
{"level":"debug","version":"3.11.3","build":"ee4de431","time":"2023-06-02T05:45:42Z","msg":"config is:\n---\ninputFiles: [/etc/templates/nginx.conf.tmpl]\noutputFiles: [/etc/nginx/nginx.conf]\n"}
{"level":"warn","time":"2023-06-02T05:45:42Z","msg":"Deprecated: conv.Bool is deprecated - use conv.ToBool instead"}
{"level":"debug","templatesRendered":1,"errors":0,"duration":0.000762508,"time":"2023-06-02T05:45:42Z","msg":"completed rendering"}
> writing host config
{"level":"debug","time":"2023-06-02T05:45:42Z","msg":"starting gomplate"}
{"level":"debug","version":"3.11.3","build":"ee4de431","time":"2023-06-02T05:45:42Z","msg":"config is:\n---\ninputFiles: [/etc/templates/host.conf.tmpl]\noutputFiles: [/etc/nginx/host.conf]\n"}
{"level":"debug","templatesRendered":1,"errors":0,"duration":0.001119012,"time":"2023-06-02T05:45:42Z","msg":"completed rendering"}
> chown webroot files
find: /config/vacuum: No such file or directory

Sorry for the long post. I actually had this up and running a year or two ago but then had to dismantle my system. Finally got it back to where I had some time to dedicate to HA, including this great project, but I’ve got a number of issues I can’t track down/fix myself.

  1. sensor.rest980 not returning cleanMissionStatus
Source: helpers/template.py:546
First occurred: 1:57:26 AM (2 occurrences)
Last logged: 1:57:26 AM

Error while processing template: 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 %}) renders=2>
Error while processing template: Template<template=({% if state_attr('sensor.rest980', 'softwareVer') is defined %} {% set version = state_attr('sensor.rest980', 'softwareVer') %} {% if '+' in version %} {{ version.split('+')[1] }} {% else %} {{ version }} {% endif %} {% else %} n-a {% endif %}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 544, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2164, in _render_with_context
    return template.render(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 3, in top-level template code
jinja2.exceptions.UndefinedError: 'None' has no attribute 'notReady'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 665, in async_render_to_info
    render_info._result = self.async_render(variables, strict=strict, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 546, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'notReady'

In Developer Tools I can see the following so not sure why this is showing up as an error:

  1. Scheduling errors
Source: components/automation/__init__.py:516
Integration: Automation (documentation, issues)
First occurred: 1:57:26 AM (4 occurrences)
Last logged: 10:00:00 AM

Error evaluating condition in 'Vacuum Log Position': In 'condition': In 'or' (item 1 of 2): In 'state': In 'state' condition: unknown entity sensor.vacuum In 'or' (item 2 of 2): In 'state': In 'state' condition: unknown entity sensor.vacuum
Error evaluating condition in 'Vacuum Cleaning Schedule 1': In 'condition': In 'and' (item 2 of 2): In 'state': In 'state' condition: unknown entity input_boolean.vacation
Error evaluating condition in 'Vacuum Cleaning Schedule 2': In 'condition': In 'and' (item 2 of 3): In 'state': In 'state' condition: unknown entity input_boolean.vacation

I’d already changed the vacuum.yaml so that the value under action was for the rooms as I’d created them in the input boolean etc. Seems like it’s saying that sensor.vacuum isn’t found, and yet:

  1. issue with populating or updating maps
Source: /usr/src/homeassistant/homeassistant/components/shell_command/__init__.py:117
Integration: Shell Command (documentation, issues)
First occurred: 3:46:14 PM (1 occurrences)
Last logged: 3:46:14 PM

Error running command: `curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?clear=true'`, return code: 3
NoneType: None

My understanding was that after a clean run, a latest.png should be created in the vacuum directory, which is what the image.php references to populate the map on the picture card. I’ve done a couple of short clean runs about 40 minutes apart, and no png image is being created. Is this error why? Here’s the top of the image.php with tokens etc. redacted:

$robot_log = 'http://192.168.1.105:3001/vacuum.log'; # Could also be HTTPS, or mop.log
$file_append = ''; # Allows differentiation of files for different floors or robots
$robot_type = 'roomba'; # Select between roomba and braava for different icons
$set_first_coordinate = 3; # Ability to skip initial coordinate(s) if incorrect data logged
$overlay_image = 'floor.png'; # Background Layer
$overlay_walls = false; # Allows overlaying of walls, used in fill mode to cover 'spray'
$walls_image = 'walls.png'; # Walls Image must contain transparent floor
$show_stuck_positions = true; 
$line_thickness = 2; # Default 2, Set to ~60 for Fill Mode
$map_width = 1050; # Ensure overlay and wall images match this size
$map_height = 900; # Ensure overlay and wall images match this size
$x_offset = 220;
$y_offset = 220;
$flip_vertical = false;
$flip_horizontal = false;
$render_status_text = true;
$rotate_angle = 0; # Allows rotating of the robot lines
$x_scale=1.00; # Allows scaling of roomba x lines
$y_scale=1.00; # Allows scaling of roomba y lines
$ha_rest980 = 'https://192.168.1.105:8123/api/states/sensor.rest980'; # sensor.rest980_2, if configured for Mop
$ha_token = '[redacted]';
$ha_timezone = 'Asia/Tokyo'; # Supported Timezones https://www.php.net/manual/en/timezones.php
$ha_text_delimiter = " \n"; # How text is displayed on the map top " \n" --> New Line ## " |" --> Show on one line
//
// Line Color - RGB
// -1 represents gradual increase from 0 to 255 based on number of logged locations
//
$color_red = -1;
$color_green = 255;
$color_blue = -1;
//
// Examples
// red = -1 , green = 255 , blue = -1  ---> Green to White Fade
// red = 0 , green = -1 , blue = 255   ---> Blue to Aqua Fade
// red = 0 , green = 0 , blue = 255    ---> Solid Blue
//
$path_opacity = 0.5; # Opacity of Roomba path --> 0.0 = completely transparent, 1.0 = completely opaque
//
///////////////////////////////////////////////////////////////////

This is a really long thread and chances are I missed a previous post which already solves these issues but I’m afraid I couldn’t find them, so apologies in advance.

Cheers!

I just rebuilt my system on a Yellow and got to adding the iRobot integration back on. Fortunately I took copious notes and it looks like it’s working. I have the sensors and the vacuum device is returning data. However neither the rest980 Docker Image or php-ngnix Docker Image add-ons will start. The rest980 log shows lots of GET /api/local/info/state 200 entries which looks like it’s actually working. the php-ngnix throws a couple of variations of PHP Warning: Invalid "post_max_size" setting. Invalid quantity "2G": value is out of range, using overflow result for backwards compatibility in Unknown on line 0 Not sure what that’s about.

Hello @Syrius
…Few weeks ago, rest980 stopped to draw the map. After some investigation I found that all shell_commands should work except these two:

vacuum_clear_image: curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?clear=true'
vacuum_generate_image: curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?last=true'

LOGS:

Logger: homeassistant.components.shell_command
Source: /usr/src/homeassistant/homeassistant/components/shell_command/init.py:117
Integration: Shell Command (documentation, issues)
First occurred: 10:52:14 (3 occurrences)
Last logged: 11:50:54

Error running command: curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?clear=true', return code: 3
Error running command: curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?last=true', return code: 3`

If I run these commands via Terminal, it writes “no such file or directory”

When I go to url of nginx file "http://192.168.1.xxx:3003/image.php, I can see image, but it is just latest.png, not updating

Thank you for your attention… hopefully you will help me :slight_smile:

Some time ago (over a year now) roombas received firmware update, that removed map data from the API. So it is not error or misconfiguration, unfortunatelly, but functionality removed by vendor… Nothing that can be done on HA side. Most likely you were ‘lucky one’ to receive this update very late.

Thank you… yes, I have Roomba 960 - but I was hoping that map updating should still work, because sensor.vacuum_location is alive and also vacuum.log file is full of data after cleaning

Replying to myself. For whatever reason now the add-ons are showing started ok and the logs now look clean, that php-ngnix error is gone… My saved vacuum.yaml worked great. The robot ran its scheduled job last night without a hitch (well, except for the removed map functionality…).

1 Like

@Syrius when I found conversations about this topic of these roomba update issues, almost everyone wrote that vacuum.log just disappeared, or is not updating - this was considered as reason of not updating map… but my vacuum.log is ok… it is just not projecting to camera.roomba… and only thing I can find in logs is error

Error running command: `curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?clear=true'` , return code: 3
Error running command: `curl -X GET -s -O /dev/null '{{ states("input_text.vacuum_map") }}?last=true'` , return code: 3

any chance to get your response or link to another issue, that described or solved this issue?

The roomba intigration is dead. The devs are no longer working on it, and it only works on a specific version of Home Assistant now unfortunately.