Skip to content

Conversation

@andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Sep 16, 2025

Resolves #14094

There is an existing HomeKit system integration addon which allows exporting OH Items into the HomeKit eco- system.
This is a new HomeKit client binding addon which allows importing OH Things and Channels from the HomeKit eco- system.

There are three types of Things supported:

  • accessory: This integrates a single HomeKit accessory, which has its own LAN connection.
    Its services appear as channel groups, and their respective characteristics appear as channels.
  • bridged-accessory: This integrates a single HomeKit accessory, which does NOT have its own LAN connection.
    It has the same functionality as an accessory, except that its communication is done via a bridge (see below).
  • bridge: This integrates a HomeKit bridge accessory, which has its own LAN connection.
    It does not have any own channels.
    Instead it contains multiple bridged-accessory Things (see above).

Things of type bridge and accessory both communicate directly with their HomeKit device over the LAN. Whereas bridged-accessory Things communicate via their respective bridge Thing.

The JAR files for testing purposes are here:

See Apple HomeKit Specification.pdf for reference.

Notes:

  1. This binding uses a clone of the code in my Light State Model PR here for the time being. Note that once that PR will have been merged, the clone in this binding can be deleted and instead linked to use that library.
  2. I did make contact with @kgoderis since he has also a huge HomeKit project that is also work-in-progress. However he told me that he has no time to make further progress on his work. So I decided to make a clean re-start from scratch.

Signed-off-by: Andrew Fiddian-Green [email protected]

Todos:

  • State options for enums
  • Convert 2 step enums to Switch/Contact
  • Adopt discovery PR from @jlaur
  • Rollershutter instead of Dimmer, with up/down
  • Add 'aid' to make thing labels unique
  • Add intricate test cases for Velux Json dump
  • Check arc degree usage
  • Implement light state machine (see State machine to model lights in Thing handlers openhab-core#4995)
  • Add code to reconnect if socket gets dropped
  • Rollershutter add stop (position hold) override
  • Implement button trigger channels
  • i18n on thing status messages
  • Support event subscription and notification
  • Fix the disposition of On/Off derived from B part of OH HSB command
  • i18n on channel labels
  • i18n on state option labels
  • Implement thing action for pairing
  • Implement addon suggestion finder
  • Unique channel type and group type ids

Issues that will NOT be addressed

  • Coalesce target and current channels
  • Identify device

Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg self-assigned this Sep 16, 2025
@andrewfg andrewfg requested a review from a team as a code owner September 16, 2025 18:12
@andrewfg andrewfg added new binding If someone has started to work on a binding. For a new binding PR. work in progress A PR that is not yet ready to be merged labels Sep 16, 2025
@andrewfg

This comment was marked as outdated.

@lsiepel lsiepel marked this pull request as draft September 16, 2025 18:24
@lsiepel

This comment was marked as outdated.

@lsiepel lsiepel requested a review from Copilot September 16, 2025 18:27
Signed-off-by: Andrew Fiddian-Green <[email protected]>

This comment was marked as outdated.

Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg requested review from ThomasM102 and jlaur November 30, 2025 15:01
@ThomasM102

This comment was marked as outdated.

@andrewfg

This comment was marked as resolved.

Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg and others added 2 commits December 1, 2025 23:52
Co-authored-by: Jacob Laursen <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
- use new core HexUtils functions
- add java doc about Alice and Bob notation
- eliminate minor compiler warnings

Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg

This comment was marked as resolved.

@andrewfg andrewfg requested a review from jlaur December 2, 2025 12:34
@andrewfg andrewfg added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Dec 2, 2025
@jlaur

This comment was marked as resolved.

@andrewfg

This comment was marked as resolved.

@kaikreuzer

This comment was marked as resolved.

@kaikreuzer

This comment was marked as resolved.

@jlaur

This comment was marked as resolved.

@andrewfg andrewfg added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Dec 3, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

andrewfg commented Dec 5, 2025

@jlaur I successfully removed the bridge polling and sleep code that you didn't like. And replaced it with a purely event driven model. I have tested this today and I can confirm that it works perfectly. So it is now ready again for your review.

EDIT: added resubscription to eventing if a new item channel link is added

- remove unnecessary handler initialized tests
- resubscribe event if channel linked
- refactoring

Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new binding If someone has started to work on a binding. For a new binding PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[homekit] HomeKit Binding

10 participants