Awesome! With a little effort I managed to get the following rule working. Basically I have OpenHAB2 connected to my Roomba 980 (Dorita REST interface), Asterisk PBX and numerous Amazon Echo’s via my Alexa-HA project. The intent was to have voice control over the house vacuum, including automatically turning on all the lights and fans/air purifiers whenever house cleaning is underway and have it automatically pause/resume when an active phone call starts/completes. Here is how I pulled it off. The ‘roombaActive’ item is just a basic virtual Switch that toggles other items throughout the house as needed:
rule "Start house cleaning job"
when
Item roombaActive received command ON
then
// Set light levels and turn all lights on
sendCommand(Light_Group_Color_All, "80,80,80")
sendCommand(Light_Group_Switch_All, ON)
// Turn on all the fans
sendCommand(GF_Fans,ON)
// Start Roomba cleaning mission
sendCommand(roombaMission,ON)
roombaDock.postUpdate(OFF)
// Announce
say("Cleaning your house, sir...")
end
rule "Stop cleaning the house"
when
Item roombaActive received command OFF
then
// Turn off all lights
sendCommand(Light_Group_Switch_All, OFF)
// Turn off all fans
sendCommand(GF_Fans,OFF)
// Cancel Roomba cleaning mission
sendCommand(roombaMission,OFF)
// Return Roomba to its dock
sendCommand(roombaDock,ON)
// Announce
say("Canceling cleaning job, sorry for the disturbance, sir...")
end
rule "Pause cleaning the house during active phone call"
when
Item Incoming_Call received update
then
if (Incoming_Call.state == ON && roombaMission.state == ON && roombaActive.state == ON) {
// Turn off all fans
sendCommand(GF_Fans,OFF)
// Pause Roomba cleaning mission
sendCommand(roombaPause,ON)
}
if (Incoming_Call.state == OFF && roombaPause.state == ON && roombaActive.state == ON) {
// Turn on all fans
sendCommand(GF_Fans,ON)
// Resume Roomba cleaning mission
sendCommand(roombaPause,OFF)
}
end
Here is an additional rule which monitors the roombaPhase and keeps other Roomba states correctly set. Without this, if the Roomba cleaning job was started manually (i.e. the clean button on the vacuum) then my active phone call rule would not trigger…
rule "Update various Roomba switches based on roombaPhase state"
when
Item roombaPhase received update
then
if (roombaPhase == 'run') {
roombaActive.postUpdate(ON)
roombaDock.postUpdate(OFF)
}
if (roombaPhase == 'charge') {
roombaDock.postUpdate(ON)
}
if (roombaPhase == 'none') {
roombaActive.postUpdate(OFF)
roombaDock.postUpdate(ON)
roombaPause.postUpdate(OFF)
}
end
Can anyone share some examples of how to set (i.e. POST) config options to the Roomba via an OpenHAB item? I would like to be able to control more low level settings like ‘cleaning passes’ and ‘edge clean’ via the OpenHAB UI…
Are Roomba 960 and 980 both integratabtle with OpenHAB? I’m considering buying either of these two robotic vacuums. In the battle of Roomba 960 vs 980, I’d prefer the 980 model but I really need to know if it works with OpenHAB.
Not all of us are programers or have a lot of experience in python and linux… Is there any way this could be done as a binding? It would help lots of people here.
Simple solution:
IRobot has IFTTT support. Works like a charm.
Create an item e.g. Switch irobot_clean
Expose the item to openhabcloud
Create a free IFTTT account
Link openhab to IFTTT
Link your iRobot account to IFTTT
Create an app
If irobot_clean receives update ON THEN start iRobot
Done. Enjoy
Love it. Was a piece of cake without programming or hacking.
Yes I think I can.
When you search at iRobot you find that there are a few mandatory steps needed and if I remember correctly, it also says you need to log in via your iRobot HOME app at least once into the cloud after the IFTTT feature has been activated. That was also a culprit on my end. I ended up deleting the irobot home app from my iphone and installed it again. I also reset my robot. Maybe there is a log-out feature somewhere but haven‘t found it yet.
But I think deleting the app from your iphone/ipad and then installing and log-in with your account should do the trick. Let me know if you succeed.
I don’t believe that you cannot set this up and would try to change the language on the IOS-device to EN as well as the robot language, do a reset and then install the app again. Don’t think that iRobot will sell different hardware all over the world except power supply.
And as last option you could potentially change your location in your iRobot profile if they put in a check there.
Good luck.
SJ
I guess the issue is the missing log in into the cloud via app. That was what solved my issue when I set it up. Maybe it is cashed somewhere. You could try a 2nd device and make a fresh install with the app and try then. Besides this, I am out of ideas.
I mean the log-in into their cloud. It only works if you log in at least once into their cloud. If you cannot log in via your smartphone-app then it does not work. How should their clould recognize your robot?
If you go to IFTTT and configure iRobot-connection it states that you need to log-in at least once.
That was what I experienced, then deleted the app as I could not find a log-in /log-out feature and reconfigured everything. Afterwards it worked. Maybe it is different on Android.
Sorry.