iRobot Roomba i7+ Configuration using Rest980

This is expected as sensor.rest980 connects to this to get the vacuum states and make them available to the template sensor.vacuum.

Can you reach this URL in a web browser?
http://192.168.1.50:3000/api/local/info/state

yes

{"netinfo":{"dhcp":true,"addr":*****,"mask":******,"gw":*******,"dns1":****,"dns2":0,"bssid":"******","sec":4},"wifistat":{"wifi":1,"uap":false,"cloud":1},"wlcfg":{"sec":7,"ssid":"*********"},"mac":"*******","country":"SI","cloudEnv":"prod","svcEndpoints":{"svcDeplId":"v007"},"mapUploadAllowed":true,"localtimeoffset":120,"utctime":1588619760,"pose":{"theta":7,"point":{"x":174,"y":-388}},"batPct":100,"dock":{"known":false},"bin":{"present":false,"full":false},"audio":{"active":false},"cleanMissionStatus":{"cycle":"none","phase":"charge","expireM":0,"rechrgM":0,"error":0,"notReady":7,"mssnM":225,"sqft":582,"initiator":"localApp","nMssn":335},"language":0,"noAutoPasses":false,"noPP":false,"ecoCharge":false,"vacHigh":false,"binPause":true,"carpetBoost":true,"openOnly":false,"twoPass":false,"schedHold":false,"lastCommand":{"command":"stop","time":1588436201,"initiator":"localApp"},"langs":[{"en-UK":0},{"fr-FR":1},{"es-ES":2},{"it-IT":3},{"de-DE":4},{"ru-RU":5}],"bbnav":{"aMtrack":74,"nGoodLmrks":27,"aGain":55,"aExpo":10},"bbpanic":{"panics":[8,8,6,8,11]},"bbpause":{"pauses":[17,0,0,3,0,5,4,17,0,17]},"bbmssn":{"nMssn":335,"nMssnOk":144,"nMssnC":125,"nMssnF":60,"aMssnM":145,"aCycleM":80},"bbrstinfo":{"nNavRst":47,"nMobRst":0,"causes":"0000"},"cap":{"pose":1,"ota":2,"multiPass":2,"carpetBoost":1,"pp":1,"binFullDetect":1,"langOta":1,"maps":1,"edge":1,"eco":1,"svcConf":1},"hardwareRev":2,"sku":"R980040","batteryType":"lith","soundVer":"32","uiSwVer":"4582","navSwVer":"01.12.01#1","wifiSwVer":"20992","mobilityVer":"5806","bootloaderVer":"4042","umiVer":"6","softwareVer":"v2.4.6-3","tz":{"events":[{"dt":1583082000,"off":60},{"dt":1585443601,"off":120},{"dt":1603587601,"off":60}],"ver":8},"timezone":"Europe/Ljubljana","name":"Pucika","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]},"bbchg3":{"avgMin":65105,"hOnDock":23168,"nAvail":1422,"estCap":12311,"nLithChrg":285,"nNimhChrg":0,"nDocks":38},"bbchg":{"nChgOk":280,"nLithF":0,"aborts":[0,0,0]},"bbswitch":{"nBumper":57897,"nClean":985,"nSpot":7,"nDock":38,"nDrops":2503},"bbrun":{"hr":460,"min":5,"sqft":1493,"nStuck":95,"nScrubs":561,"nPicks":1788,"nPanics":1078,"nCliffsF":5990,"nCliffsR":3098,"nMBStll":5,"nWStll":5,"nCBump":0},"bbsys":{"hr":25604,"min":26},"signal":{"rssi":-38,"snr":51},"connected":true}

ok well the addon is working as expected.

are you still seeing errors in the log?

Can you please PM me your code sections and ill have a look.

1 Like

Release Update 0.5

Adding the dynamic pmap fields works great for i7/s9 models - but as it turned out, when using a different model, the sensors break. :frowning:

Ive updated the code on GH to add better error handling to prevent this! :slight_smile:

As suggested by @LordShadowen, the Lovelace Card Repo has also been updated to hide the Buttons during the Pending and Empty stages.

1 Like

Hi @Syrius
thanks for the update, I deployed the changes, i started getting these errors in my log after HA was restarted without running any clean operation.

2020-05-05 23:30:37 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.vacuum fails IndexError: list index out of range

I don’t know if its related to regex_findall_index function to attribute templates
pmap0_id, pmap0_timestamp, I only looked at them because the syntax highlighting caught my attention.

for my roomba i7 this -> {{ state_attr('sensor.rest980', 'pmaps')[0] }}
returns something like this -> {‘qvibGC8-Rs8MQkOpOWyMst’: ‘191207T170344’}`

testing both regex shown below in developer tools template i get
“Unknown error rendering template”

{{ state_attr('sensor.rest980', 'pmaps')[0] | regex_findall_index("{'(\w+)': '\w+\'}") }}
{{ state_attr('sensor.rest980', 'pmaps')[0] | regex_findall_index("{'\w+': '(\w+)\'}") }}

I fixed the regex issue by replacing \w with [\w\-] in the 1st portion only, i changed the \' to ' to balance the single quotes, it did not cause any errors

now I have these 2

{{ state_attr('sensor.rest980', 'pmaps')[0] | regex_findall_index("{'([\w\-]+)': '\w+'}") }}
{{ state_attr('sensor.rest980', 'pmaps')[0] | regex_findall_index("{'[\w\-]+': '(\w+)'}") }}

the output of both lines now is the following 2, the errors so far seemed to have stopped. did a quick dry run performing selective cleaning small room no errors.

qvibGC8-Rs8MQkOpOWyMst
191207T170344

hmm ok… what version of HA are you running?

I’m on 0.109.4 and this works as expected
{{ state_attr('sensor.rest980', 'pmaps')[0] | regex_findall_index("{'(\w+)': '\w+\'}") }}

I upgraded to 0.109.4 just today before I upgraded Roomba.
The issue is my Roomba is returning - in the 1st value
the regular expresion \w i think it matches A-Z a-z 0-9 and _ but not -.
im guessing your roomba pmaps 1st returned value does not have -

aaah true point

thanks and noted, ill update the repo to use your strings :+1:

hey @Syrius!
great work!

did I get it right that the rest-980 plugin excludes the official roomba plugin now?
I don’t get location information with the official roomba plugin, I see it in /api/local/info/state though.

Now how do I get my vacuum.roomba entity back? To even start/pause the robot?
(I just migrated from 108.0 and up until this point still used my old method with automations to generate the map, maybe you can give me a hint on how I can continue using this because I don’t even have the room cleaning feature with my 960 unfortunately , thanks)
Thanks

Anyones i7 on software version 3.6.6? Having issues now and I’m wondering if its to do with this new firmware.

The rest980 plugin is completely separate from the official plugin and they don’t play nice together :slight_smile:

Regarding the missing position info in the official integration - 0.109.6 which has a fix to restore this! #35316

1 Like

Aus Region latest is 3.2.9 :frowning:

What issues you noticing?

I noticed they pushed something to mine too , my version is 3.6.12 it was pushed on Tuesday May 2. I also noticed The clean base status had code 360 last night. vacuum.yaml doesn’t have a mapping above 353.

The 360 changed to 301, when I launched my iRobot app and clicked on the tutorial that popped up. it’s been a month since I last started it. The tutorial showed I can choose cleaning rooms in specific order. I modified my schedule to setup room clean order, it completely ignored it this morning. So I deleted it and recreated it see if that’ll help tomorrow.

my unit has become more temper-mental, it complained it was stuck when it was on the dock station, on Tuesday it game me a notification it had “localization problem” Error 42. The unit was docked, but the HA vacuum map showed it was somewhere else. That was same day as the new software was pushed though.
“Error 42 means that your roomba failed to re-localize during a direct cleaning job using smart maps and the map may also appear to not look correct in the app”

Firmware is too new for me to notice any other issues yet. Today it worked without a hitch except room clean order.

maybe there was a bug in 3.6.6 and they fixed it quickly to my 3.6.12 version.

yeah in the command section there is an “ordered” attribute, but ive found it also does squat.

I did see on reddit that this feature was in beta and changes the “ticks” to “numbers” when selecting the rooms for cleaning - so maybe its still coming?

I already have updates to vacuum.yaml ready in my dev config to go for when this feature works :wink: :+1:

yeah i only added the onces i have seen lol - i added 303 recently also for the clean base which seems to be when the empty cycle is verifying… :man_shrugging:

I think my problem was to do with the beta option I had to automatically update the map as it detects updates. It also decided randomly to start cleaning my house at a 45 degree angle. I don’t recommend having that beta option enabled haha.

So, guys, @Syrius, @strumf666, was the issue fixed?
I mean this one iRobot Roomba i7+ Configuration using Rest980
I’m asking because I’m experiencing it right now :frowning:

It seems that a root cause of the issue is in vacuum.yaml:
pmap0_id: >-
{{ state_attr(‘sensor.rest980’, ‘pmaps’)[0] | regex_findall_index("{’(\w+)’: ‘\w+’}") }}
pmap0_timestamp: >-
{{ state_attr(‘sensor.rest980’, ‘pmaps’)[0] | regex_findall_index("{’\w+’: ‘(\w+)’}") }}

An answer from my Roomba doesn’t have “pmaps”

I updated the code in the repo to better protect against this issue, however if your model dosent support this can you can just delete these attributes.

1 Like

First off I want to say thank you to Jeremy and everyone who is helping develop these awesome tools. I’m fairly new to Home Assistant and trying different things. I’ve started through the steps listed for this but got stumped around step 6 and beyond. Has anyone created a walk-through or a video guide on how to set this up? I know everyone’s setup is different but seeing someone do the steps is often a big help for me to learn new things. If it makes a difference, I’m using a RP4 with hassio installed.

1 Like

Hi Joshua,

Thanks :slight_smile:

There is no walk through available at this stage, PM me and ill help you through it.

Cheers,
Jeremy