Problems with homekit binding in openHAB3.4.2

I did a fresh install of openHABian and openHAB3.4.2 on a new microSD card for my raspberry pi 3B+.

When I tried to expose Items to the homekit binding, I encountered several problems:

  1. When assigning homekit metadata at Equipment level, there is an option to propagate the homekit properties to the direct members of the related Equipment group. Clicking this “populate group members” link does nothing.
  2. To get the metadata assigned to the individual Points in an Equipment, you need to add the metadata for each Point (Item) individually.
  3. You cannot assign multiple homekit device types at Equipment level. Either the metadata remains empty or the UI shows garbled settings (as if they lost the relation to the selected device types).
  4. Even if you succeed in properly assigning the required homekit metadata, most of the time the devices exposed to the homekit binding either become dummy items or remain in “No response” state in the Home app.

If I try to assign homekit metadata at Equipment level in the UI, the JavaScript console produces the following error when I try to assign a sub property to a related Point (in this case Lighting.onType to the Brightness Point of a Lightbulb:

TypeError: undefined is not an object (evaluating 'a.metadata.homekit')
updateLinkedItem — 16.app.eab2460dc8b652f1fc46.js:1:133237
updateLinkedItem
qe — app.eab2460dc8b652f1fc46.js:7:11325
dispatchEvent
trigger — app.eab2460dc8b652f1fc46.js:1:9730
b — app.eab2460dc8b652f1fc46.js:7:311041
l — app.eab2460dc8b652f1fc46.js:1:7535

When I subsequently click the “Update group members” link on the same page, nothing happens, not even a warning in the JavaScript console.

Andf here’s what happens in the logs:


2023-03-15 10:32:15.627 [WARN ] [.accessories.HomekitAccessoryFactory] - Accessory of type Lighting must have following characteristics [OnState]. Found only []
2023-03-15 10:32:15.633 [WARN ] [mekit.internal.HomekitChangeListener] - Cannot create accessory Item:Rail_straat_N1 (Type=GroupItem, Members=1, State=NULL, Label=Rail straat N1, Category=lightbulb, Tags=[Lightbulb], Groups=[LivingRoom])  HomeKit type: 'Lighting' characteristic: 'Empty'
2023-03-15 10:32:55.006 [INFO ] [mekit.internal.HomekitChangeListener] - Created 18 HomeKit items in instance 1.

When I try to add openHAB as Homekit bridge, I now get “Unable to add accessory - Accessory is out of compliance” as error message.

I managed to get the homekit binding worrking again by deleting all homekit-related metadata from $OPENHAB_USERDATA/jsondb and $OPENHAB_USERDATA/jsondb/backup, and then add openHAB as empty Homekit bridge to the Home app.

To overcome the UI problems relating to homekit metadata, the following convoluted approach works:

  1. Add Homekit metadata at Equipment level. Pick the HomeKit top-level characteristic(s).
  2. Still at Equipment level, assign the Points to the listed HomeKit characteristics, and save.
  3. For each Point, manually assign the related Homekit metadata. Click Save for each.
  4. Finally, return at Equipment level, open the Homekit metadata, review and save.

Bug report opened:

Thanks for sharing! I currently have the same problem - and could not solve it yet. I deleted the files you mentioned, reset the homekit pairings, reinstalled the pairing multiple times, and did everything else I could think of.

this is the error message I can see:

2023-04-10 12:21:58.420 [ERROR] [nhab.io.homekit.internal.HomekitImpl] - bundle org.openhab.io.homekit:3.3.0 (345)[org.openhab.io.homekit.internal.HomekitImpl(362)] : The modified method has thrown an exception
	at org.openhab.io.homekit.internal.HomekitImpl.modified(HomekitImpl.java:152) ~[?:?]

Would you mind sharing what you did exactly? Would appreciate any advice. Thanks!!

Was that ever fixed? If so, please kindly illuminate.

Five thermostats, none of the added HomeKit metadata sticks, I hit ‘Save’, a 'Metadata update; message pops up, only for me to come back to empty unassigned values.

Thanks