Controlling exterior blinds via Siri

I am trying to control my exterior knx blinds via Siri in Openhab 2.5. I have homekit installed and it works like a charm to switch on lights.
Now I would like to open and close my blinds as well as control the slat angle (horizontal, 45 degrees, vertical). In Openhab knx binding I have a rollershutter element defined as well as a dimmer element to control the slats via the iOS app. This works fine.
How should I configure this to make it work with Homekit/Siri: controlling up/down as well as slat angle when the blinds are down and what are the Siri commands?

Does nobody control his blinds (up / down and slat angle) via Siri? Any help here would be highly appreciated.

I have managed to configure up/down movement and Apple Home is aware of the horizontal slat angle. But i cannot issue a command to change the angle.
I’ve installed the latest snapshot and followed the documentation to make this work.


It seems that the target angle should be controllable with a slider in the home app.

In my app there is no slider. Wondering if there is an issue with the addon, or with my configuration.


The needed characteristics are configured though.
361430334 badkamer jaloezie 1
Services:
Service Type: 0000008C-0000-1000-8000-0026BB765291
Characteristics:
: class io.github.hapjava.characteristics.impl.windowcovering.TargetPositionCharacteristic
: class io.github.hapjava.characteristics.impl.windowcovering.CurrentPositionCharacteristic
: class io.github.hapjava.characteristics.impl.windowcovering.PositionStateCharacteristic
: class io.github.hapjava.characteristics.impl.windowcovering.CurrentHorizontalTiltAngleCharacteristic
: class io.github.hapjava.characteristics.impl.common.ObstructionDetectedCharacteristic
: class io.github.hapjava.characteristics.impl.windowcovering.TargetHorizontalTiltAngleCharacteristic

@yfre do you have any input in this matter?

Siri translate the speech to home app actions and execute them. OpenHAB is not involved in this process. the key task is to find the right wording for siri. Siri also need exact name of the item and sometimes the room. In my case i need to say " close/open/close to xx%". concrete, my working room is called in home app “Arbeitszimmer” (in german) and blinds are called “Rollladen”. If i say, “Hey Siri, Arbeitszimmer Rollladen auf 30% schliessen” (schliessen = close) then it will close the blinds in working room to 30%.

Thank you for your response.

Yes, controlling the height works as a charm. The angle of the blinds are not settable though. Not through the home app - and not via Siri.

ah, ok. only the angle is the issue.
so, if i understood correctly:

  • you can change the slat angle via iOS app (openhab IOS app?). so, knx binding seems to work correctly.
  • angle controls appears in home app
  • but you can NOT change the angle via home app

correct?

do you see any warnings or exceptions in openhab.log?

No, the angle is reported (probably based on the CurrentHorizontalTiltAngleCharacteristic). But i do not get a slider to manipulate it.
The fist photo is something i found on google, and shows what i would expect.
The second photo is a screenshot of my home app, shows the angle - but no slider.

Thing configuration (knx)
Type rollershutter : bathroom_blind_1 “bdk jal 1” [ upDown=“2/1/0”, stopMove=“2/1/1”, position=“5.001:2/1/3+<2/1/13” ]

        Type switch: bathroom_blind_1_error                     "bdk jal 1 error"               [ ga="2/1/17"]

        Type dimmer :  bathroom_blind_1_angle                   "bdk jal 1 hoek"                [ increaseDecrease="2/1/2",  position="5.001:2/1/4+<2/1/14" ]

Item configuration:
Group F2_Bathroom_blind_1_Group “badkamer jaloezie 1” (F2_Bathroom) {homekit=“WindowCovering”}

Rollershutter                       F2_Bathroom_blind_1                     "badkamer jaloezie 1"                   <blinds>            (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering", channel="knx:device:bridge:generic:bathroom_blind_1", autoupdate="false"}

Switch                              F2_Bathroom_blind_1_Error               "badkamer jaloezie 1 fout"              <blinds>            (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering.ObstructionStatus", channel="knx:device:bridge:generic:bathroom_blind_1_error"}

Dimmer                              F2_Bathroom_blind_1_Angle               "badkamer jaloezie 1 hoek"              <blinds>            (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering.CurrentHorizontalTiltAngle, WindowCovering.TargetHorizontalTiltAngle", channel="knx:device:bridge:generic:bathroom_blind_1_angle", autoupdate="false"}

Logs do not show much aside from subscription added/removed

found. it is a bug in the underlaying library - Java-HAP. or to be more precise it is a bug in the Apple HomeKit specification document - they printed wrong ID for this characteristic.

i fixed the bug in the underlaying library but it gets released not that frequent. so, i created custom build for you - here
https://1drv.ms/u/s!AqqiEfFRr6WAgYgicbkV3EJ7CG93LQ?e=3tDaOq

download and put it in the addons folder of openhab (let me know if you need more detailed instruction how to do this)

I dropped the jar in the addon folder.
Is it ok that paper ui reports two instances of homekit? (I would expect not)


If i uninstall the existing homekit and drop the homekit jar in the addon folder, the jar cannot be started due to a lack of dependencies (io.netty.bootstrap)

I guess fiddling around a litte bit. Currently running your JAR, from userdata\tmp\mvn\org\openhab\addons\bundles\org.openhab.io.homekit\2.5.5-SNAPSHOT (overwritten the file that was there).

Not seeing any change though

home app load the new configuration only on changes.

please delete the F2_Bathroom_blind_1_Angle from the items, save it, wait home app get refresh (2-3 seconds), add the F2_Bathroom_blind_1_Angle again. even better if you would remove the complete group F2_Bathroom_blind_1_Group and add it back

Still no change. I even removed openhab from homekit and added again.
Got the source and was prepared to do some debugging of my own. Dev environment is setup with an extra openhab environment and a simple item file.

Then i thought… let’s try the verticial angle characteristics… that works! I now have a slider to manipulate the angle of the slats. The feedback (change in CurrentVerticalTiltAngle characteristic seems very slow. Maybe there is a missing subscription?) but otherwise it works perfectly.

@yfre looking at github i see you have done a lot of work (even debugging underlying library HAP). I now have 65 accessories working and will be adding more (5 more fans and 8 thermostats, 3 rollershutters, about 20 dimmable lights - which aren’t working for me at the moment, … and a lot more to come).

Thank you very much for your support in this issue, and your contributions to getting this to work in general! I’ll see if i can get to debugging and maybe adding some functionality as well :slight_smile:

For others - here is the knx thing, item and rules i use:

KNX things:

 Type rollershutter :  bathroom_blind_1                  "bdk jal 1"                     [ upDown="2/1/0", stopMove="2/1/1", position="5.001:2/1/3+<2/1/13" ] 

            Type switch: bathroom_blind_1_error                     "bdk jal 1 error"               [ ga="2/1/17"]

            Type dimmer :  bathroom_blind_1_angle                   "bdk jal 1 hoek"                [ increaseDecrease="2/1/2",  position="5.001:2/1/4+<2/1/14" ]

Items:

Group                               F2_Bathroom_blind_1_Group               "badkamer jaloezie 1"                   <blinds>            (F2_Bathroom)                                                                           {homekit="WindowCovering"}

Rollershutter                       F2_Bathroom_blind_1                     "badkamer jaloezie 1"                   <blinds>            (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering", channel="knx:device:bridge:generic:bathroom_blind_1", autoupdate="false"}

Switch                              F2_Bathroom_blind_1_Error               "badkamer jaloezie 1 fout"              <blinds>            (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering.ObstructionStatus", channel="knx:device:bridge:generic:bathroom_blind_1_error"}

Dimmer                              F2_Bathroom_Blind_1_Angle_KNX           "badkamer jaloezie 1 knx"                                                                                                                           {channel="knx:device:bridge:generic:bathroom_blind_1_angle", autoupdate="false"}

Number                              F2_Bathroom_blind_1_Angle_Current       "badkamer jaloezie 1 current"                       (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering.CurrentVerticalTiltAngle"}

Number                              F2_Bathroom_blind_1_Angle_Target        "badkamer jaloezie 1 target"                        (F2_Bathroom_blind_1_Group)                                                             {homekit="WindowCovering.TargetVerticalTiltAngle"}

Rules (slat angle is expressed in % by the thing, stored in a dimmer item. rules are needed to convert between angle and %):

rule "blind angle change"

when Item F2_Bathroom_Blind_1_Angle_KNX changed

then

    if(F2_Bathroom_Blind_1_Angle_KNX.state instanceof Number) {

        var currentState =  F2_Bathroom_Blind_1_Angle_KNX.state as Number

        var currentStateString = F2_Bathroom_Blind_1_Angle_KNX.state.toString

        val Number homekitangle = ((currentState / 100) * 180 ) - 90

        logInfo("blind angle change", "blind angle %:" + currentStateString + " blind homekit angle °: " + homekitangle.toString)

        F2_Bathroom_blind_1_Angle_Current.sendCommand(homekitangle)

        //F2_Bathroom_blind_1_Angle_Target.postUpdate(homekitangle)

    }

end

rule "blind angle target change"

when Item F2_Bathroom_blind_1_Angle_Target changed

then

if(F2_Bathroom_blind_1_Angle_Target.state instanceof Number) {

        var targetState =  F2_Bathroom_blind_1_Angle_Target.state as Number

        val Number knxPercent = (targetState + 90) / 180 * 100

        logInfo("blind target angle change", "Homekit target angle °: " + targetState.toString + " knx percent: " + knxPercent.toString)

        F2_Bathroom_Blind_1_Angle_KNX.sendCommand(knxPercent)

    }

end

@2xPower thank you for testing. i dont have all devices at home to test yet :slight_smile:

i checked with configuration without real device and i got 2 sliders

Group  gBlind    						"Blinds Group"       									{homekit = "WindowCovering"}
Rollershutter                       F2_Bathroom_blind_1       "badkamer jaloezie 1"            (gBlind)                 {homekit="WindowCovering"}
Dimmer                              F2_Bathroom_blind_1_VAngl "badkamer jaloezie 2 hoek"        (gBlind)       {homekit="WindowCovering.CurrentHorizontalTiltAngle, 
WindowCovering.TargetHorizontalTiltAngle"}
Dimmer                              F2_Bathroom_blind_1_HAngl "badkamer jaloezie 1 hoek"        (gBlind)       {homekit="WindowCovering.CurrentVerticalTiltAngle, WindowCovering.TargetVerticalTiltAngle"}

regarding HAP - yes, it was time for major refactoring of Java HAP. There were good ideas and contributions from other contributors, im basically combined them and add some more accessories.

the goal is the feature completeness - support all HomeKit devices in OH.
any support is more than welcome.