iRobot Roomba i7+ Configuration using Rest980

hmm ok, when robot is vacuuming, is the location attribute updating with positions?

I get the following on the :3000/map page:

Last point: 2020-08-24T00:38:02.756Z
Mission Time: 0min
Mission: 33
Bin present: true
Cycle: clean
Phase: run
Flags:
Battery: 100%
Error: 0
Sqft: 0
expireM: 0min
rechrgM: 0min
notReady: 0
theta:
x:
y:

hmm - i dont see the theta/x/y being populated :frowning:

unfortunately it might not be supported by dorita/rest980

That’s what i thought. It’s still a nice integration! Thanks.

1 Like

Here is a first preview…
It’s still missing the roomba graphics and other things but you get the idea.

https://paste.ubuntu.com/p/k8wCQQ2JfR/

the upper image is still using php, the lower card is a < iframe > displaying the roomba.html located in /local/roomba/roomba.html

Note: you still need the automation to create the log file in /local/roomba/roomba.log from my original implementation:

notify:
    - name: RoombaLog
      platform: file
      filename: /config/www/roomba/roomba.log
- alias: Log Roomba Position
  initial_state: true
  trigger:
      platform: state
      entity_id: "sensor.roomba_location"
  condition: 
    condition: or
    conditions:
      - condition: state
        entity_id: sensor.roomba_status
        state: 'Running'
  action:
    - service: notify.roombalog
      data_template: 
        message: "{{ states.vacuum.roomba.attributes.position }}"

- alias: Locate Roomba every 2 seconds
  initial_state: true
  trigger:
    - platform: time_pattern
      seconds: /2
  condition: 
    condition: or
    conditions:
      - condition: state
        entity_id: sensor.roomba_status
        state: 'Running'
  action:
    - service: vacuum.locate
      entity_id: vacuum.roomba
1 Like

Here you can get the finished HTML/Canvas solution to the Roomba Map. Looks pretty much the same way the PHP version does, BUT is a bit more resonsive/faster as you can see in the screenshot (upper image still using my old php):

No additional containers needed, adjust index.html to your needs.
You can use this to make a base64 String of your Images and use it in the Html.
Using the Canvas method one can also animate the roomba icon to “drive” to coordinates in the image, maybe I’ll add this in the future.

1 Like

Thanks @gotschi,

I will test it out and incorporate it into the Guide :slight_smile:

I added a chunk of changes to your original PHP version, did you by chance happen to incorporate any of these into this version? :crossed_fingers:

Hey Jeremy,
I’m afraid I cannot test a bigger part of your added functionality because I have a rather old model (966) which does not support room selected or spot cleaning

I would love to have room selection also in my HA, so maybe I will upgrade my model sometime in the future…
I will take a look at your variables in image.php and see how far I can incorporate the functionality, should be ready by tomorrow :slight_smile:

1 Like

thats ok, it was more of the options in the image.php that directly relates to the conversion from php → js :wink:

let me know how you go :+1: :smiley:

should be good to go, only thing I don’t really know how to handle is rotate_angle
nice work with the color logic btw! I just copied it all :smile:

thanks! ok ill take a look and see what i can come up with :+1:

New Release !!

I have release 0.8 which brings the following notable changes

  • Incorporation of Not Ready status - with new attribute to map status codes to readable messages
  • Removal of the Map Timestamp when invoking selective cleaning - turns out it isnt needed!
  • Fix Rotate Angle, I called this out earlier, but its officially part of this release :slight_smile:

I have also released a new version of the Roomba Card which accounts for the new Not Ready status and includes some other fixes.

Cheers :beers:

Next up will be reviewing the new js based mapping and working out the best method to integrate it

Stay tuned :tv:

1 Like

Hey Jeremy,

Having a couple issues trying to setup this integration. I’ve followed as many steps as I could but some of the instructions weren’t terribly clear in step 2 & 4 as I’m running a normal HASS install (not docker), and also what we’re supposed to do with “packages” in step 6 (beyond moving the files over)?
Anyways, my first issue is that the ui-lovelace.yaml card loads blank when I copy your lovelace.yaml content into it, however, if I just add a simple - entity: sensor.vacuum type: ‘custom:roomba-vacuum-card’ into the ui-lovelace.yaml, I get an error that the custom card couldn’t be found. I’ve tried various different ways to get this to work, checked all the files, and everything seems ok. Because of this issue, I’m not able to kick off the vacuum unless I go to the /map page and try to kick it off there, however, it doesn’t seem to update the api/local/info/state page, as I’ve got no regions still.

Update 1: I may have found the solution (still testing). I had to add the following to the top of my ui-lovelace.yaml file

resources:
  - type: module
    url: /hacsfiles/lovelace-roomba-vacuum-card/roomba-vacuum-card.js
  - type: module
    url: /hacsfiles/button-card/button-card.js
  - type: module
    url: /hacsfiles/lovelace-fold-entity-row/fold-entity-row.js
  - type: module
    url: /hacsfiles/text-divider-row/text-divider-row.js
  - type: module
    url: /hacsfiles/check-button-card/check-button-card.js
  - type: module
    url: /hacsfiles/lovelace-card-mod/card-mod.js

And the following to the top of my configuration.yaml file

homeassistant:
    packages: 
        pack_1: !include vacuum.yaml 

Then after a full server reboot things started populating. Still not sure if everything is working as it should, I’m more than 2 days in on trying to get this to work and still going…

Update 2: Getting new batch of issues/errors. Lovelace card shows everything as “Unavailable” and the /api/local/info/state json page is just “{ }”. No errors in the add-on logs, but an error in the HA logs…

2020-09-11 10:34:41 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-09-11 10:34:42 WARNING (MainThread) [homeassistant.components.lovelace] Resources need to be specified in your configuration.yaml. Please see the docs
2020-09-11 10:34:44 ERROR (SyncWorker_10) [homeassistant.components.rest.sensor] Error fetching data: http://homeassistant.local:3000/api/local/info/state failed with HTTPConnectionPool(host='homeassistant.local', port=3000): Max retries exceeded with url: /api/local/info/state (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7529de5490>: Failed to establish a new connection: [Errno 111] Connection refused'))
2020-09-11 10:34:44 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds.
2020-09-11 10:34:53 ERROR (MainThread) [homeassistant.components.roomba] Timeout expired
2020-09-11 10:34:53 WARNING (MainThread) [homeassistant.config_entries] Config entry for roomba not ready yet. Retrying in 5 seconds
2020-09-11 10:34:55 WARNING (MainThread) [homeassistant.components.template.sensor] Could not render template vacuum, the state is unknown
2020-09-11 10:35:08 ERROR (MainThread) [homeassistant.components.roomba] Timeout expired
2020-09-11 10:35:08 WARNING (MainThread) [homeassistant.config_entries] Config entry for roomba not ready yet. Retrying in 10 seconds
2020-09-11 10:35:14 WARNING (MainThread) [homeassistant.components.template.sensor] Could not render template None, the state is unknown

Beautiful, it works great! Thank you!

1 Like

Update 3: Ok guys, finally got this thing to start working again. Was doing some reading on irobot’s website and tried doing a hard reboot by holding the “clean” button for 10+ seconds. I then kicked it off doing a full clean and after about 30+ minutes into it’s run it started responding back to hass again. Not out of the woods yet, but at least it’s communicating and populating the card.

It looks like your using the Roomba component as well (based on your log output)

If your using rest980 I highly recommend turning this off as they compete for access to the robot and you will hit sporadic issues !!

I struggled with getting this all to work, on one hand because I can’t use packages due to the way I split my configs so I had to do everything manually and on the other hand, because I was doing this with the brand new i3 and at the time was under an NDA so I couldn’t publicly ask for help. Nonetheless I managed to get everything sorted for the most part and even have the map image working, though I still have a ways to go in getting it positioned properly.

Thank you! Your work is amazing and I love the information presented!

Now that the NDA has expired, I can finally ask for help with the one thing I can’t seem to resolve - the maintenance sensors. I have a working MQTT setup and discovery is working with the discovery_prefix option to the point where I was able to get to the step where you click on the check button card to create the sensors.

But mine show “Invalid Date” for all the maintenance sensor timestamp_friendly attributes and no data for the timestamp_timeout attribute in all but one sensor.

As an example, here is the attributes for the sensor.vacuum_maint_clean_filter:

timestamp_friendly: Invalid Date
timeout: 10 days
timeout_timestamp: null
timeout_seconds: 864000
severity:
  - color: '#bf4060'
    value: '-10 days'
    seconds: -864000
  - color: '#bfb540'
    value: 0 days
    seconds: 0
friendly_name: vacuum_maint_clean_filter
icon: 'mdi:checkbox-marked'
device_class: timestamp

For the vacuum_maint_clean_wheel sensor however, I’ve got the following info:

timestamp: ''
timestamp_friendly: '12/31/1969, 7:00:00 PM'
timeout: 18 days
timeout_timestamp: 1555200
timeout_seconds: 1555200
severity:
  - color: '#bf4060'
    value: '-3 days'
    seconds: -259200
  - color: '#bfb540'
    value: 0 days
    seconds: 0
friendly_name: vacuum_maint_clean_wheel
icon: 'mdi:checkbox-marked'
device_class: timestamp

I’m not sure if this is because the i3 is new and needs a different approach or if the i3 simply doesn’t keep track of maintenance or I have set something up incorrectly. I’ve tried troubleshooting this myself looking at the output from http://my_ha_instance:3000/api/local/info/state with PostMan, looking at the traffic with MQTT explorer, etc. but I’m in over my head.

Can you suggest a troubleshooting approach or confirm that this won’t work with the i3? I got the impression that the maintenance sensor should work but wasn’t sure if I set something up wrong or it just isn’t supported. For example, I know that (at the moment) room/region level cleaning isn’t.

Thanks!

Hi ALl,

I want to buy a Roomba but the “Roomba e5” can someone tell me if I can add this vacuum cleaner in HA also with the GitHub tools and Add-on in this topic?

Hi

Is it possible to use native language with this card?

answered on GH - the check button sensors are indepentant of the vacuum and are just to provide a rought guide for recommended robot maintenance.

i dont think the e5 has selecive cleaning so this deployment will not give you huge advantage, other than a fancy lovelace card :slight_smile:

if your referring to the lovelace card, then yes you can, ive exposed the labels in the config so you can ammend as required - check here

1 Like