2019-05-01_Linux_Format

(singke) #1

http://www.techradar.com/pro/linux May 2019 LXF249 35


Open source smart home


betheMark1, a PioryourLinuxbox.
WakeWord– Thewordthatwillprick
upMycroft’svirtualears.It willtrytohelp
youwithanythingyousayafterthisword.
Utterance– A commandorquestion
directedatMycroft.
Intent– A tasktheuserintendsto
accomplish;differentutterancesmayhave
thesameintent.Mycroftusesa lightweight
intentparsercalledAdapt. A morecomplex,
neural-network-basedparser,Padatious,
isalsoavailable.
Skill– A functionthatMycroftperformsin
responsetoanUtterance,thiscouldbetorelaysome
information,adjustthetemperatureonyoursmart
thermostat,ortoactivateyourhome’sself-destruct
mechanism.TheintentparserdecideswhichSkill
shouldbeusedfora givenquery.
FallbackSkill– If theintentparserisunabletomatch
a skilltoa givenutterance,a generalfallback
skillisused.FallbacksskillsforDuckDuckGoandthe
WolframAlphaknowledgeengineareincluded,which
cananswermostgeneralqueries.
MycrofthasrecentlybegunworkontheCommonIoT
framework.We’llmakereferencetoa fewdifferent
frameworksinthisfeature,soyoumaybethinking,why
anotherone?Fairpoint.It’spreciselybecausethereare
nowsomanypartiallyinteroperatingecosystemsthat
bridginglayersaresometimesnecessary.
TheimportantthingisthatCommonIoTisavailable
asa Mycroftskill,whichenablesdifferentplatformsto
becontrolledconsistentlyandsavesskillwritershavingto
fightwithnatural-languagecoding.

heMycroftMark1 launchedin 2016 andwas
poweredbya Pi2,butthingshavemovedon
andit nowshipswitha Pi3 atitsheart.It’sa
stylishdevice,andwithitsfriendlyET-stylefaceyou
couldalmostforgiveit forlisteningintoallyourliving
roomconversations.Actually,non-creepinessispartof
Mycroft’sdesign– anyfeatureyoufindinvasiveor
unnecessarycanbedisabledthankstoitsopensource
nature.Mozilla’sPrivacyNotIncludedsitehasa
favourablewrite-upathttp://bit.ly/lxf249mycroft^1.
TheMark1 deviceisstillavailablefor$180(we
couldn’tfinda sourceforit intheUK,unfortunately),
butit wasalwaysdesignedwithhackersandhobbyists
inmind.A successorisontheway,andtheMark2 will
bemuchmoreconsumer-friendly(butsadlynolonger
lookslikeET),featuringa six-microphonearray,
touchscreenandstereospeakers.
Don’tworrythough,hackerswillstillbeabletohave
theirwickedwaywithit.Mycroftiscurrentlytakingpre-
ordersfortheMark2,soif you’retemptedcheckit out
athttp://bit.ly/lxf249mycroft2^2. Alternatively,you
canrunPicroft, thesamesoftwarethatrunsonthe
Mark1, onyourownRaspberryPiorLinuxbox.Butfirst
someMycroftetymologyandterminology.
YouprobablyalreadyknowthatSherlockHolmes
hadanolderbrothercalledMycroft.Youmayevenbe
awarethatinHeinlein’sclassicTheMoonIsa Harsh
Mistress, theHOLMESFOURcomputerthat
accidentallybecameself-awarewasnamedMycroft,
shortenedtoMike.Incaseyouweren’t,that’swhere
theMycroftHomeAssistantgetsitsname.Don’tworry
though,despiteourbesteffortswecouldn’tgetthe
devicetobecomesentientandatnopointdidwefeel
threatenedbyMycroft...butmaybethat’sjustwhatit
wantedustothink.
Scene-settingaside,you’llwanttogetfamiliar
withtheMycroftnomenclaturebeforeyoustart
ensmarteningyourhome,assomeofcanbea little
confusingatfirst.
Enclosure– AnydevicerunningMycroft:thiscould


HARDWAREREQUIREMENTS


VoicerecognitionisreasonablytaxingCPU-wise,soyou’llneedat
leasta Pi2 torunPicroft. Eventhatwillstruggleandtheofficialword
(seehttps://mycroft.ai/documentation/picroft) istousea Pi3.
Thatwayyoualsowon’thavetoworryaboutgettingWi-Fiworking.
SincethePi’sonboardaudiodoesn’thaveanykindofanalogue
input,you’llneeda USBmicrophone.Wehitupourfriendsat
ModMyPiandgotthereasonablyfancySeeedReSpeakermic-array,
whichhasfourmicrophonessocandeterminethedirectionofan
audiosource.
You’llalsoneedsomekindofspeaker;thiscouldconnecteitherto
the3.5mmanalogueoutputorviaUSB,orviaHDMIif yourdisplay
hasspeakers.Bluetoothaudiomaywork,butusers(that’llbeme–
Ed) havereportedproblemswiththis,soit’sprobablybestavoided.
You’llalsoneedatleastan8GBSDcard.
Mycroftwillrunquitehappilyona desktopLinuxboxtoo,solong
asit hasspeakers,a microphoneanda reasonablypowerfulCPU.
Infactit willevenrunonAndroidif you’refeelingadventurous.

T


Introducing Mycroft


SetyourphysicallocationtoensureMycroftknowswhereit isand
answersaccordingly.

The prototype
Mycroft Mark 2
home assistant
retains some of
its predecessor’s
charm, but looks a
little more like its
proprietary peers.

A Pi-powered, friendly-looking home helper on the scene.


Actually, there are two – and you can use their code.



  1. https://foundation.mozilla.org/en/privacynotincluded/products/mycroft-mark-1/

  2. https://mycroft.ai/product/introducing-the-mycroft-mark-ii-pre-order/

Free download pdf