Programming the smart home: 'If this, then that'
Homes already have intelligent devices beyond the TV remote—garage door openers, coffee makers, laundry machines, lights, HVAC—but each has its own arcane steps for programming. User research now shows that "trigger-action programming" could give users a reliable and simple way to control everything, as easy as "If this, then that."
The idea of a smart home sounds promising enough. Who doesn't want a house full of automated gadgets—from light switches to appliances to heating systems—that know exactly when to turn on, turn off, heat up or power down?
But in order for all those devices to do what they're supposed to do, they'll need to be programed—a task the average homeowner might not have the interest or the tech-savvy to perform. And nobody wants to call tech support just to turn on a light.
A group of computer science researchers from Brown and Carnegie Mellon universities may have found a workable programming solution. Through a series of surveys and experiments, the researchers show that a style of programming they term "trigger-action programming" provides a powerful and intuitive means of talking to smart home gadgets.
The research was presented today at the Conference on Human Factors in Computing Systems (CHI2014) in Toronto. The work was co-authored by Blase Ur, a graduate student at Carnegie Mellon, Brown undergraduates Melwyn Pak Yong Ho and Elyse McManus, and Michael Littman, professor of computer science at Brown.
The trigger-action paradigm is already gaining steam on the web. It's used perhaps most prominently on the website IFTTT.com (If This, Then That), which helps people automate tasks across various Internet services. Users create "recipes" using simple if-then statements—for example: "If somebody tags me in a Facebook photo, then upload it to Instagram." The website interfaces with both service providers, and the action happens automatically each time it's triggered.
IFTTT.com started out as a tool to link websites, but it has recently added the capability to command a few internet-connected devices, like Belkin's WeMo power outlet and the Philips Hue lightbulb. That got Littman and his team thinking perhaps the trigger-action model employed by IFTTT might be a good fit for home automation.
"As a programming model, it's simple and there are real people using it to control their devices," Littman said. "But the question we asked in this paper was: Does it work for the [home automation] tasks people want to do, or is it perhaps too simple?"
To find out, the researchers started by asking workers on Mechanical Turk, Amazon's crowdsourcing marketplace, what they might want a hypothetical smart home to do. Then the team evaluated answers from 318 respondents to see if those activities would require some kind of programming, and if so, whether the program could be expressed as triggers and actions.
The survey responses varied from the mundane ("start the coffee pot from the bedroom") to the outlandish ("I would want my home to be able to shoot lasers at intruders."). A majority of activities people wanted—"Notify me when my pet gets out of the back yard" or "Start brewing coffee 15 minutes before my alarm"—would require some kind of programming to get the devices on the same page as the user. Most of the programming tasks fit nicely into the trigger-action format, the survey found. Seventy-eight percent of responses could be expressed as a single trigger and a single action. Another 22 percent involved some combination of multiple triggers or multiple actions.
The next step for the researchers was to see how well people could actually design recipes to accomplish tasks. To do that, they used two interfaces designed by McManus, one of the undergraduate researchers, and enlisted Mechanical Turkers to make recipes with the interfaces.
"We based both [interfaces] on 'If This Then That,'" McManus said. "But then we made one of them slightly more complex, so you could add multiple triggers and multiple actions."
The study showed that participants were able to use both interfaces—the simpler one and the one with multiple triggers and actions—fairly well. Participants who didn't have any programming experience performed just as well on the tasks as those who did.
Taken together, the researchers say, the results suggest that trigger-action programming is flexible enough to do what people want a smart home to do, and simple enough that non-programmers can use it. Melwyn Pak, one of the Brown undergraduates on the project, finds that encouraging.
"People are more than ready to have some form of finer control of their devices," he said of the results. "You just need to give them a tool that allows them to operate those devices in an intuitive way."
Littman, who has been studying end-user programming of electronic devices for several years, agrees.
"We live in a world now that's populated by machines that are supposed to make our lives easier, but we can't talk to them," he said. "Everybody out there should be able to tell their machines what to do. This paper is our attempt to start thinking about how to bridge that gap."
Provided by Brown University
Programu ya nyumba ya akili: 'Ikiwa hii, basi hiyo' Nyumba tayari zina vifaa vya akili zaidi ya TV remote - kufungua mlango wa karakana, watengenezaji wa kahawa, mashine za kufulia nguo, taa, HVAC - lakini kila moja ina hatua zake za siri kwa programu. "Utafiti wa watumiaji sasa unaonyesha kwamba ""programu ya hatua ya trigger"" inaweza kuwapa watumiaji njia ya kuaminika na rahisi ya kudhibiti kila kitu, rahisi kama ""Ikiwa hii, basi hiyo.""" Wazo la nyumba yenye akili laonekana kuwa lenye kuahidi. Nani hataki nyumba kamili ya vifaa vya kiotomatiki - kutoka swichi za taa kwa vifaa kwa mifumo ya joto - ambayo wanajua hasa wakati wa kuwasha, kuzima, joto juu au nguvu chini? Lakini ili vifaa vyote kufanya kile wanachotakiwa kufanya, watahitaji kuwa programu - kazi ya wastani mmiliki wa nyumba inaweza kuwa na maslahi au tech-savvy kufanya. Hakuna mtu anayetaka kuwasiliana na msaada wa kiufundi ili tu kuwasha taa. Watafiti wa Sayansi ya Kompyuta kutoka Chuo Kikuu cha Brown na Carnegie Mellon wamegundua njia ya kuunda programu. "Kwa njia ya mfululizo wa tafiti na majaribio, watafiti wanaonyesha kwamba mtindo wa programu wanaouita ""trigger-action programming"" hutoa njia yenye nguvu na ya kawaida ya kuzungumza na vifaa vya nyumbani vya smart." Utafiti huo ulifanywa katika mkutano wa Human Factors in Computing Systems (CHI) uliofanyika Toronto, Canada. Utafiti huo ulifanywa na Blase Ur, mwanafunzi wa shahada ya kwanza katika Chuo Kikuu cha Carnegie Mellon, na wanafunzi wa Brown Melvin Pak-Yong Ho na Elise McManus, na Michael Littman, profesa wa sayansi ya kompyuta katika Chuo Kikuu cha Brown. Mfano wa hatua ya kuchochea tayari unapata mvuke kwenye mtandao. "Kama ilivyoelezwa hapo juu, hii ni moja ya njia za ""kufanya kazi"" za IFTTT, ambayo ni njia ya kuwezesha kazi za moja kwa moja katika huduma mbalimbali za mtandao." Watumiaji huunda "mapishi" kwa kutumia taarifa rahisi za ikiwa-basi - kwa mfano: "Ikiwa mtu ananiweka alama kwenye picha ya Facebook, kisha upakue kwenye Instagram". Tovuti interfaces na watoa huduma wote, na hatua hutokea moja kwa moja kila wakati ni triggered. Ift.com ilianza kama chombo cha kuunganisha tovuti, lakini hivi karibuni imeongeza uwezo wa kuamuru vifaa vichache vilivyounganishwa kwenye mtandao, kama vile duka la umeme la Belkin's WeMo na balbu ya Philips Hue. Littman na timu yake walifikiria kuwa mfano wa trigger-action unaotumiwa na IFTTT unaweza kuwa mzuri kwa automatisering ya nyumbani. "Kama mfano wa programu, ni rahisi na kuna watu halisi kutumia yake kudhibiti vifaa vyao", Littman alisema. "Lakini swali tulilouliza katika karatasi hii lilikuwa: Je, inafanya kazi kwa [automation ya nyumbani] kazi ambazo watu wanataka kufanya, au labda ni rahisi sana?" Kwa mfano, watafiti waliuliza wafanyikazi wa Mechanical Turk, soko la Amazon la usambazaji wa umati, nini wanaweza kutaka nyumba ya akili ya kufikiria ifanye. Kisha timu hiyo ilichunguza majibu ya washiriki 318 ili kuona kama shughuli hizo zingehitaji aina fulani ya programu, na ikiwa ndivyo, ikiwa programu inaweza kuelezwa kama vichocheo na vitendo. "Jibu la utafiti huo lilitofautiana kutoka kwa kawaida (""anza chungu cha kahawa kutoka chumba cha kulala") hadi ya ajabu ("Ningependa nyumba yangu iwe na uwezo wa kupiga laser kwa wavamizi."")." "Mengi ya shughuli watu walitaka - ""Nijulishe wakati pet yangu anapata nje ya nyuma ya bustani"" au ""Kuanza brewing kahawa dakika 15 kabla ya alarm yangu"" - ingekuwa zinahitaji aina fulani ya programu ya kupata vifaa juu ya ukurasa huo kama mtumiaji." Uchunguzi huo uligundua kwamba kazi nyingi za programu zinafaa vizuri katika muundo wa kitendo cha kuchochea. Asilimia sabini na nane ya majibu yangeweza kuelezwa kama kichocheo kimoja na hatua moja. Kwa asilimia 22 ya watu waliohusika, kulikuwa na mchanganyiko wa mambo mengi yaliyokuwa yakisababisha ugonjwa huo. Hatua ya pili kwa watafiti ilikuwa kuona jinsi watu wanavyoweza kubuni mapishi ya kutimiza kazi. Kwa kufanya hivyo, walitumia viunganishi viwili vilivyobuniwa na McManus, mmoja wa watafiti wa shahada ya kwanza, na kuajiri Mechanical Turkers kutengeneza mapishi na viunganishi. "Tuliweka [interfaces] zote mbili juu ya 'Ikiwa Hii Kisha Hiyo,'" McManus alisema. "Lakini kisha tukafanya moja yao kuwa ngumu zaidi, ili uweze kuongeza vichocheo vingi na vitendo vingi". Utafiti huo ulionyesha kwamba washiriki walikuwa na uwezo wa kutumia wote interface - moja rahisi na moja na triggers nyingi na vitendo - haki vizuri. Washiriki ambao hawakuwa na uzoefu wowote wa programu walifanya vizuri sana katika kazi hizo kama wale ambao walikuwa wamefanya hivyo. Kwa pamoja, matokeo yanaonyesha kwamba programu ya kuamsha-hatua ni rahisi kutosha kufanya kile watu wanataka nyumba ya akili ifanye, na rahisi kutosha kwamba wasio programu wanaweza kuitumia. Melwyn Pak, mmoja wa wanafunzi wa Brown wanaofanya kazi hiyo, anaona jambo hilo kuwa lenye kutia moyo. "Watu wako tayari zaidi kuwa na aina fulani ya udhibiti bora wa vifaa vyao", akasema kuhusu matokeo hayo. "Lazima tu uwape kifaa kinachowaruhusu kutumia vifaa hivyo kwa njia ya moja kwa moja". Littman, ambaye amekuwa akijifunza programu za watumiaji wa mwisho wa vifaa vya elektroniki kwa miaka kadhaa, anakubaliana na hilo. """Tunaishi katika ulimwengu ambao umejaa mashine ambazo zinapaswa kufanya maisha yetu kuwa rahisi, lakini hatuwezi kuzungumza nao." "Kila mtu huko nje anapaswa kuwa na uwezo wa kuwaambia mashine zao nini cha kufanya. Karatasi hii ni jaribio letu la kuanza kufikiria jinsi ya kuziba pengo hilo". Inatolewa na Chuo Kikuu cha Brown