Homekit Syntax - help needed

Hi Guys,

finally i managed to get Homekit working again.
But somehow i dont get the syntax right. only a few items work, but most aren’t.

a simple OSRAM Plug ( doesn’t work , doesn’t even see it in Home.app )

Switch	Hue_Plug_1_Toggle		"Garten"		<garden> 			(PhilipsHUE,PhilipsHUELight,gLight)	{ homekit="Switchable", channel="hue:0010:0017886eb013:7:switch" }

Sonoff Power ON/OFF not working , can see it in Home.app
( Humidity & Temp. work )

// Sonoff TH 16 - Temperature / Humidity
////////////////////////////
Switch Sonoff_TH16_Power		"Sonoff TH16 Power [MAP(de.map):%s]"			<poweroutlet>	(gSonoff_2019)		{homekit="Switchable", channel="mqtt:topic:sonoff_th16:power"}
String Sonoff_TH16_String		"Sonoff TH16 String"							<poweroutlet>	(gSonoff_2019)		{channel="mqtt:topic:sonoff_th16:state"}
Number Sonoff_TH16_Temp			"Sonoff TH16 Temp [%s °C]"						<temperature>	(gSonoff_2019)		{homekit="TemperatureSensor", channel="mqtt:topic:sonoff_th16:temperature"}
Number Sonoff_TH16_Humidity		"Sonoff TH16 Humidity [%s %%]"					<humidity>		(gSonoff_2019)   	{homekit="HumiditySensor", channel="mqtt:topic:sonoff_th16:humidity"}  
Number Sonoff_TH16_RSSI			"Sonoff TH16 WLAN Stärke [%.0f %%]"				<wifi>			(gSonoff_2019)		{channel="mqtt:topic:sonoff_th16:rssi"}
Number Sonoff_TH16_Load			"Sonoff TH16 Load Avg. [%s %%]"					<heating>		(gSonoff_2019)		{channel="mqtt:topic:sonoff_th16:load"}
String Sonoff_TH16_Uptime		"Sonoff TH16 Uptime"							<time>			(gSonoff_2019)		{channel="mqtt:topic:sonoff_th16:uptime"}
String Sonoff_TH16_ssid			"Sonoff TH16 WiFi"								<wifi>			(gSonoff_2019)		{channel="mqtt:topic:sonoff_th16:ssid"}

LED Strip Color-Change not working , can see it in Home.app and can turn On/OFF

Switch    LED_2_power        "LED Schreibtisch"                    <led_strip>      (gLight,OG_Office_Light)    {homekit="Lighting, Lighting.Hue, Lighting.Brightness, Lighting.Saturation", channel="wifiled:wifiled:F0FE6B678010:power"}
Color     LED_2_color        "LED 2 Farbe"                              <hue>            (OG_Office)                 {homekit="Lighting, Lighting.Hue, Lighting.Brightness, Lighting.Saturation", channel="wifiled:wifiled:F0FE6B678010:color"}

and whats the best way to refresh the “homekit stuff”
Console -> openhab:homekit list
gives me still items, where i already deleted the homekit syntax out of it.

any advice would be much appreciated - thanks!

yes, it is known issue. homekit does not get notified if only metadata of an item was changed. so, it does not refresh the list of accessories.

the ugly but simple workaround

  • delete item, save config and add it again
  • renamed it to new name, save config, rename it to old name

please make few seconds pause between saving of configs so that homekit manage to recreate the accessories list.

ok thanks , thats to update the accessories list (already done nearly the same)

but why is my e.g. OSRAM Plug not even displaying/integrated ?

so, you have 1 device but 2 items for it - one for on/off and another for HUE right?

then you need a group, e.g.

Group     gLed2   			    "Led Group"       						{homekit = "Lighting"}
Switch    LED_2_power        "LED Schreibtisch Anna"                    <led_strip>      (gLight,OG_Office_Light,gLed2)    {homekit="Lighting.OnState", channel="wifiled:wifiled:F0FE6B678010:power"}
Color     LED_2_color        "LED 2 Farbe"                              <hue>            (OG_Office, gLed2)                 {homekit="Lighting.Hue, Lighting.Brightness, Lighting.Saturation", channel="wifiled:wifiled:F0FE6B678010:color"}

thanks but i don’t want “grouped/complex item” i just need a simple plug to be displayed
(OSRAM Plug)

it worked in OH 2.4 with old [“Lighting”] definition

sorry, was looking on wrong item. you need group for LED.
but you have asked about Hue_Plug_1_Toggle, right?
to me the definition looks look.

Switch Hue_Plug_1_Toggle "Garten" <garden> (PhilipsHUE,PhilipsHUELight,gLight) { homekit="Switchable", channel="hue:0010:0017886eb013:7:switch" }

just to make sure, none of the group of Hue_Plug_1_Toggle has “homekit” metadata, right? try it without group to double-check

The plug has no group and no metadata, just a single plug.

in the meantime, i tried an OH Reboot and lost my Bridge Connection for Homekit, already successfully re-connected again and without any changes, the OSRAM Plug is now in Homekit.

But my LED Light still doesn’t work. just ON/OFF but without colors.

which LED do you see in home app?
“LED Schreibtisch” or “LED 2 Farbe” ?

“LED Schreibtisch” cannot have colour as it is link to item type “Switch” that has only “ON” and “OFF”
but “LED 2 Farbe” should have colour

both, you are correct and i know that LED Schreibtisch is wrongly defined
but LED 2 Farbe should work correctly, but doesn’t. It shows the correct color once open in detail, but nothing changes.

ach, ok, you see the LED 2 Farbe in home app and you can also open colour selection. this is already good. that means, that item is configured correctly for homekit. the syntax is correct.

what is not working? change via home app have no impact on device?
can you change LED colour directly in openhab, e.g. via basicui?

can you change colour directly on device and then check in home app, whether this change got reflected?

no impact exactly, beside ON/OFF

i was over years and with OH3 tested yesterday it worked (maybe without homekit stuff) but today nothing changes . lol

i got a color update in Home.app :+1: