Announcing some improvements to the Homekit plugin for openHAB 2

hi Tim,
ok Super! I didn’t know tag “ContactSensor” was supported ! Works as you showed !

Hi Tim,

thanks for you work at the homekit plugin! :+1:

I´ve got three homematic thermostats and have them added to Alexa.
I was able to ask Alexa “how´s the temperature in the kitchen” and Alexa was able to answer with the current temperature.
Currently Alexa only answers “kitchen currently doesn´t answer”.

Item:

Number:Temperature itmHeizung_Kueche_IST "Temperatur Kueche [%.1f °C]" <heating> (Kueche, Temperatur, gPersist, gCharts) ["CurrentTemperature"] {channel="homematic:HG-HM-CC-RT-DN:default:<SERIALNUMBER>:4#ACTUAL_TEMPERATURE"}

I´m not using TargetTemperature as the heating is controlled by an central thermostat.

The device is recognized by Alexa and shows the openHAB config.
The Home app is not able to connect to openHAB.
I´m using your latest 2.4.0-5 version.

Is this an homekit or Alexa issue?
Could you please add something like -5 to your versions to make it clear which version oH is currently working with?

kind regards
Michael

Alexa issue.

That’s a great idea; I don’t think it would require very much of me to bump the version here :slight_smile: I’ll do that for future releases.

Thanks, I’ll try the -5 version.

While we are taking about Thermostats, right now I had to create a virtual HomeKit mode item that does a proxy between the binding and HomeKit because the Thermostat appliance binding (Daikin in my case) has separate On/Off and mode (Auto/Coll/Heat - Fan and Dehumidifier also) items. This does not allow and 1:1 mapping with HomeKit so there are rules to process updates to/from HomeKit, for example to set HomeKit mode to Off if the thermostat is switched Off but remains in Auto.

It would be interesting if the add-on could manage this kind of situation.

My problem is not only on window covering. It happens to all items i have configured. If you can tell me which log you need and how to get it i will provide them.

I should be able to understand what’s happening better if you get me the following info (feel free to mail to my email):

events.log (see /var/log/openhab2 ?)
openhab.log (same)
The result of curl http://{my-openhab-instance}/rest/items
Screenshots of homekit

Also, did you try the canonical homekit plugin (the one distributed in the 2.4.0 default repositories?) Is your observation a regression caused by my changes?

With a homekit thermostat…how does it work if you have mulitple temp sensors…or for it to work properly is there only supposed to be one?

And does it control power on/off, or it designed for getting and maintaining a temp (as opposed to if temp less than so and so turn on heating, turn off at time)

Hi, Tim,
thanks for your work on the Homekit plug in. I have a beginner question about the installation.
Is it correct to first delete the old version via the Paper UI, download your -5 version and replace the previous file? Then restart and continue with the configuration over Paper UI as described?

Do you mean how do i control the heating?
I´m using the tado thermostat as my residence has a central gas heating unit.
The tado thermostat comes with an app that allows multi user access and geofence based heating.
The Homematic thermostats are not talking to the tado thermostat, they´re just lower the temp when opening a windows or it´s night.
I purchased them and had a much more complex plan before i found the tado thermostat.

What is your e-mail? Discourse let me only send a max size of 1024kb.

Yes, the original is working ok.

I don’t have one either, I used a dummy Color item in OH and checked it’s status through the Karaf Console.

Unfortunately there is no defined sequence of events defined in the standard. My experience showed, that the sequence seems to be On -> Brightness -> Saturation -> Hue, but not very consistently.

Yes, that should do it. Uninstall old one, put the new one in your addons folder, restart for good measure. (there are still some bugs with reloading the homekit plugin, unfortunately)

You’ll have to designate a primary temperature sensor as home only supports a single temperature channel. You could consider creating a separate Item and then using a rule to monitor the other values and report the current “primary” channel, I suppose?

Okay, so if the events are sent in that order (On, Brightness, Sat, Hue), then the request is most likely to work? That seems like it’d be possible to enforce. Have you confirmed that the openhab2 Homekit integration is the one mixing up the order events? IE what do you see in your logs? Is it possible that the binding to your bulb is messing it up? I’m actually really wondering if it should be fixed at the binding level, since it sounds like it is probably a device-specific concern. IE the binding could ideally debounce the changes of these channels and then send them in the proper order.

Hi Tim,
I installed your HomeKit version yesterday. The thermostats work perfectly. The display with the current temperature is now green (grey before) and when I change the mode I don’t get an error message anymore.
In the log there are still some things I can’t classify:
First One:
2019-02-10 10:20:20.255 [WARN ] [al.accessories.HomekitThermostatImpl] - The tag homekit:TargetTemperature has been renamed to TargetTemperature; please update your things, accordingly
Second:
2019-02-10 10:14:46.764 [INFO ] [al.accessories.HomekitThermostatImpl] - stringValue = Off, mode=OFF
My next step is to integrate the window sensors, but I can’t get any further.
My item configuration: Switch Fenster_Contact “Fenstersensor Bad” (OG_Bad) [“OccupanySensor”] {channel=Innogy…xxxxxx:contact]
The sensor does not appear in the Homekit app. Any Idea??

Glad to hear it works!

This is just because the tag was renamed as part of my efforts to revamp the way composite characteristics are created. Just rename the tag as it suggests and it’ll go away.

Probably just some leftover logging.

I’ve been playing around a bit with the motion and temperature sensors and passing them to HomeKit (using your version)

Any chance it will be possible to export the humidity as a property of a temperature sensor? HomeKit does seem to support this, I can also target it in automation rules. (See screenshot)

@sjorge This is planned; current focus is to get the current changes merged in to OpenHab upstream. Then, with HAP-Java 1.2.x we will add better support for optional characteristics, which will then enable us to have richer aggregate devices.

1 Like

The 6th release of the plugin is out. See the changelog:

@Tim_Harper

Thank you for your work on the improvements on the HomeKit plugin. It is relay needed to improve these binding. Your latest version indeed works on my setup where the “original” version from openHAB would not connect. So thank you very much.
I have a point wich could be discussed. I’m using a mixture of Alexa and Siri (maybe with is not so common, but a good solution for me :smile:) and my point is that I have Items tagged for Alexa which I normally do not want to see within HomeKit. So my question or point for discussion is, would it be an option to use different Tags within the HomeKit binding to control which items should been exposed. Maybe an advanced setting to activate the HomeKit specific tags would be an idea.
Wire82