Roomba 980 Wifi Connectivity Reverse engineering

I added my blid and password and set up your device handler, but my roomba does not seem to be receiving any of the commands.

e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug response data: [status:OK, method:multipleFieldSet]
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug response contentType: application/json
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Connection : keep-alive
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug transfer-encoding : chunked
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Set-Cookie : prd002.irobot-prd-47873-sg-prd002.irobot-prd-agents=DPCJDCAKJCBP; Path=/; Secure
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Server : Microsoft-IIS/5.0
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Date : Sun, 06 Nov 2016 05:14:01 GMT
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Content-Type : application/json;charset=utf-8
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Stopping Roomba
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:14:01 AM: debug Roomba Switch is --------------------------on
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug response data: [status:OK, method:multipleFieldSet]
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug response contentType: application/json
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Connection : keep-alive
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug transfer-encoding : chunked
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Set-Cookie : prd002.irobot-prd-47873-sg-prd002.irobot-prd-agents=DNCJDCAKJCBP; Path=/; Secure
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Server : Microsoft-IIS/5.0
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Date : Sun, 06 Nov 2016 05:13:48 GMT
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Content-Type : application/json;charset=utf-8
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Running Roomba
e71ebcbc-582e-4871-9446-d3e4ed3ecdf4 1:13:48 AM: debug Roomba Switch is --------------------------on

Did you do the base64 conversion?

Yeah is it literally “user:[password]” in 64? I might have used [user]:[password]

Changed to the latter and after resetting the Roomba it is working now! Thanks!

yes, literally. Do not add your actual user name in this string.

@M.a.S.e
I posted a device handler code which allows you to controll the roomba directly through ST hub.

Thank you all the guidance in this thread. Got it to work.

I got my blid/pass with dorita980 and can get the roomba to work through the simulator in the IDE. How do I get the device to show up in my phone app? I published the device handler.

EDIT: Nevermind. New to SmartThings here. Had to add the device. Thanks everybody for all the hard work.

Hi all,

here is another simple way to get stuff running without node.js and all the other things (although this is a grrrreeeeaaaat reference!). Use a browser plugin, like e.g. HttpRequester, and the send the commands to your Roomba 980:

1. Get the password:
(Replace 192.168.10.135 with your robots IP address)
(Place the robot on the home base and press the HOME button for about 2 seconds until a series of tones is played and the WIFI light flashes, then hurry to send the POST command)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 37

{"do":"get","args":["passwd"],"id":1}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":{"passwd":"a1bcdEF23GhIj4KL"},"id":1}

2. Get the username/blid:
(Replace 192.168.10.135 with your robots IP address)
(For the Authorization header, you must Base64 encode the string “user:”+ThePasswordReceivedFromStep1, e.g. Base64(user:a1bcdEF23GhIj4KL) -> dXNlcjphMWJjZEVGMjNHaElqNEtM)
(The decimal “blid” values in the response must be hex encoded to receive the username: 43,6,75,31,32,127,12,132 -> 2B064B1F207F0C84)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 34
Authorization: Basic dXNlcjphMWJjZEVGMjNHaElqNEtM

{"do":"get","args":["sys"],"id":2}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":{"umi":2,"pid":2,"blid":[43,6,75,31,32,127,12,132],"sw":"v1.2.9","cfg":0,"boot":4042,"main":4313,"wifi":517,"nav":"01.08.04","ui":2996,"audio":32,"bat":"lith"},"id":2}

3. Start the robots clean job:
(Replace 192.168.10.135 with your robots IP address)
(See comment of Step 2 for the Authorization header)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 49
Authorization: Basic dXNlcjphMWJjZEVGMjNHaElqNEtM

{"do":"set","args":["cmd" {"op":"start"}],"id":3}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":null,"id":3}

4. Pause the robots clean job:
(Replace 192.168.10.135 with your robots IP address)
(See comment of Step 2 for the Authorization header)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 49
Authorization: Basic dXNlcjphMWJjZEVGMjNHaElqNEtM

{"do":"set","args":["cmd" {"op":"pause"}],"id":4}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":null,"id":4}

5. Resume the robots clean job:
(Replace 192.168.10.135 with your robots IP address)
(See comment of Step 2 for the Authorization header)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 50
Authorization: Basic dXNlcjphMWJjZEVGMjNHaElqNEtM

{"do":"set","args":["cmd" {"op":"resume"}],"id":5}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":null,"id":5}

6. Stop the robots clean job:
(Replace 192.168.10.135 with your robots IP address)
(See comment of Step 2 for the Authorization header)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 48
Authorization: Basic dXNlcjphMWJjZEVGMjNHaElqNEtM

{"do":"set","args":["cmd" {"op":"stop"}],"id":6}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":null,"id":6}

7. Force the robot to return back to its home base:
(Replace 192.168.10.135 with your robots IP address)
(See comment of Step 2 for the Authorization header)

POST https://192.168.10.135/umi
Content-Type: application/json
Connection: close
User-Agent: aspen%20production/2618 CFNetwork/758.3.15 Darwin/15.4.0
Content-Encoding: identity
Accept: */*
Accept-Language: en-us
Host: 192.168.10.135
content-length: 48
Authorization: Basic dXNlcjphMWJjZEVGMjNHaElqNEtM

{"do":"set","args":["cmd" {"op":"dock"}],"id":7}

– Response: –

200 OK
Server:  Marvell-WM
Connection:  close
Transfer-Encoding:  chunked
Content-Type:  application/json

{"ok":null,"id":7}
4 Likes

Thanks for all the great info.

I am trying to send the commands with HttpRequester, but I am getting a response of 0.

I copied and pasted the data into the raw transaction but afte I execute it, it comes back with
– response –
0

Yes, I did change the IP address to that of my Roomba.

Any suggestion?

Sure. I have suggestions:
I guess what you did was just copying the whole request stuff that I showed in the “Content to Send”-TextBox section in HttpRequester. This way you will get a 0 response. You have to set each header separately, one-by-one, in the “Header”-tab.

So, you have to set the URL in the “URL”-dropdown-box, then the headers “Connection”, “User-Agent”, …, “content-length”, etc. in the “Headers”-tab along with the respective values. The only thing that you need to copy to the “Content to Send”-textbox is this:

{"do":"get","args":["passwd"],"id":1}

Don´t forget to insert this carriage-return before {"do…1}.

2 Likes

Hello,

Thanks for the reply.

I have tried entering them individually into the header tab, but still get a response of 0.

Any other suggestions?
Thanks again for the help.

Update I tried using Postman (Chrome ext) and it worked for me. Not sure why me and HttpRequester could not get along, but Thanks again!

Hi,

everything seems to look correct. And if you just enter the URL https://192.168.0.50/umi in your browser? What is the answer? Something like “File not found”? If not, then you seem to have network problems… Can you ping the robot under this address?

Kind regards,
Rene

Thanks for the fast response.

I ended up following your steps but using Postman (Chrome ext) instead of HttpRequester and it worked for me.

Thanks for the help!

I am getting the error “something went wrong: groovyx.net.http.HttpResponseException: Request contains unknown asset ID” when I run the simulator in Smart Things.

I am pretty confident I have the right AssetID. . ElPaso@irobot!xxx with the xxx replaced with the blid value I got.

I know my blid and password are correct because when I use a POST command I am able to start my roomba.

Any suggestions?

Update Changed my BLID to uppercase and now all is well.

I figured it out.

I was using lowercase characters in my BLID. Changed them to uppercase and now it works.

You guys do some great work on here. Keep it up!

Thanks for putting this together. I got this installed and working, but I am struggling to understand how to get this added to my devices in the smartthings app. I was able to get the vacuum running from the smartthings ide, but it isn’t appearing in the app. Do I need to have a smartapp set up? sorry for the noob question. Thanks for your help!

I’m not sure to understand your issue but maybe this will help (and my apologies if you already knew this) : once you created a device handler, you have to create a virtual device (in the devices menu in IDE, then click “new device”). You will be given the opportunity to pick the “driver” i.e. “device handler” you just created in a list of hundreds of devices (providing you didn’t forget to hit the publish button when you created the device handler). Once this is done, you should see it as a new device to be configured in the app, just like any other device. You might need to hit the “find new device” button, but most of the times now it shows itself in the list of devices directly (in the iphone app at least).
Hope this helps

Got it! Awesome! Thanks so much!

This worked great for me.

Questions: How responsive did everyone find this solution? I felt like it lagged really bad… (Not blaming the app itself, I realize there are many layers its passing through)

And lastly, has anyone looked into updating the app to show the “status” of what is running/happening to the Roomba? This implementation is purely sending commands. But doesn’t show us anything.

Just curious. Love it though, thanks guys!

This looks like great work thanks for all your efforts it is terrible that iRobot does not provide an API for this model.

For another alternative you can get a Roomba 805 from Costco (I was told by iRobot that 8xx series are the same they just have different accessories) for $400 (currently $350 on sales) and the Thinking Cleaner wifi module for $99. That makes the solution a few hundred cheaper and below is the latest 2.x code for smart things integration:

Not sure if you can modify the above code for the UI and status tile as @darrylb has suggested.