Latest (2019) iRobot Roomba integration methods

What is the latest method of integrating Roomba (I have an i7) with Smartthings? Right now I am just using IFTTT.com but am using 3 virtual switches to do so. I have a Virtual Switch called Robot that I used to Start Cleaning (ST is the Trigger and iR is the Action), a Virtual Switch called Robot Cleaning that turns on when a Cleaning Starts (iR is the Trigger and ST is the Action). I also have a uDTH (switch and motion) called Robot Stuck that turns on when the Roomba reports its stuck to IFTTT (iR is the Trigger and ST is the action).

I use Robot vSwitch to control Roomba via SmartThings. I use Robot Cleaning vSwitch to know if it started cleaning via another source (iRobot app, scheduled clean, or button press on Roomba). I use the Robot Stuck uDTH for an Alexa Routine to tell me that Roomba is stuck on my Echo devices. (Alexa Routines only seem to work with motion triggers).

This seems less than ideal or optimal. Anyone got a better way?

I saw that RooWiFi, Thinking Cleaner, dorita989, rest980, etc all seem to be dead.

1 Like

Also something intersting. I wanted to use the Universal Device Type Handler (uDTH) for all 3 switches, but for some reason the uDTH was not reporting status updates to IFTTT.com. Had to switch 2 of them to Virtual Switch. The other has to be a uDTH because Alexa Routines only seem to work with Motion triggers.

As far as the echo, see the community FAQ:

FAQ: Can I trigger an Echo Action without Speaking to It?

If the UDTH is working for you, that’s great, but since I believe it is no longer being supported by the author, you might just want to be aware of the alternatives as well. :sunglasses:

IFTTT can turn on and off the uDTH, however when a uDTH is updated in SmartThings it does not update to IFTTT for some reason.

I this is how i get full integration for my I7’s in SmartThings:

1 Like

Just remembered I created a “lite” version of the uDTH that works with IFTTT and Alexa. There are some abilities that either IFTTT or Alexa will not allow to be added. I think the main one is locks. I removed those abilities and it works.

1 Like

I was never able to get Roomba 980 Wifi Connectivity Reverse engineering working for me.

I was in a similar state of virtual switches and IFTT so I starting working on my own DH. I modified the simulated button DH, creating buttons for Start, Pause, Stop, Dock and a manual reset; leveraging webcore to send IFTT webhooks based on the respective button press. I also added a valuetile to report a quasi-status. Unfortunately, the status was based on intended action rather than actual activity.

So for help with the feedback, the irobot IFTT channel has 3 triggers: mission complete, robot started and robot stuck which can act upon a ST switch, lock, or alarm so I added those capabilities to get feedback.

Robot started = switch on = status of Running
Mission Complete = locked = status of Job Complete
Stuck (error) = strobe alarm = status of Error
but there is still no way to confirm receipt of paused, stopped, or docking commands/status within ST.

Downside is that you still need to use IFTT and webcore, no direct interaction. Upside is that I was able to downsize to only one virtual device and regardless of how you start Roomba (via ST, Google Home, or manually) the status will be updated in ST. (Sorry, don’t have Alexa, Google Assistant can talk directly to Roomba).

Just updated the feedback mechaisms so I want to fully test before I share code but screenshots below:

Screenshot_20190912-155716_SmartThings Screenshot_20190912-155828_SmartThings

2 Likes

Hi Jon,
Are you willing to share your code yet?

My apologizes for the delay. I tweaked the code a bit, UI is slightly different than above) but then iFTT started causing some headaches. It show receipt of the webhook trigger but the applets were significantly delayed, by hours at times. I eventually dumped it all and re-tried rest980. Good news is that it is working for local control only.

Regardless, the final version before I dumped iFTT is below, you’ll noticed that I bypassed webCore and and am using a http get command to send the webhook directly. Each user will have to create iFTT applets (webHooks–>iRobot) for start, stop, pause, and dock. Those webhooks and the user’s webhook key is entered into the DH settings.

Additionally, for the feedback mechanisms, three iRobot–>SmartThings applets will be needed. Turn on the device switch when iRobot starts, lock the device upon mission complete, and sound alarm (strobe) when error occurs. These feedback mechanisms should still occur even if iRobot is started by other means so you can check status in smartThings at any time.

It is time consuming to setup the iFTT portion but it was working before iFTT decided to be a pain. I even contacted help on both ends, iFTT and iRobot. They blamed each other…

Other notes: I added a motion secondary control to the multi-attribute tile. This is purely simulated and indicates active cleaning vs docked. Due to the nature of the “new” app, I chose motion and a vid of generic-sensor. You cannot control iRobot via the new app but you can see if motion is active aka cleaning.

/**

  • Copyright 2015 SmartThings
  • Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at:
  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
  • on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
  • for the specific language governing permissions and limitations under the License.

*/

preferences {
section(“WebHook Command Input”){
input “start_command”, “text”, title: “Start Command”, required: false
input “pause_command”, “text”, title: “Pause Command”, required: false
input “stop_command”, “text”, title: “Stop Command”, required: false
input “dock_command”, “text”, title: “Dock Command”, required: false
input “key”, “password”, title: “iFTT Maker Key”, required: true
}
}

metadata {
definition (name: “Roomba Control via iFTT”, namespace: “SmartThingsDHs”, author: “fieldsjm”, mnmn: “SmartThings”, vid: “generic-sensor”) {
capability “Actuator”
capability “Alarm”
capability “Button”
capability “Lock”
capability “Sensor”
capability “Switch”
capability “motionSensor”
capability “Health Check”

    command "push1"
    command "push2"
    command "push3"
    command "push4"
    command "push5"
}

simulator {
}

tiles (scale: 2){

/Status tile based on intended action/
multiAttributeTile(name:“status”, type: “generic”, width: 6, height: 4){
tileAttribute (“device.status”, key: “PRIMARY_CONTROL”) {
attributeState (“Ready”, label: “Ready”, icon:“st.samsung.da.RC_ic_rc”, backgroundColor:“#8CFC03”)
attributeState (“Running”, label: “In-Process”, icon:“st.Health & Wellness.health7”, backgroundColor:“#078bf7”)
attributeState (“Paused”, label: “Paused”, icon:“http://cdn.device-icons.smartthings.com/sonos/pause-icon@2x.png”, backgroundColor:“#FC030F”)
attributeState (“Docking”, label: “Docking”, icon:“st.presence.house.unlocked”, backgroundColor:“#5F07F7”)
attributeState (“Docked”, label: “Docked”, icon:“st.presence.house.secured”, backgroundColor:“#5F07F7”)
attributeState (“Stopped”, label: “Stopped”, icon:“https://raw.githubusercontent.com/fieldsjm/Resources/master/stop.png”, backgroundColor:“#FC030F”)
attributeState (“Ended”, label: “Complete”, icon:“st.samsung.da.RC_ic_rc”, backgroundColor:“#8CFC03”)
attributeState (“Error”, label: “Error”, icon:“https://raw.githubusercontent.com/fieldsjm/Resources/master/warning.png”, backgroundColor:“#FC030F”)
}
tileAttribute(“device.motion”, key: “SECONDARY_CONTROL”) {
attributeState (“active”, label: “Cleaning”)
attributeState (“inactive”, label: “Docked”)
}
}
/Start/
standardTile(“push1”, “device.button”, width: 3, height: 2, decoration: “flat”) {
state “default”, label: “Start”, icon:“st.samsung.da.RC_ic_rc”, backgroundColor: “#ffffff”, action: “push1”
}
/Pause/
standardTile(“push2”, “device.button”, width: 3, height: 2, decoration: “flat”) {
state “default”, label: “”, icon:“st.sonos.pause-btn”, backgroundColor: “#ffffff”, action: “push2”
}
/Dock/
standardTile(“push3”, “device.button”, width: 3, height: 2, decoration: “flat”) {
state “default”, label: “Dock”, icon:“st.nest.nest-home”, backgroundColor: “#ffffff”, action: “push3”
}
/Stop/
standardTile(“push4”, “device.button”, width: 3, height: 2, decoration: “flat”) {
state “default”, label: “”, icon:“st.sonos.stop-btn”, backgroundColor: “#ffffff”, action: “push4”
}
/Reset/
standardTile(“push5”, “device.button”, width: 6, height: 2, decoration: “flat”) {
state “default”, label: “Reset”, icon:“st.secondary.refresh-icon”, backgroundColor: “#ffffff”, action: “push5”
}
/Switch for IFTT feedback of Started - Hidden by default/
standardTile(“switch”, “device.switch”, inactiveLabel: false, width: 6, height: 2, decoration: “flat”){
state(“off”, label: “Ready”, action: “switch.on”, backgroundColor: “#ffffff”, nextState: “on”, defaultState: “true”)
state(“on”, label: “Cleaning”, action: “switch.off”, backgroundColor: “#00a0dc”, nextState: “off”)
}
/Alarm for IFTT feedback of Error - Hidden by default/
standardTile(“alarm”, “device.alarm”, inactiveLabel: false, width: 6, height: 2, decoration: “flat”) {
state(“off”, label:“Ready / Pending”, action:‘alarm.strobe’, icon:“st.alarm.alarm.alarm”, backgroundColor:“#ffffff”, nextState: “strobe”, defaultState: “true”)
state(“strobe”, label:“Error”, action:‘alarm.off’, icon:“st.alarm.alarm.alarm”, backgroundColor:“#e86d13”, nextState: “off”)
}
/Lock for IFTT feedback of mission complete - Hidden by default/
standardTile(“lock”, “device.lock”, inactiveLabel: false, width: 6, height: 2, decoration: “flat”){
state(“unlocked”, label: “Ready / Pending”, action: “lock.lock”, backgroundColor: “#ffffff”, nextState: “locked”, defaultState: “true”)
state(“locked”, label: “Mission Complete”, action: “lock.unlock”, backgroundColor: “#00a0dc”, nextState: “unlocked”)
}

    main "status"
    details(["status","push1","push2","push3","push4","push5", /*"switch","alarm","lock"*/])
}

}

def parse(String description) {

}

/Start - Sends iFTT Webhook - if Roomba starts successfully, iFTT will turn on switch/
def push1() {
push(1)

	def cmd = "https://maker.ifttt.com/trigger/${settings.start_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

sendHubCommand(result)
log.debug “Executing push1”
log.debug result
}

/Pause - Sends iFTT Webhook - no feedback available/
def push2() {
push(2)
sendEvent(name: “status”, value: “Paused”)
sendEvent(name: “motion”, value: “active”)

	def cmd = "https://maker.ifttt.com/trigger/${settings.pause_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

sendHubCommand(result)
log.debug “Executing push1”
log.debug result
}

/Dock - Sends iFTT Webhook - minimal feedback available, once docked iFTT will also send docking mission complete (fail safe of conversational delay to Docked then Ready Status)/
def push3() {
push(3)
sendEvent(name: “status”, value: “Docking”)
sendEvent(name: “motion”, value: “active”)
runIn(60, docked)

	def cmd = "https://maker.ifttt.com/trigger/${settings.dock_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

sendHubCommand(result)
log.debug “Executing push1”
log.debug result
}
def docked() {
sendEvent(name: “status”, value: “Docked”)
sendEvent(name: “motion”, value: “inactive”)
runIn(10, push5)
}

/Stop - Sends iFTT Webhook - no feedback available/
def push4() {
push(4)
sendEvent(name: “status”, value: “Stopped”)
sendEvent(name: “motion”, value: “active”)

	def cmd = "https://maker.ifttt.com/trigger/${settings.stop_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

sendHubCommand(result)
log.debug “Executing push1”
log.debug result
}

/Status Reset/
def push5() {
push(5)
unlock()
off()
sendEvent(name: “status”, value: “Ready”)
sendEvent(name: “motion”, value: “inactive”)
}

private push(button) {
log.debug “$device.displayName button $button was pushed”
sendEvent(name: “button”, value: “pushed”, data: [buttonNumber: button], descriptionText: “$device.displayName button $button was pushed”, isStateChange: true)
}

/Feedback Mechanisms/
/Started - iFTT turns on if Roomba starts successfully/
def on(){
sendEvent(name: “switch”, value: “on”)
sendEvent(name: “status”, value: “Running”)
sendEvent(name: “motion”, value: “active”)
log.debug “$device.displayName (iFTT) has reported starting”
}
def off(){
sendEvent(name: “switch”, value: “off”)
sendEvent(name: “alarm”, value: “off”)
sendEvent(name: “status”, value: “Ready”)
sendEvent(name: “motion”, value: “inactive”)
}
/Misson Complete - iFTT turns on if Roomba completes task/
def lock() {
sendEvent(name: “lock”, value: “locked”)
sendEvent(name: “status”, value: “Ended”)
sendEvent(name: “motion”, value: “inactive”)
log.debug “$device.displayName (iFTT) has reported misson complete”
}
def unlock() {
sendEvent(name: “lock”, value: “unlocked”)
sendEvent(name: “status”, value: “Ready”)
sendEvent(name: “motion”, value: “inactive”)
}
/Error - iFTT turns on if Roomba encounters an error (stuck, low battery, etc)/
def strobe() {
sendEvent(name: “alarm”, value: “strobe”)
sendEvent(name: “status”, value: “Error”)
sendEvent(name: “motion”, value: “active”)
log.debug “$device.displayName (iFTT) has reported an error”
}

def installed() {
initialize()
}

def updated() {
initialize()
}

def initialize() {
sendEvent(name: “numberOfButtons”, value: 5)
sendEvent(name: “status”, value: “Ready”)
sendEvent(name: “motion”, value: “inactive”)
sendEvent(name: “healthStatus”, value: “online”)
}

1 Like

Thanks for posting Jon.
I intend on giving this a try, though I was expecting to be using Web Core. Hopefully I can still get the integration with IFTTT right.

My apologies if I wasn’t clear previously. The use of webCore was originally as a middle man…to pass along the webhook to iFTT (if button one is pushed send roomba start, etc). There is no direct link between webcore and iRobot. IFTT is the only interaction method i’ve discovered outside of using a personal node server.

With that being said, you can still integrate into webCore if you want to tie in other automations. For example, I have webcore pause romba when my doorbell rings.

Hi Jon.
I wasn’t able to get the DH posted above to work as it kept giving me errors, however I have successfully implemented your Roomba V2 DH and it’s working really well and without any delays.
I wasn’t sure how to setup the http get command to send the webhook directly so I stuck with WebCore.
Thanks for your work on this project.

Having trouble getting this into smartthings keeps coming up with an error on line 13. Any help would be greatly appreciated.

I’d like to get this to work better with the new smartthings app. I think you’d probably want the device type as a remote/button with buttons for each command.

Can you share a working DTH?

Thanks

NOTE: There may be a bug in the start button below. It needs a bit more troubleshooting. Your experience may vary.

I picked up a Roomba 980 during the black friday sale and finally had some time to try and set it up with Smartthings. After reviewing the options, I settled on this code, since I did not want to build and maintain a node server. I haven’t been able to set up the UI with the new UI model, but this should at least get folks started with this device handler.
Please follow the instructions below to set it up!

Step 1: Copy the code below into your favorite text editor

/**
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
    in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
    on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
    for the specific language governing permissions and limitations under the License.

    Initial Code Copyright November 2019 FieldsJM
    Modified Jan 2020 C. Niggel
*/

preferences {
section("WebHook_Command_Input"){
input "start_command", "text", title: "Start Command", required: false
input "pause_command", "text", title: "Pause Command", required: false
input "stop_command", "text", title: "Stop Command", required: false
input "dock_command", "text", title: "Dock Command", required: false
input "key", "password", title: "iFTT Maker Key", required: true
}
}

metadata {
definition (name: "Roomba Control via iFTT", namespace: "SmartThingsDHs", author: "fieldsjm", mnmn: "SmartThings", vid: "generic-doorbell-2") {
capability "Actuator"
capability "Alarm"
capability "Button"
capability "Lock"
capability "Sensor"
capability "Switch"
capability "motionSensor"
capability "Health Check"

    command "start"
    command "pause"
    command "dock"
    command "stop"
    command "reset"
}

simulator {
}

tiles (scale: 2){

/Status tile based on intended action/
multiAttributeTile(name:"status", type: "generic", width: 6, height: 4){
tileAttribute ("device.status", key: "PRIMARY_CONTROL") {
attributeState ("Ready", label: "Ready", icon:"st.samsung.da.RC_ic_rc", backgroundColor:"#8CFC03")
attributeState ("Running", label: "In-Process", icon:"st.Health & Wellness.health7", backgroundColor:"#078bf7")
attributeState ("Paused", label: "Paused", icon:"st.sonos.pause-icon", backgroundColor:"#FC030F")
attributeState ("Docking", label: "Docking", icon:"st.presence.house.unlocked", backgroundColor:"#5F07F7")
attributeState ("Docked", label: "Docked", icon:"st.presence.house.secured", backgroundColor:"#5F07F7")
attributeState ("Stopped", label: "Stopped", icon:"st.sonos.stop-btn", backgroundColor:"#FC030F")
attributeState ("Ended", label: "Complete", icon:"st.samsung.da.RC_ic_rc", backgroundColor:"#8CFC03")
attributeState ("Error", label: "Error", icon:"st.Office.office6", backgroundColor:"#FC030F")
}
tileAttribute("device.motion", key: "SECONDARY_CONTROL") {
attributeState ("active", label: "Cleaning")
attributeState ("inactive", label: "Docked")
}
}
/Start/
standardTile("start", "device.button", width: 3, height: 2, decoration: "flat") {
state "default", label: "Start", icon:"st.samsung.da.RC_ic_rc", backgroundColor: "#ffffff", action: "start"
}
/Pause/
standardTile("pause", "device.button", width: 3, height: 2, decoration: "flat") {
state "default", label: "Pause", icon:"st.sonos.pause-btn", backgroundColor: "#ffffff", action: "pause"
}
/Dock/
standardTile("dock", "device.button", width: 3, height: 2, decoration: "flat") {
state "default", label: "Dock", icon:"st.nest.nest-home", backgroundColor: "#ffffff", action: "dock"
}
/Stop/
standardTile("stop", "device.button", width: 3, height: 2, decoration: "flat") {
state "default", label: "Stop", icon:"st.sonos.stop-btn", backgroundColor: "#ffffff", action: "stop"
}
/Reset/
standardTile("reset", "device.button", width: 6, height: 2, decoration: "flat") {
state "default", label: "Reset", icon:"st.secondary.refresh-icon", backgroundColor: "#ffffff", action: "reset"
}
/Switch for IFTT feedback of Started - Hidden by default/
standardTile("switch", "device.switch", inactiveLabel: false, width: 6, height: 2, decoration: "flat"){
state("off", label: "Ready", action: "switch.on", backgroundColor: "#ffffff", nextState: "on", defaultState: "true")
state("on", label: "Cleaning", action: "switch.off", backgroundColor: "#00a0dc", nextState: "off")
}
/Alarm for IFTT feedback of Error - Hidden by default/
standardTile("alarm", "device.alarm", inactiveLabel: false, width: 6, height: 2, decoration: "flat") {
state("off", label:"Ready / Pending", action:"alarm.strobe", icon:"st.alarm.alarm.alarm", backgroundColor:"#ffffff", nextState: "strobe", defaultState: "true")
state("strobe", label:"Error", action:"alarm.off", icon:"st.alarm.alarm.alarm", backgroundColor:"#e86d13", nextState: "off")
}
/Lock for IFTT feedback of mission complete - Hidden by default/
standardTile("lock", "device.lock", inactiveLabel: false, width: 6, height: 2, decoration: "flat"){
state("unlocked", label: "Ready / Pending", action: "lock.lock", backgroundColor: "#ffffff", nextState: "locked", defaultState: "true")
state("locked", label: "Mission Complete", action: "lock.unlock", backgroundColor: "#00a0dc", nextState: "unlocked")
}

    main "status"
    details(["status","start","pause","dock","stop","reset"])
}

}

def parse(String description) {

}

/Start - Sends iFTT Webhook - if Roomba starts successfully, iFTT will turn on switch/
def start() {
push(1)

	def cmd = "https://maker.ifttt.com/trigger/${settings.start_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

//sendHubCommand(result)
log.debug "Executing Roomba Start"
//log.debug result
}

/Pause - Sends iFTT Webhook - no feedback available/
def pause() {
push(2)
sendEvent(name: "status", value: "Paused")
sendEvent(name: "motion", value: "active")

	def cmd = "https://maker.ifttt.com/trigger/${settings.pause_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

//sendHubCommand(result)
log.debug "Executing pause"
//log.debug result
}

/Dock - Sends iFTT Webhook - minimal feedback available, once docked iFTT will also send docking mission complete (fail safe of conversational delay to Docked then Ready Status)/
def dock() {
push(3)
sendEvent(name: "status", value: "Docking")
sendEvent(name: "motion", value: "active")
runIn(60, docked)

	def cmd = "https://maker.ifttt.com/trigger/${settings.dock_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

//sendHubCommand(result)
log.debug "Executing dock"
//log.debug result
}

def docked() {
sendEvent(name: "status", value: "Docked")
sendEvent(name: "motion", value: "inactive")
runIn(10, reset)
}

/Stop - Sends iFTT Webhook - no feedback available/
def stop() {
push(4)
sendEvent(name: "status", value: "Stopped")
sendEvent(name: "motion", value: "active")

	def cmd = "https://maker.ifttt.com/trigger/${settings.stop_command}/with/key/${settings.key}";

  log.debug "Sending request cmd[${cmd}]"

  	httpGet(cmd) {resp ->
  		if (resp.data) {
  			log.info "${resp.data}"
  		} 
  	}

//sendHubCommand(result)
log.debug "Executing stop"
//log.debug result
}

/Status Reset/
def reset() {
push(5)
unlock()
off()
sendEvent(name: "status", value: "Ready")
sendEvent(name: "motion", value: "inactive")
}

private push(button) {
  log.debug "$device.displayName button $button was pushed"
  sendEvent(name: "button", value: "pushed", data: [buttonNumber: button], descriptionText: "$device.displayName button $button was pushed", isStateChange: true)
}

/Feedback Mechanisms/
/Started - iFTT turns on if Roomba starts successfully/
def on(){
sendEvent(name: "switch", value: "on")
sendEvent(name: "status", value: "Running")
sendEvent(name: "motion", value: "active")
log.debug "$device.displayName (iFTT) has reported starting"
}
def off(){
sendEvent(name: "switch", value: "off")
sendEvent(name: "alarm", value: "off")
sendEvent(name: "status", value: "Ready")
sendEvent(name: "motion", value: "inactive")
}
/Misson Complete - iFTT turns on if Roomba completes task/
def lock() {
sendEvent(name: "lock", value: "locked")
sendEvent(name: "status", value: "Ended")
sendEvent(name: "motion", value: "inactive")
log.debug "$device.displayName (iFTT) has reported mission complete"
}
def unlock() {
sendEvent(name: "lock", value: "unlocked")
sendEvent(name: "status", value: "Ready")
sendEvent(name: "motion", value: "inactive")
}
/Error - iFTT turns on if Roomba encounters an error (stuck, low battery, etc)/
def strobe() {
sendEvent(name: "alarm", value: "strobe")
sendEvent(name: "status", value: "Error")
sendEvent(name: "motion", value: "active")
log.debug "$device.displayName (iFTT) has reported an error"
}

def installed() {
initialize()
}

def updated() {
initialize()
}

def initialize() {
sendEvent(name: "numberOfButtons", value: 5)
sendEvent(name: "status", value: "Ready")
sendEvent(name: "motion", value: "inactive")
sendEvent(name: "healthStatus", value: "online")
}

Step 2: Run a Find & Replace on all of the Quotes (") and replace them with quotes. This is important because there are some unicode problems either with the original code that was posted or with the forum. This is what was causing the Line 13 errors noted by ajk79 above. You may need to do this twice for the open quotes and the close quotes.
Step 2.5: You may also want to ensure there are no other single quotes in there - I had found one pair in the original code.
Step 3: Install the Device Handler by going into the IDE, Creating a new Device Handler from Code, and pasting in the repaired text from your text editor. With luck, it will compile.
Step 4: Create the required Webhooks in IFTTT:

  • There are instructions available here: https://www.learnrobotics.org/blog/control-irobot-roomba-siri/. Follow Step 1 to create 4 Webhooks. You can set the event names to be anything you like, just write down what they are
    • Event Name for start_roomba
    • Event Name for stop_roomba
    • Event Name for pause_roomba
    • Event Name for dock_roomba
  • Follow Step 2 on the page to get your IFTTT API Key. Put that in a safe place as well

Step 5: Go back into your Smartthings IDE and create the new Device using your Handler. See this page for instructions: https://community.smartthings.com/t/how-do-i-add-a-thing-after-adding-a-custom-device-handler/58636/2
Step 6: Still in the IDE, click on the device name to go to the properties. Fill out the Preferences with the event names and API keys you created in Step 4.


Step 7: You should be ready to clean your floors! On your mobile device, tap on the switch, and it should take off.

As noted above, the UI is not complete in the new Smartthings app. Hopefully this will become documented and it can be fixed. It is also worth noting that there is no feedback from the Roomba back to Smartthings, so if it gets stuck or the bin is full, you’ll need the iRobot mobile app to be alerted. Hopefully that can be added to this handler in the future. For now, at least, you can automate kicking off a job.

Glad this is working for you. One of the reasons I stopped using was due to IFTTT delays. For whatever reason, IFTTT would receive the webhook trigger almost immediately after pressing start but would not run the applet until 830pm regardless of what time it was sent. Support was useless. Back to maintaining a node server for me.

For what it’s worth, the DH was also built with switch, alarm, and lock capabilities to get feedback from Roomba. You have to setup applets from iRobots IFTTT channel. Have it turn on the device’s switch when roomba is running, alarm (strobe) when there is an error, and lock when mission complete. While those aren’t necessary, the multi-attribute tile will update based on those status updates.