Thispluginintegratestheesphomeplatformintohomebridgesothatyoudon'thavetogothroughhomeassistantifyoudon'twantto(notthatthereisanythingwrongwiththat).ItmakesuseofthenativeAPIofesphomesothatyoucanexpectinstantupdatesforallyourbinarysensorswhathaveyou.
Supportedcomponentsinclude:
LightsSwitchesBinarySensors(motion,window,door,smokeandleakage)Sensors(temperature&humidityatthemoment)Thisprojectiscurrentlystillinbeta,butIthoughtthatmanyeyesseemorethanjustmytwo:)
InstallationUnlessyouhaven'tdonesoalready,makesuretoinstallhomebridgefirst.Seeinstructionshere.Onceyouhavedonethis,youcaninstallthispluginbytyping
npmi-ghomebridge-esphome-tsOncethisisdone,youcanconfigureyourhomebridgeconfig.jsonaccordingtothenextsection.
GettingStarted{"platform":"esphome","devices":[{"host":"my_esp.local","password":"Passw0rd!","port":9001,"retryAfter":120000//optional,timeinmilliseconds!}],"retryAfter":60000//optional,timeinmilliseconds!}Onlythehostkeyismandatoryunderdevices.Aspassword''isassumedakanopasswordandthedefaultportnumber6053isalsowiredintotheplugin.Youcanadd,intheory,asmanyESPdevicesasyouwanttothatarray.
Ifsomeofyourdevicesarepassword-lessyoucanenabledevicesdiscoverytoletthepluginfindallyourdevicesbysettingdiscover:trueinplatformconfiguration.Incaseifyoudon'thaveanypassword-secureddevicesyoucanevenfullyomit"devices"sectioninplatformconfiguration.
Incaseyoudon'thaveaworkingesphomeconfigurationyoucanhavelookattheexamplesfolder.Thereyouwillfindbothanexamplehomebridgeconfig.jsonfileaswellasanexampleesphomeconfiguration.Forfurtherguidanceonesphomepleasecheckouttheirwebsite.
retryAfterBothretryAfterkeysareasexplainedoptionalandneedtocontainanintegerthattellsthispluginafterwhattimeframeitshouldtrytoreconnect.Keepinmindthatthisvalueneedstobeinmilliseconds.TheinnerretryAfterwilltrumptheoutervalueifpresent.Thedefaultvalueis90seconds.
BlacklistingIfforsomereasonyouwanttoexcludeaspecificcomponentfromthispluginjustaddakeycontainingitsname(asitwasdefinedinesphomeandisshowninitiallyinHomeKit)toastringarrayunderthekeyblacklist:
{"platform":"esphome","devices":[...],"blacklist":["Myblacklistedswitch"]}TodoImplementablacklistforcomponentsTesting,especiallywiththenewhomebridgeversionImplementsensorcomponentTroubleshootingPleasemakesuretoaddtheapientrytoyourconfig!
IfyoustillhaveproblemspleasefeelfreetoopenaticketonGitHub.Beforedoingsoaddthistoyourconfig"debug":true.ThepluginwillnowoutputwhatithasgottenfromyourESPdevice.PleaseappendthiswhenyouopenatickethereonGitHub.PleaseattachyourconfigaswellandmakesuretoremoveanysensitiveinformationsuchasWiFipasswords.
Inadditiontosimplywritingstufftotheconsole,itwillalsowriteeverythingreceivedfromyourdevicestoindividualfilesunder/tmp.YoucanthensubmitthesefileswithanyissuesyoumightfileonGitHub.
SlightwarningThewritingofthesefilesmeansthatitwillalsooccupymorespaceonyourSDcardorwhateveryoumighthave.Sosimplyturnoffthisoptiononceyoudon'tneeditanymore.
评论