iRobot Roomba i7+ Configuration using Rest980

Hi @Syrius
FYI status code 360 means there is a communication problem with the clean base.
roomba i7 after docking, doesn’t empty bin to the clean base, it can’t seem to send the command to empty it. Clean base still works from HA and android app. also works from roomba i7 temporarily after performing some steps from this site

https://homesupport.irobot.com/app/answers/detail/a_id/17742/~/what-do-i-do-if-roomba®-is-unable-to-communicate-with-the-clean-base™-automatic

i opened a ticket with support wandering if its related to the new firmware version.

ive seen some threads on reddit about these issues :frowning:

such as -

yes that’s exactly whats going on. it looks like they pushed new firmware to the clean base also on my unit May 4 2020, 2 days after they pushed 3.6.12 on roomba i7. Reddit users have been pushed 3.6.6.
Clearly my version 3.6.12 did not fix the issue reported in 3.6.6.

Problem has been around 23 days now, I guess I have to figure out how to call EMPTY bin from HA automation. I already have roomba i7 automation turn on/turn off lights (some of the rooms) .
got to lookup rest980 curl command to trigger empty bin.

thanks for the tip.

1 Like

anyone else with this latest software update from irobot, you’ll notice the bin is not emptied anymore. You’ll need the shell command and this automation script. it is triggered when roomba is docked and clean base status changes to 360. Side effect, after the bin is emptied, the clean base status error code 360 is cleared, then another empty bin command is executed.

#automation.yaml section
- id: vacuum_empty_bin_irobot_bug_fix
  alias: Vacuum Empty Bin iRobot bug fix
  initial_state: true
  trigger:
    platform: template
    value_template: "{{  state_attr('sensor.rest980','dock')['state'] == 360 }}"
    for:
      seconds: 10
  action:
  - service: shell_command.vacuum_empty_bin

#configuration.yaml section
shell_command:
    vacuum_empty_bin: wget http://127.0.0.1:3000/api/local/action/dock -o /dev/null

Hey Jeremy, I’m having some trouble here - a few issues. I assume what I’m trying to do hasn’t been implemented (1/3 of my problems), and the rest may be bugs or lack of understanding on my end.

I have a multi-story home, which is covered by multiple maps. I started with the basics (my main floor) and got this integrated with my hass.io VM. I was able to communicate with the roomba, pull in statuses, do a full clean, and do selective cleaning - everything seemed to work just fine (aside from the map, which I hadn’t set up). It was great, seriously impressed with the state of affairs. Then came the issues…

  1. I took a screenshot of my floor plan from the roomba app, scaled it, and uploaded it as floor.png - no issues there. The roomba’s tracks were rendered sideways and at the top-left of image, so I tried to set offsets and rotation to get it lined up. When setting a 90/270 rotation, the lines would get skewed such that all dots would be in a row at a 45-degree angle. When setting rotation along with x/y offsets, the roomba’s lines would either completely disappear, or end up stuck in a corner - offsets then had no effect. Smaller degrees of rotation (<90) worked fine. If I rotated the base image 90 degrees and set the x/y offsets with no rotation, I could get it lined up - but that’s not a very logical view of my home. So, I abandoned the maps for the time being to be revisited later. Is this a bug in rendering that anyone else has encountered?

  2. After abandoning the maps, I ran my roomba to clean up from dinner last night. I left my bathroom door open, which was not included in my floorplan (I keep that one closed) - the roomba learned a new space at that point. I thought this was impossible for the i7, so was excited to see that it could still update its maps based on new info (bathroom/closet/etc left open), so I update the smart map with this new info. Now the selective rooms are broken… When running a selective cleaning job via HA, the roomba says to check the app which shows a stuck status with a smart map error. I read through as much as I possibly could in a few hours, and saw that there is/was a “vacuum_floorplan” and “vacuum_user_floorplan” variable that could be set, which seemed to correspond to a pmap_id and user_pmapv_id value. I set those values assuming they’d reference the new map the Roomba built, but still no luck. I rebuilt the rest980 image, no luck. Uninstalled and re-installed the add-on, no luck, Double and triple checked my region IDs against the output in ‘/api/local/info/state’, they’re good. This is now broken, and there’s nowhere near enough documentation to fix it. Full clean jobs still work. What can I do to fix this?

  3. In digging at #2, and trying to read up on how I could possibly integrate multiple stories/floorplans to this HA plugin (even without rendering maps), it seems that this would be impossible. There doesn’t seem to be a way to tell this plug-in “these rooms are on that floor plan” and switch pmap_id’s. Is that correct, and is this on the roadmap anywhere? Is there a workaround for the time being?

hass version: 0.109.6
rest980 image version: 20200205
Roomba model: i7
Roomba version: 3.2.9

are you using the latest updates for the ha-rest980 repo? it has been updated semi-recently to use rotate angle rather than rotations. check out the latest image.php which might help?

it might also be a good idea to first out a blank/transparent backgounnd in first, and then size/scale/offer the roomba lines on screen to what you want, then access the url with “/image.php?last=true” which will save a copy of it in the roomba directory.

copy this out and open it in paint.net, then using the layering functions, underlay your floorplan snapshot and get it correct before uploading the floor.png file back to the roomba directly

make sense-ish?

this might help - ha-rest980-roomba/FAQ.md at d9c746fbd23fc7e4a96ed1ac6acd9faaf442fbf6 · jeremywillans/ha-rest980-roomba · GitHub

this is a new feature - are you running the beta?

check the latest repo change for vacuum.yaml which dynamically selects the pmapid and timestamps now to fix this the dynamic updates!

the dynamic pmap values reference the first entry in the list for these fields (referenced by the appended [0]), which allows expansion by creating a second set i.e. pmap1

you would need to write a second automation for your second floor referencing these values to send to the robot for cleaning. i dont have a second floor (apartment living) so cant test it unfortunatley :frowning: happy to help you through it though :slight_smile:

are you using the latest updates for the ha-rest980 repo?

I set all of this up on Monday, May 11th. It doesn’t look like anything in the repo has changed since then. The image.php I have locally matches the one in your repo - aside from the changes I made for line placement/etc.

it might also be a good idea to first out a blank/transparent backgounnd in first, and then size/scale/offer the roomba lines on screen to what you want, then access the url with “/image.php?last=true” which will save a copy of it in the roomba directory.

I used GIMP to create the background image, scaled it to a reasonable size, set the width and height of the image into image.php, then adjusted x/y offsets, rotation, scaling, etc. By rotating the background image 90 degrees and flipping width/height, I was able to get a pretty good overlay. However if I tried to rotate the angle of the lines along with setting the offset to align the base position, the lines wouldn’t render - or would render incorrectly. I followed the guidance in the FAQ as well. Examples below:

This is what I managed to get working with a rotated background (no flip, no rotation, just x/y offsets and scale, which still need a little tweaking) Here is x:350;y:60;scale:0.9:

When adding rotation, instead of rotating the background, the x/y gets inversed kicking the robot+lines outisde of the image’s bounds. Setting negative offsets brings it back, but the lines are not rendered correctly. Here is x:-100;y:-100;angle:180;scale:0.9 parsing out the same job as the image above - notice the lines aren’t rendering properly: Hardlinked, because new users can only include one image in a post

this is a new feature - are you running the beta?

Nope, this is apparently a prod feature now.

check the latest repo change for vacuum.yaml which dynamically selects the pmapid and timestamps now to fix this the dynamic updates!

I’m running the latest, pulled down from your repo on Monday, May 11th.

you would need to write a second automation for your second floor referencing these values to send to the robot for cleaning

If I can get selective cleaning working again for a single pmap, I’d love to dig into this. Would it also be possible to render a different background image for the new map (perhaps invoke a image2.php via that automation)?

ok, selective cleaning -
with the “creation” of a new room, did you label this room in the irobot app? perhaps this has reassigned the id fields for your rooms? (tho i doubt it) maybe run a select clean from the irobot app and verify the id assignments vs the vacuums.yaml

in dev tools - lookup sensor.rest980, and check under the pmaps section that the fields match with whats listed under sensor.vacuum attributes for pmap0_id and timestamp

if you run a clean on a single room, does this also fail?

regarding the maps - the rotation is intended to only move the lines, not the background.

yes you could make an image2.php, the trick here would be to have a input_select (or boolean, etc) linked to the “Clean room” button for the respective floor your cleaning. This would then be a condition for the image clear and generation automatons (duplicate these pointing at the respective image php file) and also use this with something like state_switch to show a different camera, as you will need separate ones for each floor.

would be a good start! :slight_smile:

with the “creation” of a new room, did you label this room in the irobot app?

When the Roomba learned the new area, I didn’t mark it off as a room when updating the map. I just let it get lumped in with the dining room. The room IDs didn’t change per /api/local/info/state when using the iRobot app, they still match what’s in vacuum.yaml

in dev tools - lookup sensor.rest980, and check under the pmaps section that the fields match with whats listed under sensor.vacuum attributes for pmap0_id and timestamp

They match, but they don’t match what the iRobot app is using.
Values from sensor.rest980:

pmaps: 
- UddbevrQTbK5JyoMFoIIgg: 200512T015644
- ujNXp260QWK85p4wyHqbXg: 200511T062924

Values from sensor.vacuum:

pmap0_id: UddbevrQTbK5JyoMFoIIgg
pmap0_timestamp: 200512T015644

Values from lastCommand via /api/local/info/state (invoked via the Roomba app for kitchen and dining rooms):

pmap_id: UddbevrQTbK5JyoMFoIIgg
user_pmapv_id: 200509T075142

This seems to be the opposite of what I’d expect to see here… It seems that the iRobot app is using a version of the map from May 9th (perhaps it just modified this version when updating), whereas rest980 is attempting to invoke a newer version from May 12th. Attempting to run a new selective cleaning or full cleaning job doesn’t update these values under /developer-tools/state either. Curious how those values got set in HA, and why the i7 doesn’t accept them.

Note: Assuming user_pmapv_id is a UTC timestamp, 200509T075142 would be approximately three minutes after the third cleaning job ended on that floor. It initially learned both of my maps after 3 runs each. This is almost certainly the original timestamp of when the map was made (or when I finished naming it and configuring rooms).

  • 200512T015644 roughly lines up with when when this floor plan would have been updated with the newly discovered area.
  • 200511T062924 Is oddly about an hour before the third cleaning job for my second map would have ended (when the map would have been fully learned). I assume there’s an error on iRobot’s end, since it shows as beginning right at midnight on my app’s history (likely false, but don’t recall).

if you run a clean on a single room, does this also fail?

Yup. Only the “Full Clean” functionality works in HA. Any combination of selecting rooms will fail.

Maybe try making come changes to the map (labels/no go zones,etc.) and see if the timestamp updates for both state and irobot cleans?

I’m running the same firmware in the i7+ and don’t have this issue :grimacing:

Interesting… Changing room labels did change the timestamp on /state and that was reflected in both sensor.rest980 and sensor.vacuum (it did not change room IDs though). You’d think a label changing wouldn’t update the map version, but the area of the map itself changing would. Oh well, selective cleaning via HA works again now.

Very curious why learning a new area didn’t result in a map timestamp change on the i7’s end, but did on rest980’s end. Wonder if there’s a way to mitigate this issue via rest980…

Now, to get multiple floors working in HA. I’m pretty new to both HA and rest980, but I’d love to figure this out. To get me on the right track, would you mind going over and providing feedback on my understanding of what needs to be done? Any feedback you can provide would help a ton, I’m not sure that these are even the right approaches to take.


The general gist of getting multi-map functionality/automation itself working is:

  • Create a fold-entity-row card for each map, invoking a map-specific automation
  • Modify vacuum.yaml to have a unique “Vacuum Clean Rooms” automation per map. For each:
    • Have a unique alias for each, to be invoked by the pertinent fold-entity-row card
    • Specify the pertinent pmap_id and pmapv for each (see first question below)
    • Specify the pertinent region ID(s) for the room(s) on that map (see second question below)

Issues that I see right off the bat:

  • sensors.vacuum only has one set of pmap values at a time (in my case, it’s always pmap0 - my main floor).
    • I assume this can be remedied by using regex to extract the ID and timestamp from state_attr('sensor.rest980', 'pmaps')[SOME_INDEX] instead of state_attr('sensor.vacuum', ID_OR_TIMESTAMP) - right? Is there a reason this isn’t a good approach?
  • The region IDs will vary, and will be re-used across the maps.
    • I believe that these values reference the input_text objects declared in vacuum.yaml and secrets.yaml by name, retrieved as input to the automation from the fold-entity-row card that the button exists on. It’s not really clear to me how this info is getting passed from the card to the automation though. I assume so long as the input_boolean names in the card match the relevant input_text names in yaml, this should “just work” with no changes to the automation, right?

And for the rendering of the map:

  • Duplicate image.php, one to be invoked per floor plan
    • Point each to a unique floor.png for that map’s background image
    • Configure each to use x/y/rotation/etc to align the grid on that floor.png
    • Keep everything else the same
  • Add some type of field in the fold-entity-row to specify a floor number (or other map identifier) that corresponds to a version of image.php
  • Create an input_text.vacuum_map value for each image.php copy
  • Somehow switch between the vacuum_map variables within the “Vacuum Clean Log” and “Vacuum Generate Image after Cleaning” automations based on the field from the fold-entity-row card.

Issues that I see/questions I have:

  • This is beyond my current understanding of these automations and HA as a whole.
    • How should I specify a floor number in the fold-entity-row card that isn’t human input? Is there some type of static variable I can hardcode into that card itself that doesn’t render in the UI?
    • How should I switch between the various vacuum_map’s based on this value? I don’t understand how the clear and generate automations are being kicked off, and what type of input they have available to them when this occurs. I also don’t know what language/syntax I would write an if/case statement in within this yaml based on that input.
    • Only switching the floor.png and grid rendering would allow everything else to function as normal, right? Would the camera view card render the generated image regardless of which image.php the automations invoke, or does that use a specific image.php itself to render the image?

Hi Guys,

I hope somebody can help me…

I have a brand new iRobot Roomba 676 with the latest firmware, version 3.3.47-77

I have tried everything what I found on the internet to get the password.

  • NickWaterton’s python app,
  • koalazak’s nodejs app (from native Windows, and from docker…)
  • I was naive, becouse I have tried to get the password with wireshark, but I realized the packets are encrypted… Of cource its encrypted… Port 8443 refers to this…
  • and today I have tried with no success jeremywillans’s hassio addon to get pw…

error output:

events.js:292
throw er; // Unhandled ‘error’ event
^
Error: connect ETIMEDOUT MyRoombaIP:8883
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1142:16)
Emitted ‘error’ event on TLSSocket instance at:
at emitErrorNT (internal/streams/destroy.js:100:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -110,
code: ‘ETIMEDOUT’,
syscall: ‘connect’,
address: ‘MyRoombaIP’,
port: 8883
}

Of cource my iRobot App was offline during the process. I dont know what should I do with it… I think the newer firmware cause the issue, but I don’t know how to downgrade my roomba. Factory reset update it immediately back to the latest firmware.

Does anybody has any idea what should I do? :slight_smile:

I’ll craft a response for you on Monday :+1:

Just confirming

  • you can ping the robot using this IP
  • you are holding the home button for 2sec not the clean button?

Yeah it’s wierd I’ll admit! The data from the robot (states is what’s pulled from the robot) should match what the app is using… soooo :man_shrugging:

Yes, I can ping it and yes I am holding the “home” button (dock + spot) for 2 seconds and the roomba beeps.

I have also tried to reboot my roomba with holding the home button for 10 seconds. :confused:

Hi all,

yesterday i got my iRobot Roomba E5, i was looking for way to get it implemented into HomeAssistant. Found this addon, but i dont need stuff like map and multiroom setup, because Roomba E5 doesn´t support that.

So i overwritten this lovelace card for Roomba E5 and add some minor tweaks to fit my style.

If someone looking for way how to implement iRobot Roomba E5 into Home Assistant, here you go :slight_smile:

README is going to be updated, with steps and credits to @Syrius

@pasleto glad you like the concept! Can you please by chance confirm the steps you used to get the e5 blid/password for @medaK

Cheers :beers:

@Syrius I used dorita980 getpassword.js straight from the command line, i think the blid/password retrieve process is the same on all Roomba vacuums :slight_smile: I think @medaK is pressing wrong key :slight_smile: according to (dock + spot) in his message, dock+spot is used to bluetooth connection with phone to setup the robot, not for dorita980 app, you just need to hold dock button for 2 second after start the nodejs app, dock button should be the one with home icon :slight_smile: