HomeKit - GarageDoor OPENING state shows closing in HomeKit

OH 4.3.2

I don’t know if it is an Apple HomeKit issue or openHAB. I created a simple String Item “HomeKitGarageTest” to which I send commands to change the state. I added HomeKit Metadata to define it as a GarageDoorOpener, I left all the defaults. Object displays fine in HomeKit.

OPEN, CLOSED and CLOSING all work fine. When I set the state of a garage door to OPENING it displays in HomeKit as “Closing”. CLOSING displays “Closing” as expected.

I did see some warnings in the log when setting state to CLOSING/OPENING/STOPPED. It logs “Wrong value” and “Returning CLOSED”.

23:21:02.107	INFO	openhab.event.ItemCommandEvent	Item 'HomekitGarageTest' received command CLOSED
23:21:02.108	INFO	openhab.event.ItemStateChangedEvent	Item 'HomekitGarageTest' changed from OPEN to CLOSED
23:21:02.108	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSED, mapping {OPEN=OPEN, CLOSED=CLOSED}
23:21:02.110	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSED, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:04.072	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSED, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:06.631	INFO	openhab.event.ItemCommandEvent	Item 'HomekitGarageTest' received command OPENING
23:21:06.632	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state OPENING, mapping {OPEN=OPEN, CLOSED=CLOSED}
23:21:06.633	WARN	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	Wrong value OPENING for GarageDoorOpener characteristic of the item HomekitGarageTest. Expected one of following [OPEN, CLOSED]. Returning CLOSED.
23:21:06.634	INFO	openhab.event.ItemStateChangedEvent	Item 'HomekitGarageTest' changed from CLOSED to OPENING
23:21:06.634	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state OPENING, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:07.096	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state OPENING, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:12.481	INFO	openhab.event.ItemCommandEvent	Item 'HomekitGarageTest' received command OPEN
23:21:12.482	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state OPEN, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:12.483	INFO	openhab.event.ItemStateChangedEvent	Item 'HomekitGarageTest' changed from OPENING to OPEN
23:21:12.484	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state OPEN, mapping {OPEN=OPEN, CLOSED=CLOSED}
23:21:14.065	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state OPEN, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:16.264	INFO	openhab.event.ItemCommandEvent	Item 'HomekitGarageTest' received command CLOSING
23:21:16.265	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSING, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:16.266	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSING, mapping {OPEN=OPEN, CLOSED=CLOSED}
23:21:16.266	INFO	openhab.event.ItemStateChangedEvent	Item 'HomekitGarageTest' changed from OPEN to CLOSING
23:21:16.266	WARN	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	Wrong value CLOSING for GarageDoorOpener characteristic of the item HomekitGarageTest. Expected one of following [OPEN, CLOSED]. Returning CLOSED.
23:21:16.716	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSING, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:19.999	INFO	openhab.event.ItemCommandEvent	Item 'HomekitGarageTest' received command CLOSED
23:21:20.000	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSED, mapping {OPEN=OPEN, CLOSED=CLOSED}
23:21:20.000	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSED, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:20.001	INFO	openhab.event.ItemStateChangedEvent	Item 'HomekitGarageTest' changed from CLOSING to CLOSED
23:21:20.579	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state CLOSED, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:23.652	INFO	openhab.event.ItemCommandEvent	Item 'HomekitGarageTest' received command STOPPED
23:21:23.653	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state STOPPED, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}
23:21:23.654	INFO	openhab.event.ItemStateChangedEvent	Item 'HomekitGarageTest' changed from CLOSED to STOPPED
23:21:23.654	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state STOPPED, mapping {OPEN=OPEN, CLOSED=CLOSED}
23:21:23.655	WARN	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	Wrong value STOPPED for GarageDoorOpener characteristic of the item HomekitGarageTest. Expected one of following [OPEN, CLOSED]. Returning CLOSED.
23:21:24.187	TRACE	org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory	getKeyFromMapping: characteristic GarageDoorOpener, state STOPPED, mapping {OPEN=OPEN, CLOSED=CLOSED, OPENING=OPENING, CLOSING=CLOSING, STOPPED=STOPPED}

I did the sequence in the correct order just to be sure, though I don’t think it is important.

Are these warnings normal? The fact that it display Closing instead of Opening, is it an openHAB bug or HomeKit?

Hi Louis

this one is a tricky one.
Garage opener has in Apple HomeKit two states:

  • current state: can be Open, Closed, Opening, Closing
  • target state: can be only Open or Closed

you should create two different items in OH.

in my case, i have two items and i set only status: “Open” and “Closed” on CurrentDoorState

as example.
Door is closed. CurrentDoorState = Closed, TargetDoorState = Closed
if you click on Garage icon in home app:

  • it sends “Open” to TargetDoorState
  • as long as CurrentDoorState is “Closed”, home app will show “Opening”
  • i have contact sensor at the door. Once i get “Open” on it, i set “CurentDoorState” to “Open” and home app changes from “Opening” to “Open”.

means, “Opening” and “Closing” is managed by home app if CurrentDoorState != TargetDoorState

Hi Eugen,

Thanks for the explanation. I understand the logic, but I don’t know how to configure the two items as “one” device in HomeKit. How do you “tell” HomeKit to send commands to one object but to check status on another object? Do you have a medata yaml file example or some screenshots?

create a group, attach homekit tag “GarageOpenOpener” to it

add single items and attach homekit tags CurrentDoorState, TargetDoorState

Just tested and, of course, it works! :star_struck:

This is quite powerful to use an equipment as the main accessory and to have items that have different functions within the accessory. I read it in the doc before you posted but I didn’t quite get it. Now it’s clear.

Thanks!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.