Anesp8266poweredgaragedoorcontrollerwithHomeKitsupportpoweredbyHomebridge.
PlatformIOThisprojectusesPlatformIOtomanagedependenciesandbuildprocess.Seehttps://platformio.org/platformio-ideforinstallationinstructions.
Setup:
Createanauth.hfilebasedonthesrc/auth.h-templatefileanddefineasecurealphanumericusernameandpassword.ReviewtheGPIOpinsdefinedinsrc/settings.handadjustasrequired.Build:
piorunUpload
piorun-tuploadMonitorSerial
piodevicemonitorYoumayneedtoadjusttheupload_portandmonitor_portintheplatformio.inifile.Youcanlisttheavailabledevicesusing:
piodevicelistHomebridgePluginIfyoujustwanttoinstalltheplugin,searchforandinstall@oznu/homebridge-esp8266-garage-door.
sudonpminstall-g@oznu/homebridge-esp8266-garage-doorDevelopmentTheHomebridgepluginislocatedinthe./homebridgedirectory.
cdhomebridgeBuildTypeScriptneedstobecompiledintoJavaScriptbeforeitcanrun.Thefollowingcommandwillcompilethecontentsofyoursrcdirectoryandputtheresultingcodeintothedistfolder.
npmrunbuildLinkToHomebridgeRunthiscommandsoyourglobalinstallofHomebridgecandiscovertheplugininyourdevelopmentenvironment:
npmlinkYoucannowstartHomebridge,usethe-Dflagsoyoucanseedebuglogmessagesinyourplugin:
homebridge-DWatchForChangesandBuildAutomaticallyIfyouwanttohaveyourcodecompileautomaticallyasyoumakechanges,andrestartHomebridgeautomaticallybetweenchangesyoucanrun:
npmrunwatch
评论