How can I expose channels to home kit and assign this device to a specific room for homekit?
I tried to follow the homekit intergration manual but I have not quite figured it out
here is an example from my setup (i have KNX thermostats). I have a group of items and the group itself is tagged with homekit=“Thermostat” and the items in the group have tagging for different characteristics, e.g. homekit=“Thermostat.CurrentTemperature”
heating.items
Group gKitchenhermostat "Kitchen heating" {homekit="Thermostat"}
Number kitchenThermostatCurrentTemp "Current Temperature [%.1f ]" (gKitchenhermostat) {homekit="Thermostat.CurrentTemperature", channel="knx:device:scn_ip:GT2T_kitchen:temperature"}
Number kitchenThermostatTargetTemperature "Target Temperature [%.1f C]" (gKitchenhermostat) {homekit="Thermostat.TargetTemperature", channel="knx:device:scn_ip:AKH800_01:channel_d"}
String kitchenCurrentThermostatMode "Current Mode" (gKitchenhermostat) {homekit="Thermostat.CurrentHeatingCoolingMode" [OFF="OFF", HEAT="HEAT"]}
String kitchenTargetThermostatMode "Target Mode" (gKitchenhermostat) {homekit="Thermostat.TargetHeatingCoolingMode" [OFF="OFF", HEAT="HEAT"]}
you can also have multiple homekit metadata at a single item. e.g.
Thank you eugene, I just need one more thing to point me in the right direction.
Do I have to set this unter item → metadata → Apple Homekit.
There under code it is:
value: “”
config: {}
i assumed you do you config using text config. but sure, you can do it using UI.
you dont need to put anything in the “code” tab. just link items at group item and click “Update group members”
it looks like this on my side
unfortunatly the gui isnt working for me, after setting the mapping of the group members and clicking on “update group members” and also clicking on save, the change isnt saved.
Where can I do the textual config? In the item? Do I have to do it in the shell?
Afterwards the settings are gone. Unfortunatly Im only allowed to post one picture.
This error is in the dev tools in the browser:
app.b85df14c3a7ad94c41f1.js:7
TypeError: Cannot read properties of undefined (reading 'homekit')
at i.updateLinkedItem (16.app.b85df14c3a7ad94c41f1.js:1:133237)
at change (16.app.b85df14c3a7ad94c41f1.js:1:136231)
at qe (app.b85df14c3a7ad94c41f1.js:7:11319)
at HTMLSelectElement.n (app.b85df14c3a7ad94c41f1.js:7:13064)
at Za.r._wrapper (app.b85df14c3a7ad94c41f1.js:7:48339)
at e.trigger (app.b85df14c3a7ad94c41f1.js:1:9716)
at HTMLInputElement.b (app.b85df14c3a7ad94c41f1.js:7:311033)
at HTMLDivElement.l (app.b85df14c3a7ad94c41f1.js:1:7529)
ok. need to investigate why it is not working in oh3.4
but you can do it also at single item level, i.e.
go to every item on you list separately and add homekit metadata,
e.g. go to tHeizgruppeBuero_ActualTemperature and add homekit metadata “CurrentTemperature”, then go to tHeizgruppeBuero_setPointTemperature and add “TargetTemprature”, etc
this is all good.
Apple thermostat has mandatory items and without them it cannot create thermostat. so, you need to add homekit to all of them and to the group, so that apple knows they all belongs to the same thermostat.
the list of mandatory items you can find in the second column of this table
for thermostat they are:
CurrentTemperature
TargetTemperature
CurrentHeatingCoolingMode
TargetHeatingCoolingMode
so, please add all of them and the group, ignore the error in the logs until then
Hello eugen, on my first screenshot you can see that I added all mandatory items.
When I add the metadata to a single item, e.g. Current temperature to Thermostat.CurrentTemperature I see this in the logs:
22:14:43.985 [WARN ] [l.accessories.HomekitAccessoryFactory] - Accessory of type Thermostat must have following characteristics [CurrentHeatingCoolingMode, TargetHeatingCoolingMode, CurrentTemperature, TargetTemperature]. Found only [Item:tHeizgruppeSchlafzimmerEltern_ActualTemperature (Type=NumberItem, State=17.9 °C, Label= Actual Temperature, Category=Temperature, Tags=[Point], Groups=[tHeizgruppeSchlafzimmerEltern]) HomeKit type: 'Thermostat' characteristic: 'CurrentTemperature']
22:14:43.987 [WARN ] [omekit.internal.HomekitChangeListener] - Cannot create accessory Item:tHeizgruppeSchlafzimmerEltern_ActualTemperature (Type=NumberItem, State=17.9 °C, Label=Actual Temperature, Category=Temperature, Tags=[Point], Groups=[tHeizgruppeSchlafzimmerEltern]) HomeKit type: 'Thermostat' characteristic: 'Empty'

ignore error. just keep doing it. so, go to next item and add homekit data, one by one and then the group
the error also tells - “Thermostat must have following characteristics [CurrentHeatingCoolingMode, TargetHeatingCoolingMode, CurrentTemperature, TargetTemperature]”
add all of them and then openhab homekit will be able to create it