openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[homekit] Metadata Name not used #9595

Closed TheLexus closed 3 months ago

TheLexus commented 3 years ago

Hi,

if I specify an item like this:

Group  FLUR_Tradfri_Aufgang_Z2MQTT                  "ITEMNAME" (Zigbee) {homekit="Lighting"}
Switch FLUR_Tradfri_Aufgang_Z2MQTT_Switch           "On/Off"   (FLUR_Tradfri_Aufgang_Z2MQTT) { channel="mqtt:topic:mosquitto:FLUR_Tradfri_Aufgang:switch" ,homekit="Lighting.OnState"}
String FLUR_Tradfri_Aufgang_Z2MQTT_Name             "HOMEKIT NAME" (FLUR_Tradfri_Aufgang_Z2MQTT) {homekit="Lighting.Name"}

and add the new HomeKit bridge it always shows the Light with name ITEMNAME instead of HOMEKIT NAME ... maybe im doing something wrong or the name is not used.

Homekit add-on version is 2.5.9 and open hab 2.5.9-1 on a openhabian.

yfre commented 3 years ago

definition looks correct, please make sure you add name from start. homekit fetch the name with very first request and keep it. could you please try to rename your group? this would force homekit to create new accessory.

pelerner commented 3 years ago

I have the missing name problem with all my defined Power Outlets ..

Group  gAUSSEN_STECKDOSE_TERASSE_1      "SD Terasse #1"                     {                          homekit="Outlet" }
Switch iAUSSEN_STECKDOSE_TERASSE_1      "SD Terasse #1"     (gAUSSEN_STECKDOSE_TERASSE_1)   {channel="knx:device:...", homekit="Outlet.OnState"}
Switch iAUSSEN_STECKDOSE_TERASSE_1_STROMWERT_HK "SD Terasse #1 HK [%s]" (gAUSSEN_STECKDOSE_TERASSE_1)   {                      homekit="Outlet.InUseStatus"}
Number iAUSSEN_STECKDOSE_TERASSE_1_STROMWERT    "SD Terasse #1 [%.2f A]"                {channel="knx:device:..."}

Renaming the groups and restarting openhab did not work.

Lighting, Thermostats and Smokesensors work just fine.

ccutrer commented 2 years ago

Note that when you're using the Name characteristic, it gets the value of name from the state of the StringItem it's associated with, not the name of the StringItem.