Continuous Updates from Roomba, should be periodic

I setup my iRobot Roomba 671 in Home Assistant and it seems to be communicating more frequently then I was expecting. I’m not sure if this is normal even with continuous mode disabled. Here is a snippet of my logs, the process is constantly repeating:

2018-10-14 20:32:56 INFO (Thread-4) [roomba.roomba.Roomba] Attempting to Reconnect
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Roomba Connected
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : wifistat, b'{"state":{"reported":{"netinfo":{"dhcp":true,"addr":2886860824,"mask":4294967040,"gw":2886860801,"dns1":2886860801,"dns2":0,"bssid":"80:2a:a8:d1:ac:25","sec":4}}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : wifistat, b'{"state":{"reported":{"wifistat":{"wifi":1,"uap":false,"cloud":1}}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : wifistat, b'{"state":{"reported":{"netinfo":{"dhcp":true,"addr":2886860824,"mask":4294967040,"gw":2886860801,"dns1":2886860801,"dns2":0,"bssid":"80:2a:a8:d1:ac:25","sec":4}}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 DEBUG (Thread-183) [roomba.roomba.Roomba] Subscribed: 174 (0,)
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : wifistat, b'{"state":{"reported":{"wlcfg":{"sec":7,"ssid":"42486F6D6557696669"}}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : wifistat, b'{"state":{"reported":{"mac":"40:9f:38:f9:a1:a1"}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"country": "US"}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"cloudEnv": "prod"}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"svcEndpoints":{"svcDeplId": "v007"}}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"name": "Rosie The Roomba"}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"cap":{"ota":1,"eco":1,"svcConf":1},"cleanSchedule":{"cycle":["none","none","none","none","none","none","none"],"h":[0,0,0,0,0,0,0],"m":[0,0,0,0,0,0,0]},"language":0,"cleanMissionStatus":{"cycle":"none","phase":"charge","expireM":0,"rechrgM":0,"error":0,"notReady":0,"mssnM":74,"sqft":0,"initiator":"","nMssn":81},"dock":{"known":true},"bin":{"present":true,"full":false},"batteryType":"lith","batPct":100,"mobilityVer":"6836","bootloaderVer":"4","soundVer":"13"}}}'

2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"langs":[{"en-US":0},{"en-GB":15},{"fr-FR":1},{"de-DE":2},{"es-ES":3},{"es-XL":11},{"pt-PT":12},{"pt-BR":19},{"it-IT":4},{"nl-NL":5},{"da-DK":6},{"sv-SE":7},{"nb-NO":8},{"fi-FI":16},{"pl-PL":10},{"cs-CZ":17},{"ru-RU":18},{"he-IL":20},{"ja-JP":13},{"zh-CN":14},{"zh-TW":9}],"audio":{"active":false},"binPause":false,"carpetBoost":false,"noAutoPasses":false,"noPP":false,"openOnly":false,"twoPass":false,"vacHigh":false,"sku":"R671020","timezone":"America/New_York"}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Received Roomba Data : $aws/things/3148401080922780/shadow/update, b'{"state":{"reported":{"tz":{"ver":5,"events":[{"dt":1522598400,"off":-240},{"dt":1541311201,"off":-300},{"dt":1552201201,"off":-240}]},"ecoCharge":false,"wifiSwVer":"3.3.19-remotes/origin/release/3.3@4f9f669/11","softwareVer":"3.3.19-remotes/origin/release/3.3@4f9f669/11","lastCommand":{"command": "start", "time": 1539515388, "initiator": "alexa"},"schedHold":false,"hardwareRev":2}}}'
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] updated state to: Charging
2018-10-14 20:32:59 INFO (Thread-183) [roomba.roomba.Roomba] Disconnected From Roomba
2018-10-14 20:33:00 INFO (Thread-4) [roomba.roomba.Roomba] Attempting to Reconnect

My configuration:

#Roomba
vacuum:
 - platform: roomba
   host: 172.18.0.24
   username: SomeUsername!
   password: SomePassword!
   continuous: false
   name: Rosie The Roomba

I am seeing a log message indicating its running in periodic mode, so I believe its configured correctly:
2018-10-14 20:43:11 INFO (MainThread) [roomba.roomba.Roomba] PERIODIC connection

1 Like

Having the same issue. Did you find a solution yet? -Joe

ok, I figured it out. The roomba.py library is hardcoded with an interval of 1 second for connect/disconnect when set to PERIODIC (continuous: False)

I changed the hard-coded value to 120 here:

The roomba.py is located at ~/homeassistant/lib/python3.6/site-packages/roomba/roomba.py for a standard HA install.

2 Likes

Sorry to ressurect this thread, but is this the reason a Roomba seems to stay “active” when connected to HA? By “active” I mean that the “Clean” light (and I think the Wifi and battery icons) stay lit constantly? I only just hooked up my Roomba last night after some trial-and-error getting the BLID and password (from a secondary Linux laptop… not the HA box). I got a little nervous that I would “fry” a $400 robot, so I disabled the connection to HA until I searched for an answer…

I’m running a HASS.IO install in case that matters?

I believe so, I checked my HA log and it was just constantly filling up with connections to my Roomba.

If I am running HASSIO, how do I edit the file roomba.py?

Apologies as I’m not familiar with running HASSIO, I run HA on Docker. From the cli you might try running

find / -name roomba.py

It should help you find where the file is.

Hello,

Did you find the location of the file?

Thanks!

Thanks for following up. I ran the command and it didn’t return an error, but it didn’t show where the file is located.

Sorry to ressurect an old topic but my question seems relevant.

I’ve just integrated roomba with HA using continous update and I’ve found a sensible battery drain during cleaning that can be estimated more or less to 30%.
Did you experienced the same behaviour and any benefit switching to periodic with a higher polling time?

Thank you for sharing your experience.

Hi,

Just updated roomba integration, I hope in next release you be able to set custom delay in home-assistant configuration.

3 Likes

Thanks. I’ve been trying this out, but even putting a high delay the light on the roomba stays on, and I see very frequent traffic going back and from to the roomba.

When I remove the integration the traffic stops. So something is still continuously polling…

found the problem, it just time of connection equals to delay
so if you put 10 min delay, it will be 10 min connection time.
fixed it already in roombapy library, soon will update HA integration

1 Like

Thank you very much!

My Roomba 966 reports it’s position and status ca. every 15 seconds. Is it possible to make it report more often? Is this connected with the continuous/periodic problem?

Hello,

Do you know if this has been updated to HA integration already?

I have set the delay to 60 seconds, but the light is still constantly on. (HA Version 104.2.)

Thanks!

Unfortunately not, new version of the library is no released, yet.
I would like to make few more fixes, then I will ask the author to release a new version.
And update it in HA

1 Like

Thank you for your response,

I will disable the component for now and wait for the release.

Thanks!

Did anybody ever find the roomba.py in HASSIO? I am getting this error below but I do not have a folder /local under /usr

Roomba Connected with result code 5
/usr/local/lib/python3.7/site-packages/roomba/roomba.py (ERROR) - message first occurred at

Actually if you set

continuous: False,
delay: 60

It will work with periods: 60sec wait, 60sec hold connection.
Also notice that roomba switch off it’s indicator after some time, not immediately when HA disconnects.