Skip to content

Fix/garage door#3

Open
maxarndt wants to merge 3 commits into
OpenKNX:v1devfrom
maxarndt:fix/garage-targetDoorState
Open

Fix/garage door#3
maxarndt wants to merge 3 commits into
OpenKNX:v1devfrom
maxarndt:fix/garage-targetDoorState

Conversation

@maxarndt
Copy link
Copy Markdown

Fix inverted open/close logic in DoorWindow channel

Hi @mgeramb, thanks for your great work! While testing the SmartHomeBridge application I ran into an issue with my garage door. I was only able to close the garage door but wasn't able to open it via HomeKit.

Below you can find a generated description of the two fixes I made in my branch.


Issue 1: Inverted targetDoorState for GarageDoor after movement stops

In HomeKitDoorWindow::setMovement, the targetDoorState was set to the wrong value once the door stopped moving. In HomeKit, 0 means open and 1 means close, so position 100 should map to 0. As a result, the GarageDoor tile showed the opposite state after the movement finished.

Issue 2: Inverted DPT_OpenClose value in commandPosition

In KnxChannelDoorWindow::commandPosition, the value sent on KO_OPEN_CLOSE was flipped. DPT_OpenClose (DPT 1.009) defines 0 = Open and 1 = Close, but the code sent Close on an open command and Open on a close command. The SendOpen and SendClose modes were also triggering on the wrong position. After the fix, all three handling modes send the correct value. Verified with shutters and a garage door — both now move in the expected direction from HomeKit.


All this was tested with my Hörmann garage door and the appropriate Hörmann KNX gateway.
Bildschirmfoto 2026-05-14 um 18 30 19
Bildschirmfoto 2026-05-14 um 18 29 47

I would appreciate if you can have a look at it!

Thanks,
Max

@mgeramb mgeramb changed the base branch from v1 to v1dev May 15, 2026 13:46
@mgeramb
Copy link
Copy Markdown
Member

mgeramb commented May 15, 2026

Danke Max!

ich werde das auf v1dev übernehmen und vor dem nächsten Release (sollte in 1-2 Wochen soweit sein) nochmal testen.
Kannst du bitte noch die letzte Stelle der Version im libarary.json erhöhen und im readme.md in den Release Notes den Bugfix beschreiben. Dann merge ich das.

Liebe Grüße, Michael

@maxarndt
Copy link
Copy Markdown
Author

Gerne doch @mgeramb!

Der Changelog in der Readme ist nun aktuell und die Version ist auch angepasst.

Besten Dank und Grüße,
Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants