1

Roomba can use IFTTT to run the vacuum when a user's phone leaves a geofenced area. And you used to be able to use Life360 + IFTTT to trigger your smart vacuum to run when everyone has left the house (not just one person). However, Life360 ended their partnership with IFTTT, and since then there has been no obvious way to do this.

How can I trigger my Roomba to vacuum when everyone leaves the house?

Some things I've tried:

  • Using Nest Home/Away and/or Assistant Home/Away, but they no longer integrate with iRobot.
  • iOS users may be able to get this to work with Shortcuts, but it will only work if everyone uses iOS phones
  • IFTTT can't write to a shared google sheet, so it's hard to do with a google sheet. You can work around it by duplicating the sheets and adding more IFTTT applets, but it's quite messy

2 Answers 2

2

This functionality should be built into the iRobot app, but until that happens, here's how you can use a free Airtable to accomplish this. (And in the mean time, please consider contacting iRobot to ask for this functionality: https://homesupport.irobot.com/s/contact-support-info )

But first a quick note about why maybe you shouldn't do this (spoiler: it's IFTTT):

  • IFTTT geofencing, particularly on Android, is very bad and has been for years. Be prepared for a lot of false negatives and false positives.
  • IFTTT polling is very slow. It may take (and often does) up to an hour to notice the AirTable update and start the vacuum.
  • The Roomba IFTTT actions are primitive like it's 2017. You can start the robot, but you can't specify any parameters like which rooms you want it to clean.

But if that doesn't deter you, here's the solution I used.

Airtable config

Setup

  • Create a free AirTable account and create a new blank AirTable
  • Share the AirTable with write permissions with the other members of your household.

Per-Person Table

Create a new table to hold the records for when you (not the other people) enter or leave the geofence.

enter image description here

  • WhenString: single line text. This will be the time reported by IFTTT, in a time format not recognized by AirTable.
  • When: Formula: DATETIME_PARSE({WhenString},'MMMM DD, YYYY at hh:mmA'). This will be a proper DateTime stamp generated from the WhenString
  • Status: Single select with two options, entered and exited. These must be spelled exactly to match the IFTT automation.

Make a copy of this table for each member of your household.

Current Status Table

This table uses the latest values from the per-person tables to compute the current status of your household.

enter image description here

  • Who: Single line text. One row for each member of your household
  • Status: Single select using the same values as the other single select.
  • When: Date and Time, the time this person's status was last updated

Create a new row for each member of your household. Enter the name of each person in the Who column, the other columns can be left blank.

Now you'll create an automation to update this table.

Normally you might us a rollup to find the last record of each table. However, I wasn't able to figure out a way to do this when the records are being added by a third party service which can't add links, so I used an automation.

enter image description here

Get the record ID of each row in Current Status You'll need the record ID of each row that you just created. Click on each record, hit the Expand button in the Who column, and copy the record ID from the url, it starts with recxxxxxx. You'll use this in the next steps. More details in https://support.airtable.com/hc/en-us/articles/360051564873-Record-ID

enter image description here

Trigger

  • Type: When a record is created
  • Table: Mike

Action

  • Type: Update record
  • Table: Current Status
  • Record ID: the Record ID for Mike in Current Status
  • Status Field: Select status, and click the gear icon next to the value to set it to Dynamic. Then choose Record (from Step 1) > Status > Name
  • Status When: Also dynamic, set it to Record (from Step 1) > When

Test it. When you add a record to one of the People tables, it should update the row for that person in the Current Status table.

How Many Home table

This table will keep count of how many people are home at any given time. When the count reaches zero, we will start the vacuum.

enter image description here

There will be one record in this table representing how many people are home. I've hidden some fields to make the table easy to understand, here's the full table:

enter image description here

  • Name: single line text. The name for each entry in this table
  • Link: Link to Current Status, Allow linking to have multiple records. This lets us rollup records across the Current Status table to count the number of people home.
  • When (from Link): Lookup Link, When. The timestamps for the various records in Current Status
  • Currently Home: Lookup. Link, Who, When Status is entered. This filters the list to people who are currently home.
  • How Many Home: Function: COUNTA({Currently Home}). The number of people home.
  • When: Rollup. Link, When, MAX(values). The most recent of the two timestamps.

Now create a record in your table.

  • Set Name to whatever value you want, I use "Home"
  • Add each record in Current Status to your Link field. There should be one for each person in your household.

Test it. Add rows to your various people tables, verify that the Current Status table updates to reflect their current status, and verify that How Many Home updates to show how many are home and when.

At this point, you're done with the logic in AirTable, but there's one more table you need to add:

Everyone Last Out table

The IFTTT integration doesn't know how to watch a particular cell, so there's no way for it to use the How Many Home table directly. But IFTTT can watch for a new record being added, so we'll use an automation to create a new record whenever How Many Home changes.

enter image description here

  • Everyone Last Out: Date and Time

Now add an automation to populate it:

enter image description here

Trigger

  • When a record is updated: Table How Many Home, View (ignored), set it to watch the How Many Home field in record in your Everyone Last Out table.

Conditional Actions (not Actions)

  • Condition: If How Many Home = 0
  • Action: Create record in Everyone Last Out where the value is set to Record (from Step 1) > When

Now, whenever the number of people who are home changes, a new record should be added to your table.

Test it. You can use the Test Automation button in AirTable to pretend like one of your existing records was just added and verify that the automation enters the value you expect into Everyone Last Out.

IFTTT Config

Setup

Create an IFTTT account for each person in your household. Make sure you set up each of the following applets on the actual phone that's going to be used by that person.

Geofence Applet

For each person in your household, create an Applet that does the following

IF If you enter or exit an area Choose the location for your geofence.

THEN Create a new record in AirTable

  • Which Base? choose your AirTable
  • Table: choose the table for this person, eg. Mike in my example.
  • Record content:
    ::airtable::WhenString:: {{OccurredAt}}
    ::airtable::Status:: {{EnteredOrExited}}
    

Testing geofences is a big pain in the butt. You can make this much easier by replacing the IF trigger with a Button trigger and hardcoding the EnteredOrExited ingredient during your testing. Once you create a Button applet, you would go to your phone's home screen on iOS or Android and create a widget, selecting IFTTT and the button you just created to add the button to your phone's home screen. Use the button(s) to add fake enter/exit events to your airtable and verify that Everyone Last Out adds a new record every time everyone is out of the house.

I recommend enabling Receive notifications when this runs until you have everything running smoothly end to end.

Repeat for the other members of your household.

Roomba Trigger Applet

Now that you've tested the whole flow and verified that Everyone Last Out adds a record whenever everyone is out of the house, you can use this to trigger the Roomba to start.

IF

  • New record created
  • Which Base? Your AirTable
  • Table name: Everyone Last Out
  • View and Sort: ignored

THEN

  • iRobot Start robot

Again, I recommend enabling Receive notifications when this runs until you have everything running smoothly end to end.

You're done! 🎉

Give it a try! Bear in mind the caveats at the top, notably that IFTTT geofencing is unreliable and it may take awhile to notice the update to airtable.

0

This can be done using Home Assistant quite easily. If you haven't looked into it yet, you may want to here.

I find that geofencing in home assistant is a bit spotty, but it does seem to mostly work. I think a better way of doing this is by installing the Home Assistant app on each residents phone and have an automation trigger when the SSID of each phone changes to something other than your home wifi. I use this to make sure my lights are off when I leave home.

2
  • This is a great suggestion! How do you configure Home Assistant to only trigger the vacuum when all occupants have left?
    – emmby
    Commented Jun 25, 2022 at 1:33
  • Ah, it appears that Home Assistant requires setting up a dedicated home assistant server (like a raspberry pi or other local hardware). That won't be applicable for me, but others may find it useful.
    – emmby
    Commented Jun 25, 2022 at 23:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.