Virtual Button for Roomba

What I'd like to accomplish is to have some virtual device that IFTTT can change the state of. There'd be 3 states. Docked, Cleaning, Stuck. This virtual device could also trigger an IFTTT command, specifically a Clean command. I thought about a virtual switch, but that only has two states. Any ideas?

(This would end up on a wall-mounted dashboard)

1 Like

I'm doing something similar. I have 4 virtual switches.

image
The on state of each is linked to IFTTT to control the vacuum.

The switches turn themselves off after 2 seconds.
image

On my dashboard, I have the 4 buttons. When I press a button, it recognizes the push by turning on then off 2 seconds later. What you can't tell from the dashboard is if the vacuum is currently on or not because the buttons are only momentary. It also won't help you with reporting if the vacuum is stuck.

Edit: Rereading your question and your want to have the dashboard show the state of the vacuum, I haven't tried this, but could you do something similar to what I just said above. 3 virtual switches, Put all three on your dashboard. Make rules so that only one can be on at a time. When IFTTT turns on one of them, the other 2 go off. So one of the three would always be lit on your dashboard.

I thought to myself, that's a great idea - show the state of the vacuum on the dashboard. Then I went to try and set it up. It doesn't look Roomba (or in my case Neato) can act as a trigger in IFTTT. How are you getting IFTTT to know that the robot is stuck?

You can’t. There is no native way to see Roomba issues. And because of this there is no reason to really do anything more than automation to turn it on. Roomba app only allows for a single cleaning schedule per day for non 980 and high devices. I also have the Roomba Alexa skill integration enabled along with the Roomba app installed on my phone.

If there is an issue with Roomba the Roomba app notifies me. If I need to stop or send Roomba home I use Alexa. Scheduling two cleanings in the evening I use HE with a virtual switch and IFTTT integration into iRobot.

RM rule:

1 Like

Someone that actually knows how to code could probably do this with switch levels. I on the other hand can only offer this bit I cobbled together from framework @ogiewon wrote for using virtual motion as a switch.

Since the only thing IFTTT can do that allows a variable result is level, then it would be based on a bulb. For triggering Roomba via IFTTT, it would have to be a switch I think. Anyway, this simple code should allow you to show what you want on the Dashboard. Two different switches. One for Cleaning (ON state) and Docked (OFF state), the other driver is for Stuck (ON state).

Roomba State

/**
 *  Roomba State from IFTTT
 *
 *  https://raw.githubusercontent.com/ogiewon/Hubitat/master/Drivers/virtual-motion-switch.src/virtual-motion-switch.groovy
 *
 *  Copyright 2018 Daniel Ogorchock
 *
 *  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.
 *
 *  Change History:
 *
 *    Date        Who            What
 *    ----        ---            ----
 *    2018-11-03  Dan Ogorchock  Original Creation
 *    2019-04-13  Doug Krug  	 Modified for Roomba and IFTTT
 */

metadata {
	definition (name: "Roomba State", namespace: "smarthomeprimer", author: "Doug Krug") {
        capability "Switch"
	}   
}

def on() {
    sendEvent(name: "Roomba", value: "Cleaning")
    runIn(3, off)
}

def off() {
    sendEvent(name: "Roomba", value: "Docked")
}

def installed() {
}

Roomba Stuck

/**
 *  Roomba Stuck from IFTTT
 *
 *  https://raw.githubusercontent.com/ogiewon/Hubitat/master/Drivers/virtual-motion-switch.src/virtual-motion-switch.groovy
 *
 *  Copyright 2018 Daniel Ogorchock
 *
 *  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.
 *
 *  Change History:
 *
 *    Date        Who            What
 *    ----        ---            ----
 *    2018-11-03  Dan Ogorchock  Original Creation
 *    2019-04-13  Doug Krug  	 Modified for Roomba and IFTTT
 */

metadata {
	definition (name: "Roomba Stuck", namespace: "smarthomeprimer", author: "Doug Krug") {
        capability "Switch"
	}   
}

def on() {
    sendEvent(name: "Roomba", value: "Stuck")
    runIn(3, off)
}

def off() {
    sendEvent(name: "Roomba", value: "Docked")
}

def installed() {
}

So my question is what is the value of HE knowing Roomba got stuck when those notifications get sent to the Roomba app? HE can’t really do anything about it and 100% of the time requires human intervention.

Likely HE can't do anything about it, but there are possible uses. Granted none are really necessary.

It's especially less necessary if everyone in your home has a phone with them at all times with the Roomba app on it. It's sad, but that's likely the case in most households!

But if that is not the case, if your roomba gets stuck HE could flash the lights, or announce it on speakers, or simply show the stuck status on a dashboard on the wall. Then you would know to go see what's up. Definitely nothing critical.

I suppose it also depends on if you run the vacuum while you are home or not. If you run it while everyone is gone, then I can't think of too many uses for HE knowing. Having the option is more valuable if you are in the house while it runs.

I’m guessing @mjn.other would like to see this in the Dashboard and receive notifications from HE rather than having to use a separate app. Many people don’t like having multiple apps to manage/monitor and just want everything in one place.

2 Likes

And I don’t have any personal issues either way. Just seems like a lot of effort with little return. Especially since you need the Roomba app to even get it setup.

My 890 is loud so when it stops there is a sudden peace in the house. Also after two years of using Roomba we have a nightly ritual to prevent issues like getting stuck. Also have two charging stations strategically placed on the first floor. 90% of the time Roomba completes its task correctly and has vacuumed twice that evening basically getting the whole first floor done and can be found on a charging station. 9% of the last 10% Roomba doesn’t find a charging station and just dies. That last 1% is because we didn’t do our nightly Roomba cleanup chore and it gets stuck.

1 Like

My wife doesn't have the Roomba app. We currently have it setup so Smartthings flips at a switch at Night Mode that tells IFTTT to run Roomba. So Roomba runs while everyone sleeps and occasionally gets stuck under the couch or some other out of the way place and goes unnoticed. Showing it on the dashboard would be useful for her. I could also then perform any other operations based on any of the three statuses in the future should they come up.

I just love this phrasing. You have to clean up for your vacuum. Like people cleaning up before the maid comes. But I had one for a while too and know exactly what you mean. It can get "stuck" easily.

We have three kids under the age of 8. We have a back playroom that was constantly a disaster and getting the kids to clean it was nearly impossible. We bought the Roomba and told them that whatever they don't clean up Ruby (we named it Ruby) will eat. We now have had the house cleaned up every night since August.

2 Likes

Fear...always the best motivator.

2 Likes

Yeah right?!? I love when I get a message from Roomba saying it is in a cliff and you go to inspect and it got caught on a rug.

Exactly why I stopped using mine. I had one as a gift many, many years ago so they are probably better now. But even in the kitchen it couldn't get up on the low rug i had in front of the sink.

It is a lot better now with latest updates. Still need to pickup dog toys so it can vacuum. The reason we still use a Roomba is it truly gets the entire first floor super clean. When I use our shark stand-up it grabs a ton of hair/stuff but what amazes me is if I run the Roomba right afterwards the Roomba STILL fills its bin. So the vacuuming capabilities and how it cleans is very superior to anything else I have used probably because it is humans who are vacuuming and we all hate to do it.

Yeah, I hear ya there. I always thought that the suction and cleaning was great from the Roomba. I'm sure they've come a long way. Mine was over 10 years old so i'm sure the Technology has come a long way as far as the "logic" is concerned.