homebridge-loxone-ws Websocket based Loxone plugin

我要开发同款
匿名用户2021年12月10日
35阅读
开发技术JavaScript
所属分类其他开源、物联网
授权协议MIT License

作品详情

homebridge-loxone-ws

WebsocketbasedLoxonepluginforhomebridge

ThisisaLoxonepluginforHomebridgeThepluginwillautomaticallyretrieveandcommunicatewithalltheseitemsfromyourLoxonesetup:

Lights(Switches,DimmersandColorleds)OtherSwitchesPushbuttonsWindowblindsTemperaturesensors(othertypescanbeaddedeasily)

TheonlyconfigurationneededisthecredentialstoyourLoxoneminiserver.

BenefitsRealtimeandveryfast2-wayupdatesbyusingthewebsocketconnectionOne-touchdeploymentthroughautomaticimportofLoxonecontrolsPrerequisites

HomebridgeFollowalltheinstallationstepsthere.

Installation

Installthepluginthroughnpmordownloadthefilesfromhere.

$sudonpminstall-ghomebridge-loxone-ws

Orupdatetolatestversionwhenalreadyinstalled:

$sudonpmupdate-ghomebridge-loxone-ws

Note:thepluginrequiresextranodemodules,buttheseshouldbeautomaticallyinstalled:

node-lox-ws-apirequestHomebridgeconfig.json

AddtheplatformsectiontoyourHomebridgeconfig.json(usuallyin~/.homebridge):

{"bridge":{"name":"Homebridge","username":"CA:AA:12:34:56:78","port":51826,"pin":"012-34-567"},"description":"Yourconfigfile.","platforms":[{"platform":"LoxoneWs","name":"Loxone","host":"192.168.1.2","port":"12345","username":"homebridge","password":"somepassword"}]}

Replacefields

hostbytheIPofyourloxoneminiserverportbytheportofyourminiserver(use80ifnospecialport)usernamebytheLoxoneusernamepasswordbytheLoxonepassword

IstronglysuggesttocreateadedicateLoxoneuserthroughLoxoneConfig(eghomebridge).Likethisyoucanrestrictaccesstosensitiveitemsorfilteroutunneededcontrols.

Optionalconfigurationfieldsintheplatformsection

rooms

Tospecifyanarrayofinterestedroomstofilteron.Ifemptyornotgiven,allelementsareused.Eg:specifying"rooms":["Kitchen","Bedroom"]willlimityourbridgetoonlyelementsfromthose2rooms.

moodSwitches

CanuseLoxonemoodswhicharepartofLightControllerV2elements.(Inordertousethis,you'llneedtoconvertany'old'LightControllersblocks.)

Has3possiblevalues

none:doesnotincludemoods.Thisisthedefaultincasenotgiven.all:includemoodsasactionableitemonly:onlyincludemoodsandfilteroutanyotherelementAssumptions

TocreatethecorrectaccessorytypefromLoxoneitems,someattributeparsingisrequired.(EgaLoxoneSwitchcanbeaSwitchoraLightBulb,andInfoOnlyAnalogtypecanbeatemperaturesensorbutalsoanythingelse.)ThisiscoveredinthecheckCustomAttrsfunctioninItemFactory.Adaptittoyourneeds.Currentlytheseassumptionsaremade:

temperaturesensornamesstartwith'Temperat'lightswitchesareinaLoxonecategoryusingthelightbulbicon

ThecontrolswillbenamedlikeyounamedtheminLoxone.RenamethemthroughtheiOSHomeapptomakeitmoreintuitiveforusingwithSiri.EgLIGHT_KITCHENcanberenamedto'mainlight'andaddedtoroomKitchen.ThenyoucanaskSirito'turnonthemainlightinthekitchen'.

Limitations

roomsTheHomebridge/HAPprotocoldoescurrentlynotallowattachingtheLoxoneroomstotheaccessories.ThatisamanualactiontobedoneonceusingtheIOSHomeapp(ortheEveappwhichismuchmoreuser-friendly).

Specialnote:organizingintoroomscanbedonefromEve,butrenamingtheitemsshould(unfortunately)bedonefromtheIOSHomeapp.NamechangesinEvearenotreflectedinHomeandthusnotknownbySiri.

100itemsHomeKithasalimitof100accessoriesperbridge.IfyouhavealargeLoxonesetup,trytofilterunneededitemsouteitherthroughadedicatedLoxoneusergrouporinthecheckCustomAttrsfunction.

pushbuttonsSinceHomekithasnopushbuttonconcept,IimplementedpushbuttonsasswitchesinHomekit.TellingSiritoputthemOnwillsendapulsetothepushbutton.InHomekit,theywillappeartobeOnforasecond.

Advanced

TheEventtypeisforeseenforyourconvenience,butnotcurrentlyused.Itcanbeusedforpushbuttonswhenyou'reonlyinterestedinreadingfromHomekitandnotcontrollingit.Thatcouldbeusefulforsettingtriggers,egaPushbuttoneventwhichcausesaHomekitscenetobecomeactive.

Problemsolving

IfyourhavetroublesgettingthestatesonyouriOSdevice,tryremovingthefilesinyour'persists'folder(usuallyin~/.homebridge/persist)andrestartinghomebridge.

License

ThepluginisreleasedunderMITlicense,whichmeansyoucandowhateveryouwantwithitaslongasyougivecredit.

Credits

AttributiongoestowardsTommasoMarchionni.ThestructureofthiscodeisbasedonhisopenHABplugin.

TheoriginalHomeKitAPIworkwasdonebyKhaosTianinhisHAP-NodeJSproject.

ThehomebridgecomponentonwhichthispluginisbuiltwascreatedbyNickFarina.

I'vemadeuseoftheNodeJSLoxonewebsocketAPIcreatedbyLadislavDokulil

Thankstoallcontributors!

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论