Garagedoor opener in Homekit

i have very similar setup but with homematic instead of shelly.
here is my configurations:
items

String    garageDoorStatus     "Garagentor Status [%s]"  <door>  (gGarageDoor)      {homekit="ContactSensor", channel="homematic:HMIP-SWDO:rasmatic:0000:1#STATE"}
Switch    garageSwitch  "Garagetor"    {channel="homematic:HmIP-WGC:rasmatic:001:3#STATE"}

Group           gGarage           "Garage"                                      {homekit="GarageDoorOpener"}
Switch          garageObstruction "Garage Obstruction"          (gGarage)       {homekit="ObstructionStatus"}
String          garageCurrentState "Garage Current State [%s]"  (gGarage)       {homekit="CurrentDoorState"}
String          garageTargetState "Garage Target State [%s]"    (gGarage)       {homekit="TargetDoorState", alexa="ModeController.mode" [category="EXTERIOR_BLIND", supportedModes="Closed=@Value.Close, Open=@Value.Open",actionMappings="Close=Closed,Open=Open", friendlyNames="Garage", language="de"]}

rules

rule "garage door state update"
when
     Item garageDoorStatus received update
then
     if (garageDoorStatus.state == "OPEN" ) {
        garageCurrentState.sendCommand("OPEN")
        garageTargetState.postUpdate("OPEN")
     } else {
         garageCurrentState.sendCommand("CLOSED")
        garageTargetState.postUpdate("CLOSED")
     }
    garageSwitch.sendCommand(OFF)
end

rule "garage door target state"
when
     Item garageTargetState received command
then
    garageSwitch.sendCommand(ON)
    garageSwitch.sendCommand(OFF)
end
3 Likes