iRobot Roomba

@gorbypark you just use the service on Home Assistant to put the broadlink in learning mode. Point the remote control to the top of the broadlink and press a button you want to learn. Then on your home assistant interface you’ll see code in a card.

Ah, that makes sense. I don’t actually have the remote for my Roomba to use in learning mode. If it’s not too much trouble, any chance you could get me the rest of the codes, up/down/left/right/dock etc?

Did you integrate Roomba 880 with HA ?

I still can’t get the 880 password. Seems the 3.2.10 firmware blocks any attempt.

I’ve got the following error once added roomba to configuration:
2018-07-03 18:01:36 ERROR (SyncWorker_2) [roomba.roomba.Roomba] Error: [Errno 2] No such file or directory
HA service failed to start, when roomba configuration is commented out - startup is OK.

vacuum:

  • platform: roomba
    host: 192.168.1.48
    username: XXXXXXXXXXXXX
    password: XXXXXXXXXXXXX
    name: Robo

Some more logs:
Jul 6 15:40:00 miniserv scl: 2018-07-06 15:40:00 INFO (MainThread) [homeassistant.components.vacuum.roomba] Initializing communication with host 192.168.1.48 (username: XXXXXXXXXXXX)
Jul 6 15:40:00 miniserv scl: 2018-07-06 15:40:00 INFO (SyncWorker_13) [roomba.roomba.Roomba] Connecting
Jul 6 15:40:00 miniserv scl: 2018-07-06 15:40:00 INFO (SyncWorker_13) [roomba.roomba.Roomba] Seting TLS
Jul 6 15:40:00 miniserv scl: 2018-07-06 15:40:00 ERROR (SyncWorker_13) [roomba.roomba.Roomba] Error: [Errno 2] No such file or directory
Jul 6 15:40:00 miniserv scl: Config directory: /home/homeassistant/.homeassistant
Jul 6 15:40:00 miniserv scl: CV or numpy module not found, falling back to PIL
Jul 6 15:40:00 miniserv scl: PIL module not found, maps are disabled

Any suggestions?

1 Like

Found a fix for the issue, several steps.

  1. Install following packages for your HA virtualenv:
    pip install opencv-python
    pip install Pillow
    pip install numpy

  2. PyPI have outdated version of Roomba module (1.2.1). Download and update your virtualenv with version 1.2.3: https://github.com/NickWaterton/Roomba980-Python

  3. Modify roomba.py - add catching FileNotFoundError:
    self.log.info("Seting TLS")
    try:
    self.client.tls_set(
    self.cert_name, cert_reqs=ssl.CERT_NONE,
    tls_version=ssl.PROTOCOL_TLSv1)
    except (ValueError, FileNotFoundError):

3 Likes

@gooorooo awesome! nice find. do you find you can do anything with this? i was hoping to look into how the roomba generates the map that the app uses, and maybe create a hass camera that shows the last map the roomba saw

I’ve created a pull request with some code changes and proposed to publish most recent version in PyPI repository. All the next steps are on NickWaterton’s side.
No plans to enhance current Roomba module - I’m newbie with HA code at the moment.

Hi! I have trouble getting trash bin status on my dashboard, I’m using the code below. The problem is that the template sensor says “OK” even though the bin actually is full, can anyone help me? :frowning:

  - platform: template
    sensors:
      roomba_bin_state_template:
        friendly_name: 'Cleos behållare'
        value_template: >-
          {%- if "states.vacuum.roomba.attributes.bin_full", "false" %}
              OK
          {%- elif "states.vacuum.roomba.attributes.bin_full", "true" %}
              Behöver tömmas (needs to be emptied)
          {%- else %}
              Ingen kontakt (offline)
          {%- endif %}

Does the bin_full attribute ever change to true?

Mine does every time the bin gets full yeah :slight_smile: and I finally got it working now throught this thread: Get attribute in template sensor

Seeing as this old thread is not yet dead, I guess I’ll go ahead…
My roomba 890 is missing the bin_full attribute, any ideas?

Here’s the listed attributes:
status: Charging
battery_level: 100
battery_icon: mdi:battery-charging-100
bin_present: true
software_version: 3.2.10+32
friendly_name: newt
supported_features: 479

Turn on debugging for roomba.roomba package and paste what you’re getting?

I can try to help but I have 960 so can’t test directly

1 Like

@davejcameron any chance in getting the rest of the IR codes

I like that the new Roomba models can be controlled by voice, very cool.
I read about it in a blog Roomba and bought one =)

@xstrex Got a 896 and had issues with the missing bin_full attribute as well.
I managed to find the problem: the roomba script checks for the entry “binFullDetect” in the capabilities, which is missing. Therefore it does not read out the entry “full” from the bin states, which does exist.

I’m not sure what to make out of all those entries in the capabilities, so as a quick fix, I just made a custom component for roomba and removed this check.

Hello,

I’m getting the same error (Error 2 No such file or directory) but your fix has already been implemented…any ideas?

I’m running roomba i7

I would love this for my Shark Ion robot :frowning:

Looks like HA’s Roomba platform relies on roombapy v1.3.1 (reference, unless I’m mistaken) which hasn’t been updated since August 2017, so it doesn’t include @gooorooo’s fix.

Unless you follow the instructions to update your virtualenv manually, I think the only way to fix is for @pschmitt to update roombapy on PyPI to include the latest changes from Roomba980-Python. I’m not exactly sure how easy that would be since I don’t know what changes went into his fork.

All that said, others seem to be using it fine, though perhaps that is with an older version of HA. I’m on 0.83.1 and still see the [Errno 2] No such file or directory error when I add the Roomba platform to my config file.

after installing all dependencies, as suggested by @gooorooo, i copied /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/components/vacuum/roomba.py (that’s an os x path, change accordingly) into custom_components/vacuum/roomba.py and changed the requirements to

REQUIREMENTS = ['https://github.com//NickWaterton/Roomba980-Python/zipball/master#roomba==1.2.3']

this works for me, though i’m still on homeassistant version 0.75.3. before this change i also got the FileNotFoundError while using the standard component.

also, as suggested here, adding

    roomba.enable_map(
        enable=True, mapSize="(800,1650,-300,-50,2,0)", 
        enableMapWithText=False, roomOutline=False,
        mapPath="/Users/ix/.homeassistant/www/markus/", 
        iconPath="/Users/ix/.homeassistant/www/markus/res"
    )

right after the Roomba() handler is created, works for me: the original library Roomba980-Python now also creates a map for me.