Accessoriescreatedbythisplatformprovideacontactsensor,whichisopenedforeveryincomingoroutgoingcall.Auseforthiscouldbetoautomaticallyturndownthevolumeofplayedbackmusictobeabletorecognizetheringingphone.
IntegrateswithHomeKitviaHomebridge.
WhyaCallMonitorPluginIhavetroublehearinginnoisyenvironmentsandsometimesfailtonoticethatmyphonerings.Idon'tthinkI'malonewiththis.
Iconfiguredthisplugintoturndownanymusicthatmightbeplayingtoenablemetonoticethatthephonerings.AnotheraspectisthatthemusicplaybackremainsturneddownwhileIamonthephoneandisraisedassoonasIhangup.
Thiscallmonitorpluginexposestwocontactsensors-oneforincomingcallsandoneforoutgoingcalls.Theseenabletheseparatehandlingbycalldirectionandtheapplicationofdifferentrules.
InstallationinstructionsAfterHomebridgehasbeeninstalled:
sudonpminstall-ghomebridge-callmonitor
Exampleconfig.json{"bridge":{...},"platforms":[{"platform":"CallMonitor","devices":[{"name":"AVMFritz!Box7490","address":"192.168.178.1","port":"1012","outgoingName":"AusgehenderAnruf","incomingName":"EingehenderAnruf"}]}]}Theplatformcanconnecttoanynumberofdevices,whichsupportthecallmonitorprotocolsupportedbyAVMFritz!Boxdevices.I'vetesteditwithanAVMFritz!Box7490,othermodelsmayworkaswell.Ifyouwanttoreportadifferentdeviceasworking,pleasefileanissue.
Adeviceisconfiguredbyspecifyingthefollowing:
AttributesUsagenameThenameofthedevice.Mustbespecified.addressTheIPv4addressoftheAVMFritzdevice.Ifnoaddressisspecified,theaccessorywillnotbecreated.portTheportwheretheFritzdevicereportscallstatisticdata.Thisdefaultis1012.incomingNameThenameofthecontactsensorserviceforincomingcalls.Ifnotspecifiedthisisthenameofthedevicewith-incomingappended.outgoingNameThenameofthecontactsensorserviceforoutgoingcalls.Ifnotspecifiedthisisthenameofthedevicewith-outgoingappended.AccessoryServicesEachbotwillexposetwoservices:
AccessoryInformationServiceContactSensorServiceforincomingcallsContactSensorServiceforoutgoingcallsSupportedclientsThisplatformandthebotsitdriveshavebeenverifiedtoworkwiththefollowingappsoniOS11
ElgatoEveHomeSupporteddevicesAVMFritz!Box7490Otherdevicesnotlistedheremaywork.Ifyouhaveanotherdevicethatworks,pleasereportitviaaGitHubissue.
ConfigurationYouneedtoenablethecallmonitoronmostdevices.ForAVMFritz!Boxdevicesthiscanbedonebydialing#96*5*onaconnectedphone.Todisablethecallmonitordial#96*4*.
SomeasksforfriendlygesturesIfyouusethisandlikeit-pleaseleaveanotebystaringthispackagehereoronGitHub.
Ifyouuseitandhaveaproblem,fileanissueatGitHub-I'lltrytohelp.
Ifyoutriedthis,butdon'tlikeit:tellmeaboutitinanissuetoo.I'lltrymybesttoaddresstheseinmysparetime.
Ifyouforkthis,goahead-I'llacceptpullrequestsforenhancements.
LicenseMITLicense
Copyright(c)2017MichaelFröhlich
Permissionisherebygranted,freeofcharge,toanypersonobtainingacopyofthissoftwareandassociateddocumentationfiles(the"Software"),todealintheSoftwarewithoutrestriction,includingwithoutlimitationtherightstouse,copy,modify,merge,publish,distribute,sublicense,and/orsellcopiesoftheSoftware,andtopermitpersonstowhomtheSoftwareisfurnishedtodoso,subjecttothefollowingconditions:
TheabovecopyrightnoticeandthispermissionnoticeshallbeincludedinallcopiesorsubstantialportionsoftheSoftware.
THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY,FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHEAUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHERLIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM,OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHESOFTWARE.
评论